oci_core_compute_cluster
This resource provides the Compute Cluster resource in Oracle Cloud Infrastructure Core service. Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/iaas/latest/ComputeCluster
Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/
Creates an empty compute cluster. A compute cluster is a remote direct memory access (RDMA) network group.
After the compute cluster is created, you can use the compute cluster’s OCID with the LaunchInstance operation to create instances in the compute cluster. The instances must be created in the same compartment and availability domain as the cluster.
Use compute clusters when you want to manage instances in the cluster individually in the RDMA network group.
If you want predictable capacity for a specific number of identical instances that are managed as a group, create a cluster network that uses instance pools by using the CreateClusterNetwork operation.
Example Usage
resource "oci_core_compute_cluster" "test_compute_cluster" {
#Required
availability_domain = var.compute_cluster_availability_domain
compartment_id = var.compartment_id
#Optional
defined_tags = {"Operations.CostCenter"= "42"}
display_name = var.compute_cluster_display_name
freeform_tags = {"Department"= "Finance"}
placement_constraint_details {
#Required
type = "COMPUTE_CLUSTER"
#Optional
hpc_island_id = oci_core_hpc_island.test_hpc_island.id
logical_placement_constraint = var.compute_cluster_placement_constraint_details_logical_placement_constraint
target_memory_fabric_ids = var.compute_cluster_placement_constraint_details_target_memory_fabric_ids
target_network_block_ids = var.compute_cluster_placement_constraint_details_target_network_block_ids
}
}
Argument Reference
The following arguments are supported:
availability_domain- (Required) The availability domain to place the compute cluster in. Example:Uocm:PHX-AD-1compartment_id- (Required) (Updatable) The OCID of the compartment.defined_tags- (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:{"Operations.CostCenter": "42"}display_name- (Optional) (Updatable) A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.freeform_tags- (Optional) (Updatable) Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:{"Department": "Finance"}placement_constraint_details- (Optional) (Updatable) The details for providing placement constraints.hpc_island_id- (Optional) The OCID of the HPC island for the compute cluster.This field cannot be updated after creation of the compute cluster.
logical_placement_constraint- (Updatable) The logical placement strategy to apply. Allowed values areSINGLE_TIER,SINGLE_BLOCK, andPACKED_DISTRIBUTION_MULTI_BLOCK.target_memory_fabric_ids- (Updatable) The list of target GPU memory fabric OCIDs to constrain placement. Up to 15 items are allowed.If GMFs are passed in, the
hpcIslandIdmust be set on the compute cluster, and the provided GMFs must belong to that same HPC island.The ordering of the array will be preserved. Ensure that all items in the array are unique.
target_network_block_ids- (Updatable) The list of target network block OCIDs to constrain placement. Up to 15 items are allowed.If
targetNetworkBlockIdsis provided, thehpcIslandIdmust be set on the compute cluster, and the provided network blocks must belong to that same HPC island.The ordering of the array will be preserved. Ensure that all items in the array are unique.
type- (Required) (Updatable) The type for the placement constraints. Supported value:COMPUTE_CLUSTER.
** 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:
availability_domain- The availability domain the compute cluster is running in. Example:Uocm:PHX-AD-1compartment_id- The OCID of the compartment that contains the compute cluster.defined_tags- Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example:{"Operations.CostCenter": "42"}display_name- A user-friendly name. Does not have to be unique, and it’s changeable. Avoid entering confidential information.freeform_tags- Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see Resource Tags. Example:{"Department": "Finance"}id- The OCID of the compute cluster.placement_constraint_details- The details for providing placement constraints.hpc_island_id- The OCID of the HPC island for the compute cluster.This field cannot be updated after creation of the compute cluster.
logical_placement_constraint- The logical placement strategy to apply. Allowed values areSINGLE_TIER,SINGLE_BLOCK, andPACKED_DISTRIBUTION_MULTI_BLOCK.target_memory_fabric_ids- The list of target GPU memory fabric OCIDs to constrain placement. Up to 15 items are allowed.If GMFs are passed in, the
hpcIslandIdmust be set on the compute cluster, and the provided GMFs must belong to that same HPC island.The ordering of the array will be preserved. Ensure that all items in the array are unique.
target_network_block_ids- The list of target network block OCIDs to constrain placement. Up to 15 items are allowed.If
targetNetworkBlockIdsis provided, thehpcIslandIdmust be set on the compute cluster, and the provided network blocks must belong to that same HPC island.The ordering of the array will be preserved. Ensure that all items in the array are unique.
type- The type for the placement constraints. Supported value:COMPUTE_CLUSTER.
state- The current state of the compute cluster.time_created- The date and time the compute cluster was created, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Ztime_updated- The date and time the compute cluster was updated, in the format defined by RFC3339. Example:2016-08-25T21:10:29.600Z
Timeouts
The timeouts block allows you to specify timeouts for certain operations:
* create - (Defaults to 20 minutes), when creating the Compute Cluster
* update - (Defaults to 20 minutes), when updating the Compute Cluster
* delete - (Defaults to 20 minutes), when destroying the Compute Cluster
Import
ComputeClusters can be imported using the id, e.g.
$ terraform import oci_core_compute_cluster.test_compute_cluster "id"