Skip to content

Commit 158a9d8

Browse files
committed
fixing compartment resource docs
1 parent 1419d54 commit 158a9d8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

website/docs/r/identity_compartment.html.markdown

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,9 @@ This resource provides the Compartment resource in Oracle Cloud Infrastructure I
1212

1313
Creates a new compartment in the specified compartment.
1414

15-
**Important:** Compartments cannot be deleted.
15+
**Important:** Unless `enable_delete` is explicitly set to true:
16+
* Terraform will not delete compartments on destroy, and
17+
* For backwards compatibility, an existing compartment (not including root 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.
1618

1719
Specify the parent compartment's OCID as the compartment ID in the request object. Remember that the tenancy
1820
is simply the root compartment. For information about OCIDs, see
@@ -52,7 +54,7 @@ The following arguments are supported:
5254
* `description` - (Required) (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
5355
* `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"}`
5456
* `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.
55-
57+
* `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.
5658

5759
** IMPORTANT **
5860
Any change to a property that does not support update will force the destruction and recreation of the resource with the new property values

0 commit comments

Comments
 (0)