oci_ocvp_sddc

This resource provides the Sddc resource in Oracle Cloud Infrastructure Oracle Cloud VMware Solution service.

Creates an Oracle Cloud VMware Solution software-defined data center (SDDC).

Use the WorkRequest operations to track the creation of the SDDC.

Important: You must configure the SDDC's networking resources with the security rules detailed in Security Rules for Oracle Cloud VMware Solution SDDCs. Otherwise, provisioning the SDDC will fail. The rules are based on the requirements set by VMware.

Example Usage

resource "oci_ocvp_sddc" "test_sddc" {
    #Required
    compartment_id = var.compartment_id
    initial_configuration {
        #Required
        initial_cluster_configurations {
            #Required
            compute_availability_domain = var.sddc_initial_configuration_initial_cluster_configurations_compute_availability_domain
            esxi_hosts_count = var.sddc_initial_configuration_initial_cluster_configurations_esxi_hosts_count
            network_configuration {
                #Required
                nsx_edge_vtep_vlan_id = oci_core_vlan.test_vlan.id
                nsx_vtep_vlan_id = oci_core_vlan.test_vlan.id
                provisioning_subnet_id = oci_core_subnet.test_subnet.id
                vmotion_vlan_id = oci_core_vlan.test_vlan.id
                vsan_vlan_id = oci_core_vlan.test_vlan.id

                #Optional
                hcx_vlan_id = oci_core_vlan.test_vlan.id
                nsx_edge_uplink1vlan_id = oci_ocvp_nsx_edge_uplink1vlan.test_nsx_edge_uplink1vlan.id
                nsx_edge_uplink2vlan_id = oci_ocvp_nsx_edge_uplink2vlan.test_nsx_edge_uplink2vlan.id
                provisioning_vlan_id = oci_core_vlan.test_vlan.id
                replication_vlan_id = oci_core_vlan.test_vlan.id
                vsphere_vlan_id = oci_core_vlan.test_vlan.id
            }
            vsphere_type = var.sddc_initial_configuration_initial_cluster_configurations_vsphere_type

            #Optional
            capacity_reservation_id = oci_ocvp_capacity_reservation.test_capacity_reservation.id
            datastores {
                #Required
                block_volume_ids = var.sddc_initial_configuration_initial_cluster_configurations_datastores_block_volume_ids
                datastore_type = var.sddc_initial_configuration_initial_cluster_configurations_datastores_datastore_type
            }
            display_name = var.sddc_initial_configuration_initial_cluster_configurations_display_name
            initial_commitment = var.sddc_initial_configuration_initial_cluster_configurations_initial_commitment
            initial_host_ocpu_count = var.sddc_initial_configuration_initial_cluster_configurations_initial_host_ocpu_count
            initial_host_shape_name = oci_core_shape.test_shape.name
            instance_display_name_prefix = var.sddc_initial_configuration_initial_cluster_configurations_instance_display_name_prefix
            is_shielded_instance_enabled = var.sddc_initial_configuration_initial_cluster_configurations_is_shielded_instance_enabled
            workload_network_cidr = var.sddc_initial_configuration_initial_cluster_configurations_workload_network_cidr
        }
    }
    ssh_authorized_keys = var.sddc_ssh_authorized_keys
    vmware_software_version = var.sddc_vmware_software_version

    #Optional
    defined_tags = {"Operations.CostCenter"= "42"}
    display_name = var.sddc_display_name
    freeform_tags = {"Department"= "Finance"}
    is_single_host_sddc = var.sddc_is_single_host_sddc
    hcx_action = var.hcx_action
    is_hcx_enabled = var.sddc_is_hcx_enabled
}

How to migrate from deprecated fields to new fields

  1. Before starting migration, back up your terraform state file.
  2. Get the SDDC OCID for the oci_ocvp_sddc resource you plan to migrate.
  3. Remove the oci_ocvp_sddc resource from Terraform state via command: terraform state rm \
  4. Update oci_ocvp_sddc resource config. Remove all deprecated fields and add corresponding new fields to the resource config. Note: Remove and do not add hcx_action or refresh_hcx_license_status because these fields will not be imported.
  5. Import oci_ocvp_sddc resource to Terraform state using command: terraform import \ \.
  6. Run terraform plan to check if there is any planned change for oci_ocvp_sddc resource. If there is any planned change, update oci_ocvp_sddc resource config until there is no planned change.

Argument Reference

The following arguments are supported:

* IMPORTANT * Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

Attributes Reference

The following attributes are exported:

Timeouts

The timeouts block allows you to specify timeouts for certain operations: * create - (Defaults to 6 hours), when creating the Sddc * update - (Defaults to 20 minutes), when updating the Sddc * delete - (Defaults to 20 minutes), when destroying the Sddc

Import

Sddcs can be imported using the id, e.g.

$ terraform import oci_ocvp_sddc.test_sddc "id"