Data Source: oci_identity_compartment

This data source provides details about a specific Compartment resource in Oracle Cloud Infrastructure Identity service.

Gets the specified compartment’s information.

This operation does not return a list of all the resources inside the compartment. There is no single API operation that does that. Compartments can contain multiple types of resources (instances, block storage volumes, etc.). To find out what’s in a compartment, you must call the “List” operation for each resource type and specify the compartment’s OCID as a query parameter in the request. For example, call the ListInstances operation in the Cloud Compute Service or the ListVolumes operation in Cloud Block Storage.

Example Usage

data "oci_identity_compartment" "test_compartment" {
	#Required
	id = var.compartment_id
}

Argument Reference

The following arguments are supported:

Attributes Reference

The following attributes are exported: