oci_core_compute_capacity_reservation

This resource provides the Compute Capacity Reservation resource in Oracle Cloud Infrastructure Core service.

Creates a new compute capacity reservation in the specified compartment and availability domain. Compute capacity reservations let you reserve instances in a compartment. When you launch an instance using this reservation, you are assured that you have enough space for your instance, and you won’t get out of capacity errors. For more information, see Reserved Capacity.

Example Usage

resource "oci_core_compute_capacity_reservation" "test_compute_capacity_reservation" {
	#Required
	availability_domain = var.compute_capacity_reservation_availability_domain
	compartment_id = var.compartment_id

	#Optional
	defined_tags = {"Operations.CostCenter"= "42"}
	display_name = var.compute_capacity_reservation_display_name
	freeform_tags = {"Department"= "Finance"}
	instance_reservation_configs {
		#Required
		instance_shape = var.compute_capacity_reservation_instance_reservation_configs_instance_shape
		reserved_count = var.compute_capacity_reservation_instance_reservation_configs_reserved_count

		#Optional
		cluster_config {
			#Required
			hpc_island_id = oci_core_hpc_island.test_hpc_island.id

			#Optional
			network_block_ids = var.compute_capacity_reservation_instance_reservation_configs_cluster_config_network_block_ids
		}
		cluster_placement_group_id = oci_identity_group.test_group.id
		fault_domain = var.compute_capacity_reservation_instance_reservation_configs_fault_domain
		instance_shape_config {

			#Optional
			memory_in_gbs = var.compute_capacity_reservation_instance_reservation_configs_instance_shape_config_memory_in_gbs
			ocpus = var.compute_capacity_reservation_instance_reservation_configs_instance_shape_config_ocpus
		}
	}
	is_default_reservation = var.compute_capacity_reservation_is_default_reservation
}

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 20 minutes), when creating the Compute Capacity Reservation * update - (Defaults to 20 minutes), when updating the Compute Capacity Reservation * delete - (Defaults to 20 minutes), when destroying the Compute Capacity Reservation

Import

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

$ terraform import oci_core_compute_capacity_reservation.test_compute_capacity_reservation "id"