oci_ocvp_esxi_host

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

Adds another ESXi host to an existing SDDC. The attributes of the specified Sddc determine the VMware software and other configuration settings used by the ESXi host.

Use the WorkRequest operations to track the creation of the ESXi host.

Example Usage

resource "oci_ocvp_esxi_host" "test_esxi_host" {
	#Required
	cluster_id = oci_ocvp_cluster.test_cluster.id

	#Optional
	billing_donor_host_id = oci_ocvp_billing_donor_host.test_billing_donor_host.id
	capacity_reservation_id = oci_ocvp_capacity_reservation.test_capacity_reservation.id
	compute_availability_domain = var.esxi_host_compute_availability_domain
	current_commitment = var.esxi_host_current_commitment
	defined_tags = {"Operations.CostCenter"= "42"}
	display_name = var.esxi_host_display_name
	esxi_software_version = var.esxi_host_esxi_software_version
	freeform_tags = {"Department"= "Finance"}
	host_ocpu_count = var.esxi_host_host_ocpu_count
	host_shape_name = oci_core_shape.test_shape.name
	next_commitment = var.esxi_host_next_commitment
}

How to migrate from deprecated fields to new fields

  1. Before starting migration, back up your terraform state file.
  2. Get the ESXi host OCID for the oci_ocvp_esxi_host resource you plan to migrate.
  3. Remove the oci_ocvp_esxi_host resource from Terraform state via command: terraform state rm <resource address>
  4. Update oci_ocvp_esxi_host resource config. Remove all deprecated fields and add corresponding new fields to the resource config.
  5. Import oci_ocvp_esxi_host resource to Terraform state using command: terraform import <resource address> <ESXi host OCID>.
  6. Run terraform plan to check if there is any planned change for oci_ocvp_esxi_host resource. If there is any planned change, update oci_ocvp_esxi_host 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 1 hours), when creating the Esxi Host * update - (Defaults to 20 minutes), when updating the Esxi Host * delete - (Defaults to 20 minutes), when destroying the Esxi Host

Import

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

$ terraform import oci_ocvp_esxi_host.test_esxi_host "id"