import * as pulumi from "@pulumi/pulumi"; /** * This resource provides the Compartment resource in Oracle Cloud Infrastructure Identity service. * Api doc link for the resource: https://docs.oracle.com/iaas/api/#/en/identity/latest/Compartment * * Example terraform configs related to the resource : https://github.com/oracle/terraform-provider-oci/tree/master/examples/identity * * Creates a new compartment in the specified compartment. * * **Important:** Unless `enableDelete` is explicitly set to true: * * Terraform will not delete compartments on destroy, and * * 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. * * Specify the parent compartment's OCID as the compartment ID in the request object. Remember that the tenancy * is simply the root compartment. For information about OCIDs, see * [Resource Identifiers](https://docs.cloud.oracle.com/iaas/Content/General/Concepts/identifiers.htm). * * You must also specify a *name* for the compartment, which must be unique across all compartments in * your tenancy. You can use this name or the OCID when writing policies that apply * to the compartment. For more information about policies, see * [How Policies Work](https://docs.cloud.oracle.com/iaas/Content/Identity/Concepts/policies.htm). * * You must also specify a *description* for the compartment (although it can be an empty string). It does * not have to be unique, and you can change it anytime with * [UpdateCompartment](https://docs.cloud.oracle.com/iaas/api/#/en/identity/20160918/Compartment/UpdateCompartment). * * ## Example Usage * * ```typescript * import * as pulumi from "@pulumi/pulumi"; * import * as oci from "@pulumi/oci"; * * const testCompartment = new oci.identity.Compartment("test_compartment", { * compartmentId: compartmentId, * description: compartmentDescription, * name: compartmentName, * definedTags: { * "Operations.CostCenter": "42", * }, * freeformTags: { * Department: "Finance", * }, * }); * ``` * * ## Import * * Compartments can be imported using the `id`, e.g. * * ```sh * $ pulumi import oci:Identity/compartment:Compartment test_compartment "id" * ``` */ export declare class Compartment extends pulumi.CustomResource { /** * Get an existing Compartment resource's state with the given name, ID, and optional extra * properties used to qualify the lookup. * * @param name The _unique_ name of the resulting resource. * @param id The _unique_ provider ID of the resource to lookup. * @param state Any extra arguments used during the lookup. * @param opts Optional settings to control the behavior of the CustomResource. */ static get(name: string, id: pulumi.Input, state?: CompartmentState, opts?: pulumi.CustomResourceOptions): Compartment; /** * Returns true if the given object is an instance of Compartment. This is designed to work even * when multiple copies of the Pulumi SDK have been loaded into the same process. */ static isInstance(obj: any): obj is Compartment; /** * (Updatable) The OCID of the parent compartment containing the compartment. */ readonly compartmentId: pulumi.Output; /** * (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"}` */ readonly definedTags: pulumi.Output<{ [key: string]: string; }>; /** * (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable. */ readonly description: pulumi.Output; /** * 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. * * ** 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 */ readonly enableDelete: pulumi.Output; /** * (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"}` */ readonly freeformTags: pulumi.Output<{ [key: string]: string; }>; /** * The detailed status of INACTIVE lifecycleState. */ readonly inactiveState: pulumi.Output; /** * Indicates whether or not the compartment is accessible for the user making the request. Returns true when the user has INSPECT permissions directly on a resource in the compartment or indirectly (permissions can be on a resource in a subcompartment). */ readonly isAccessible: pulumi.Output; /** * (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. */ readonly name: pulumi.Output; /** * The compartment's current state. */ readonly state: pulumi.Output; /** * Date and time the compartment was created, in the format defined by RFC3339. Example: `2016-08-25T21:10:29.600Z` */ readonly timeCreated: pulumi.Output; /** * Create a Compartment resource with the given unique name, arguments, and options. * * @param name The _unique_ name of the resource. * @param args The arguments to use to populate this resource's properties. * @param opts A bag of options that control this resource's behavior. */ constructor(name: string, args: CompartmentArgs, opts?: pulumi.CustomResourceOptions); } /** * Input properties used for looking up and filtering Compartment resources. */ export interface CompartmentState { /** * (Updatable) The OCID of the parent compartment containing the compartment. */ compartmentId?: pulumi.Input; /** * (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"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable. */ description?: pulumi.Input; /** * 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. * * ** 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 */ enableDelete?: pulumi.Input; /** * (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"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * The detailed status of INACTIVE lifecycleState. */ inactiveState?: pulumi.Input; /** * Indicates whether or not the compartment is accessible for the user making the request. Returns true when the user has INSPECT permissions directly on a resource in the compartment or indirectly (permissions can be on a resource in a subcompartment). */ isAccessible?: pulumi.Input; /** * (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. */ name?: pulumi.Input; /** * The compartment's current state. */ state?: pulumi.Input; /** * Date and time the compartment was created, in the format defined by RFC3339. Example: `2016-08-25T21:10:29.600Z` */ timeCreated?: pulumi.Input; } /** * The set of arguments for constructing a Compartment resource. */ export interface CompartmentArgs { /** * (Updatable) The OCID of the parent compartment containing the compartment. */ compartmentId?: pulumi.Input; /** * (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"}` */ definedTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable. */ description: pulumi.Input; /** * 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. * * ** 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 */ enableDelete?: pulumi.Input; /** * (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"}` */ freeformTags?: pulumi.Input<{ [key: string]: pulumi.Input; } | undefined>; /** * (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. */ name?: pulumi.Input; } //# sourceMappingURL=compartment.d.ts.map