1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Identity
  5. Compartment
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

oci.Identity.Compartment

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi

    Example Usage

    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 pulumi
    import pulumi_oci as oci
    
    test_compartment = oci.identity.Compartment("test_compartment",
        compartment_id=compartment_id,
        description=compartment_description,
        name=compartment_name,
        defined_tags={
            "Operations.CostCenter": "42",
        },
        freeform_tags={
            "Department": "Finance",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/v2/go/oci/Identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Identity.NewCompartment(ctx, "test_compartment", &Identity.CompartmentArgs{
    			CompartmentId: pulumi.Any(compartmentId),
    			Description:   pulumi.Any(compartmentDescription),
    			Name:          pulumi.Any(compartmentName),
    			DefinedTags: pulumi.StringMap{
    				"Operations.CostCenter": pulumi.String("42"),
    			},
    			FreeformTags: pulumi.StringMap{
    				"Department": pulumi.String("Finance"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Oci = Pulumi.Oci;
    
    return await Deployment.RunAsync(() => 
    {
        var testCompartment = new Oci.Identity.Compartment("test_compartment", new()
        {
            CompartmentId = compartmentId,
            Description = compartmentDescription,
            Name = compartmentName,
            DefinedTags = 
            {
                { "Operations.CostCenter", "42" },
            },
            FreeformTags = 
            {
                { "Department", "Finance" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Identity.Compartment;
    import com.pulumi.oci.Identity.CompartmentArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            var testCompartment = new Compartment("testCompartment", CompartmentArgs.builder()
                .compartmentId(compartmentId)
                .description(compartmentDescription)
                .name(compartmentName)
                .definedTags(Map.of("Operations.CostCenter", "42"))
                .freeformTags(Map.of("Department", "Finance"))
                .build());
    
        }
    }
    
    resources:
      testCompartment:
        type: oci:Identity:Compartment
        name: test_compartment
        properties:
          compartmentId: ${compartmentId}
          description: ${compartmentDescription}
          name: ${compartmentName}
          definedTags:
            Operations.CostCenter: '42'
          freeformTags:
            Department: Finance
    

    Create Compartment Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new Compartment(name: string, args: CompartmentArgs, opts?: CustomResourceOptions);
    @overload
    def Compartment(resource_name: str,
                    args: CompartmentArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def Compartment(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    description: Optional[str] = None,
                    compartment_id: Optional[str] = None,
                    defined_tags: Optional[Mapping[str, str]] = None,
                    enable_delete: Optional[bool] = None,
                    freeform_tags: Optional[Mapping[str, str]] = None,
                    name: Optional[str] = None)
    func NewCompartment(ctx *Context, name string, args CompartmentArgs, opts ...ResourceOption) (*Compartment, error)
    public Compartment(string name, CompartmentArgs args, CustomResourceOptions? opts = null)
    public Compartment(String name, CompartmentArgs args)
    public Compartment(String name, CompartmentArgs args, CustomResourceOptions options)
    
    type: oci:Identity:Compartment
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args CompartmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args CompartmentArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args CompartmentArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args CompartmentArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args CompartmentArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

    The following reference example uses placeholder values for all input properties.

    var compartmentResource = new Oci.Identity.Compartment("compartmentResource", new()
    {
        Description = "string",
        CompartmentId = "string",
        DefinedTags = 
        {
            { "string", "string" },
        },
        EnableDelete = false,
        FreeformTags = 
        {
            { "string", "string" },
        },
        Name = "string",
    });
    
    example, err := Identity.NewCompartment(ctx, "compartmentResource", &Identity.CompartmentArgs{
    	Description:   pulumi.String("string"),
    	CompartmentId: pulumi.String("string"),
    	DefinedTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	EnableDelete: pulumi.Bool(false),
    	FreeformTags: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Name: pulumi.String("string"),
    })
    
    var compartmentResource = new Compartment("compartmentResource", CompartmentArgs.builder()
        .description("string")
        .compartmentId("string")
        .definedTags(Map.of("string", "string"))
        .enableDelete(false)
        .freeformTags(Map.of("string", "string"))
        .name("string")
        .build());
    
    compartment_resource = oci.identity.Compartment("compartmentResource",
        description="string",
        compartment_id="string",
        defined_tags={
            "string": "string",
        },
        enable_delete=False,
        freeform_tags={
            "string": "string",
        },
        name="string")
    
    const compartmentResource = new oci.identity.Compartment("compartmentResource", {
        description: "string",
        compartmentId: "string",
        definedTags: {
            string: "string",
        },
        enableDelete: false,
        freeformTags: {
            string: "string",
        },
        name: "string",
    });
    
    type: oci:Identity:Compartment
    properties:
        compartmentId: string
        definedTags:
            string: string
        description: string
        enableDelete: false
        freeformTags:
            string: string
        name: string
    

    Compartment Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The Compartment resource accepts the following input properties:

    Description string
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    CompartmentId string
    (Updatable) The OCID of the parent compartment containing the compartment.
    DefinedTags Dictionary<string, string>
    (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"}
    EnableDelete bool

    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

    FreeformTags Dictionary<string, string>
    (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"}
    Name string
    (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.
    Description string
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    CompartmentId string
    (Updatable) The OCID of the parent compartment containing the compartment.
    DefinedTags map[string]string
    (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"}
    EnableDelete bool

    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

    FreeformTags map[string]string
    (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"}
    Name string
    (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.
    description String
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    compartmentId String
    (Updatable) The OCID of the parent compartment containing the compartment.
    definedTags Map<String,String>
    (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"}
    enableDelete Boolean

    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

    freeformTags Map<String,String>
    (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"}
    name String
    (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.
    description string
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    compartmentId string
    (Updatable) The OCID of the parent compartment containing the compartment.
    definedTags {[key: string]: string}
    (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"}
    enableDelete boolean

    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

    freeformTags {[key: string]: string}
    (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"}
    name string
    (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.
    description str
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    compartment_id str
    (Updatable) The OCID of the parent compartment containing the compartment.
    defined_tags Mapping[str, str]
    (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"}
    enable_delete bool

    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

    freeform_tags Mapping[str, str]
    (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"}
    name str
    (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.
    description String
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    compartmentId String
    (Updatable) The OCID of the parent compartment containing the compartment.
    definedTags Map<String>
    (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"}
    enableDelete Boolean

    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

    freeformTags Map<String>
    (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"}
    name String
    (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.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the Compartment resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    InactiveState string
    The detailed status of INACTIVE lifecycleState.
    IsAccessible bool
    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).
    State string
    The compartment's current state.
    TimeCreated string
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    Id string
    The provider-assigned unique ID for this managed resource.
    InactiveState string
    The detailed status of INACTIVE lifecycleState.
    IsAccessible bool
    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).
    State string
    The compartment's current state.
    TimeCreated string
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    inactiveState String
    The detailed status of INACTIVE lifecycleState.
    isAccessible Boolean
    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).
    state String
    The compartment's current state.
    timeCreated String
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    id string
    The provider-assigned unique ID for this managed resource.
    inactiveState string
    The detailed status of INACTIVE lifecycleState.
    isAccessible boolean
    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).
    state string
    The compartment's current state.
    timeCreated string
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    id str
    The provider-assigned unique ID for this managed resource.
    inactive_state str
    The detailed status of INACTIVE lifecycleState.
    is_accessible bool
    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).
    state str
    The compartment's current state.
    time_created str
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    id String
    The provider-assigned unique ID for this managed resource.
    inactiveState String
    The detailed status of INACTIVE lifecycleState.
    isAccessible Boolean
    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).
    state String
    The compartment's current state.
    timeCreated String
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    Look up Existing Compartment Resource

    Get an existing Compartment resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: CompartmentState, opts?: CustomResourceOptions): Compartment
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            defined_tags: Optional[Mapping[str, str]] = None,
            description: Optional[str] = None,
            enable_delete: Optional[bool] = None,
            freeform_tags: Optional[Mapping[str, str]] = None,
            inactive_state: Optional[str] = None,
            is_accessible: Optional[bool] = None,
            name: Optional[str] = None,
            state: Optional[str] = None,
            time_created: Optional[str] = None) -> Compartment
    func GetCompartment(ctx *Context, name string, id IDInput, state *CompartmentState, opts ...ResourceOption) (*Compartment, error)
    public static Compartment Get(string name, Input<string> id, CompartmentState? state, CustomResourceOptions? opts = null)
    public static Compartment get(String name, Output<String> id, CompartmentState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    CompartmentId string
    (Updatable) The OCID of the parent compartment containing the compartment.
    DefinedTags Dictionary<string, string>
    (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"}
    Description string
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    EnableDelete bool

    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

    FreeformTags Dictionary<string, string>
    (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"}
    InactiveState string
    The detailed status of INACTIVE lifecycleState.
    IsAccessible bool
    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).
    Name string
    (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.
    State string
    The compartment's current state.
    TimeCreated string
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    CompartmentId string
    (Updatable) The OCID of the parent compartment containing the compartment.
    DefinedTags map[string]string
    (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"}
    Description string
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    EnableDelete bool

    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

    FreeformTags map[string]string
    (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"}
    InactiveState string
    The detailed status of INACTIVE lifecycleState.
    IsAccessible bool
    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).
    Name string
    (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.
    State string
    The compartment's current state.
    TimeCreated string
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartmentId String
    (Updatable) The OCID of the parent compartment containing the compartment.
    definedTags Map<String,String>
    (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"}
    description String
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    enableDelete Boolean

    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

    freeformTags Map<String,String>
    (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"}
    inactiveState String
    The detailed status of INACTIVE lifecycleState.
    isAccessible Boolean
    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).
    name String
    (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.
    state String
    The compartment's current state.
    timeCreated String
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartmentId string
    (Updatable) The OCID of the parent compartment containing the compartment.
    definedTags {[key: string]: string}
    (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"}
    description string
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    enableDelete boolean

    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

    freeformTags {[key: string]: string}
    (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"}
    inactiveState string
    The detailed status of INACTIVE lifecycleState.
    isAccessible boolean
    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).
    name string
    (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.
    state string
    The compartment's current state.
    timeCreated string
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartment_id str
    (Updatable) The OCID of the parent compartment containing the compartment.
    defined_tags Mapping[str, str]
    (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"}
    description str
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    enable_delete bool

    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

    freeform_tags Mapping[str, str]
    (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"}
    inactive_state str
    The detailed status of INACTIVE lifecycleState.
    is_accessible bool
    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).
    name str
    (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.
    state str
    The compartment's current state.
    time_created str
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    compartmentId String
    (Updatable) The OCID of the parent compartment containing the compartment.
    definedTags Map<String>
    (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"}
    description String
    (Updatable) The description you assign to the compartment during creation. Does not have to be unique, and it's changeable.
    enableDelete Boolean

    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

    freeformTags Map<String>
    (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"}
    inactiveState String
    The detailed status of INACTIVE lifecycleState.
    isAccessible Boolean
    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).
    name String
    (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.
    state String
    The compartment's current state.
    timeCreated String
    Date and time the compartment was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    Import

    Compartments can be imported using the id, e.g.

    $ pulumi import oci:Identity/compartment:Compartment test_compartment "id"
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    oci pulumi/pulumi-oci
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the oci Terraform Provider.
    oci logo
    Oracle Cloud Infrastructure v2.11.0 published on Thursday, Sep 19, 2024 by Pulumi