1. Packages
  2. Oracle Cloud Infrastructure
  3. API Docs
  4. Identity
  5. TagDefault
Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi

oci.Identity.TagDefault

Explore with Pulumi AI

oci logo
Oracle Cloud Infrastructure v1.27.0 published on Friday, Mar 15, 2024 by Pulumi

    This resource provides the Tag Default resource in Oracle Cloud Infrastructure Identity service.

    Creates a new tag default in the specified compartment for the specified tag definition.

    If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to “true”, the value is set during resource creation.
    • If the isRequired flag is set to “false”, the value you enter is set during resource creation.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as oci from "@pulumi/oci";
    
    const testTagDefault = new oci.identity.TagDefault("testTagDefault", {
        compartmentId: _var.compartment_id,
        tagDefinitionId: oci_identity_tag_definition.test_tag_definition.id,
        value: _var.tag_default_value,
        isRequired: _var.tag_default_is_required,
    });
    
    import pulumi
    import pulumi_oci as oci
    
    test_tag_default = oci.identity.TagDefault("testTagDefault",
        compartment_id=var["compartment_id"],
        tag_definition_id=oci_identity_tag_definition["test_tag_definition"]["id"],
        value=var["tag_default_value"],
        is_required=var["tag_default_is_required"])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-oci/sdk/go/oci/Identity"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := Identity.NewTagDefault(ctx, "testTagDefault", &Identity.TagDefaultArgs{
    			CompartmentId:   pulumi.Any(_var.Compartment_id),
    			TagDefinitionId: pulumi.Any(oci_identity_tag_definition.Test_tag_definition.Id),
    			Value:           pulumi.Any(_var.Tag_default_value),
    			IsRequired:      pulumi.Any(_var.Tag_default_is_required),
    		})
    		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 testTagDefault = new Oci.Identity.TagDefault("testTagDefault", new()
        {
            CompartmentId = @var.Compartment_id,
            TagDefinitionId = oci_identity_tag_definition.Test_tag_definition.Id,
            Value = @var.Tag_default_value,
            IsRequired = @var.Tag_default_is_required,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.oci.Identity.TagDefault;
    import com.pulumi.oci.Identity.TagDefaultArgs;
    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 testTagDefault = new TagDefault("testTagDefault", TagDefaultArgs.builder()        
                .compartmentId(var_.compartment_id())
                .tagDefinitionId(oci_identity_tag_definition.test_tag_definition().id())
                .value(var_.tag_default_value())
                .isRequired(var_.tag_default_is_required())
                .build());
    
        }
    }
    
    resources:
      testTagDefault:
        type: oci:Identity:TagDefault
        properties:
          #Required
          compartmentId: ${var.compartment_id}
          tagDefinitionId: ${oci_identity_tag_definition.test_tag_definition.id}
          value: ${var.tag_default_value}
          #Optional
          isRequired: ${var.tag_default_is_required}
    

    Create TagDefault Resource

    new TagDefault(name: string, args: TagDefaultArgs, opts?: CustomResourceOptions);
    @overload
    def TagDefault(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   compartment_id: Optional[str] = None,
                   is_required: Optional[bool] = None,
                   tag_definition_id: Optional[str] = None,
                   value: Optional[str] = None)
    @overload
    def TagDefault(resource_name: str,
                   args: TagDefaultArgs,
                   opts: Optional[ResourceOptions] = None)
    func NewTagDefault(ctx *Context, name string, args TagDefaultArgs, opts ...ResourceOption) (*TagDefault, error)
    public TagDefault(string name, TagDefaultArgs args, CustomResourceOptions? opts = null)
    public TagDefault(String name, TagDefaultArgs args)
    public TagDefault(String name, TagDefaultArgs args, CustomResourceOptions options)
    
    type: oci:Identity:TagDefault
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args TagDefaultArgs
    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 TagDefaultArgs
    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 TagDefaultArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TagDefaultArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TagDefaultArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    TagDefault 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 TagDefault resource accepts the following input properties:

    CompartmentId string
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    TagDefinitionId string
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    Value string

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    IsRequired bool

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    CompartmentId string
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    TagDefinitionId string
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    Value string

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    IsRequired bool

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    compartmentId String
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    tagDefinitionId String
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    value String

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    isRequired Boolean

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    compartmentId string
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    tagDefinitionId string
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    value string

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    isRequired boolean

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    compartment_id str
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    tag_definition_id str
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    value str

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    is_required bool

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    compartmentId String
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    tagDefinitionId String
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    value String

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    isRequired Boolean

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    State string
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    TagDefinitionName string
    The name used in the tag definition. This field is informational in the context of the tag default.
    TagNamespaceId string
    The OCID of the tag namespace that contains the tag definition.
    TimeCreated string
    Date and time the TagDefault object 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.
    State string
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    TagDefinitionName string
    The name used in the tag definition. This field is informational in the context of the tag default.
    TagNamespaceId string
    The OCID of the tag namespace that contains the tag definition.
    TimeCreated string
    Date and time the TagDefault object 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.
    state String
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    tagDefinitionName String
    The name used in the tag definition. This field is informational in the context of the tag default.
    tagNamespaceId String
    The OCID of the tag namespace that contains the tag definition.
    timeCreated String
    Date and time the TagDefault object 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.
    state string
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    tagDefinitionName string
    The name used in the tag definition. This field is informational in the context of the tag default.
    tagNamespaceId string
    The OCID of the tag namespace that contains the tag definition.
    timeCreated string
    Date and time the TagDefault object 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.
    state str
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    tag_definition_name str
    The name used in the tag definition. This field is informational in the context of the tag default.
    tag_namespace_id str
    The OCID of the tag namespace that contains the tag definition.
    time_created str
    Date and time the TagDefault object 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.
    state String
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    tagDefinitionName String
    The name used in the tag definition. This field is informational in the context of the tag default.
    tagNamespaceId String
    The OCID of the tag namespace that contains the tag definition.
    timeCreated String
    Date and time the TagDefault object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z

    Look up Existing TagDefault Resource

    Get an existing TagDefault 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?: TagDefaultState, opts?: CustomResourceOptions): TagDefault
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            compartment_id: Optional[str] = None,
            is_required: Optional[bool] = None,
            state: Optional[str] = None,
            tag_definition_id: Optional[str] = None,
            tag_definition_name: Optional[str] = None,
            tag_namespace_id: Optional[str] = None,
            time_created: Optional[str] = None,
            value: Optional[str] = None) -> TagDefault
    func GetTagDefault(ctx *Context, name string, id IDInput, state *TagDefaultState, opts ...ResourceOption) (*TagDefault, error)
    public static TagDefault Get(string name, Input<string> id, TagDefaultState? state, CustomResourceOptions? opts = null)
    public static TagDefault get(String name, Output<String> id, TagDefaultState 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
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    IsRequired bool

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    State string
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    TagDefinitionId string
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    TagDefinitionName string
    The name used in the tag definition. This field is informational in the context of the tag default.
    TagNamespaceId string
    The OCID of the tag namespace that contains the tag definition.
    TimeCreated string
    Date and time the TagDefault object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    Value string

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    CompartmentId string
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    IsRequired bool

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    State string
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    TagDefinitionId string
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    TagDefinitionName string
    The name used in the tag definition. This field is informational in the context of the tag default.
    TagNamespaceId string
    The OCID of the tag namespace that contains the tag definition.
    TimeCreated string
    Date and time the TagDefault object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    Value string

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    compartmentId String
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    isRequired Boolean

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    state String
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    tagDefinitionId String
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    tagDefinitionName String
    The name used in the tag definition. This field is informational in the context of the tag default.
    tagNamespaceId String
    The OCID of the tag namespace that contains the tag definition.
    timeCreated String
    Date and time the TagDefault object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    value String

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    compartmentId string
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    isRequired boolean

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    state string
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    tagDefinitionId string
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    tagDefinitionName string
    The name used in the tag definition. This field is informational in the context of the tag default.
    tagNamespaceId string
    The OCID of the tag namespace that contains the tag definition.
    timeCreated string
    Date and time the TagDefault object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    value string

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    compartment_id str
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    is_required bool

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    state str
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    tag_definition_id str
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    tag_definition_name str
    The name used in the tag definition. This field is informational in the context of the tag default.
    tag_namespace_id str
    The OCID of the tag namespace that contains the tag definition.
    time_created str
    Date and time the TagDefault object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    value str

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    compartmentId String
    The OCID of the compartment. The tag default will be applied to all new resources created in this compartment.
    isRequired Boolean

    (Updatable) If you specify that a value is required, a value is set during resource creation (either by the user creating the resource or another tag defualt). If no value is set, resource creation is blocked.

    • If the isRequired flag is set to "true", the value is set during resource creation.
    • If the isRequired flag is set to "false", the value you enter is set during resource creation.

    Example: false

    state String
    The tag default's current state. After creating a TagDefault, make sure its lifecycleState is ACTIVE before using it.
    tagDefinitionId String
    The OCID of the tag definition. The tag default will always assign a default value for this tag definition.
    tagDefinitionName String
    The name used in the tag definition. This field is informational in the context of the tag default.
    tagNamespaceId String
    The OCID of the tag namespace that contains the tag definition.
    timeCreated String
    Date and time the TagDefault object was created, in the format defined by RFC3339. Example: 2016-08-25T21:10:29.600Z
    value String

    (Updatable) The default value for the tag definition. This will be applied to all new resources created in the compartment.

    ** 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

    Import

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

    $ pulumi import oci:Identity/tagDefault:TagDefault test_tag_default "id"
    

    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 v1.27.0 published on Friday, Mar 15, 2024 by Pulumi