You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: website/docs/r/identity_compartment.html.markdown
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -11,7 +11,9 @@ This resource provides the Compartment resource in Oracle Cloud Infrastructure I
11
11
12
12
Creates a new compartment in the specified compartment.
13
13
14
-
**Important:** Compartments cannot be deleted.
14
+
**Important:** Unless `enable_delete` is explicitly set to true:
15
+
* Terraform will not delete compartments on destroy, and
16
+
* For backwards compatibility, an existing compartment with the same name will be automatically imported into the state. Properties of the existing compartment will be updated to what is defined in the new configuration. This can cause a problem if multiple Terraform configurations are using the same compartment, but, for example, specify a different compartment description.
15
17
16
18
Specify the parent compartment's OCID as the compartment ID in the request object. Remember that the tenancy
17
19
is simply the root compartment. For information about OCIDs, see
*`compartment_id` - (Required) The OCID of the parent compartment containing the compartment.
51
+
*`compartment_id` - (Required) The OCID of the parent compartment containing the compartment. In most cases, the 'compartment_id' will be the 'tenancy_ocid' with the exception of nested compartments.
50
52
*`defined_tags` - (Optional) (Updatable) Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Operations.CostCenter": "42"}`
51
53
*`description` - (Required) (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
52
54
*`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](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm). Example: `{"Department": "Finance"}`
53
55
*`name` - (Required) (Updatable) The name you assign to the compartment during creation. The name must be unique across all compartments in the parent compartment. Avoid entering confidential information.
54
-
*`enable_delete` - (Optional) Defaults to false. If omitted or set to false the provider will implicitly import the compartment if there is a name collision, and will not actually delete the compartment on destroy or removal of the resource declaration. If set to true, the provider will throw an error on a name collision with another compartment, and will attempt to delete the compartment on destroy or removal of the resource declaration.
56
+
*`enable_delete` - (Optional) Defaults to false. If omitted or set to false the provider will implicitly import the compartment if there is a name collision, and will not actually delete the compartment on destroy or removal of the resource declaration. If set to true, the provider will throw an error on a name collision with another compartment, and will attempt to delete the compartment on destroy or removal of the resource declaration.
0 commit comments