1. Packages
  2. Snowflake
  3. API Docs
  4. TagAssociation
Snowflake v0.52.0 published on Thursday, Apr 18, 2024 by Pulumi

snowflake.TagAssociation

Explore with Pulumi AI

snowflake logo
Snowflake v0.52.0 published on Thursday, Apr 18, 2024 by Pulumi

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as snowflake from "@pulumi/snowflake";
    
    const database = new snowflake.Database("database", {});
    const schema = new snowflake.Schema("schema", {database: database.name});
    const tag = new snowflake.Tag("tag", {
        database: database.name,
        schema: schema.name,
        allowedValues: [
            "finance",
            "engineering",
        ],
    });
    const dbAssociation = new snowflake.TagAssociation("dbAssociation", {
        objectIdentifiers: [{
            name: database.name,
        }],
        objectType: "DATABASE",
        tagId: tag.id,
        tagValue: "finance",
    });
    const test = new snowflake.Table("test", {
        database: snowflake_database.test.name,
        schema: snowflake_schema.test.name,
        comment: "Terraform example table",
        columns: [
            {
                name: "column1",
                type: "VARIANT",
            },
            {
                name: "column2",
                type: "VARCHAR(16)",
            },
        ],
    });
    const tableAssociation = new snowflake.TagAssociation("tableAssociation", {
        objectIdentifiers: [{
            name: test.name,
            database: snowflake_database.test.name,
            schema: snowflake_schema.test.name,
        }],
        objectType: "TABLE",
        tagId: snowflake_tag.test.id,
        tagValue: "engineering",
    });
    const columnAssociation = new snowflake.TagAssociation("columnAssociation", {
        objectIdentifiers: [{
            name: pulumi.interpolate`${test.name}.column_name`,
            database: snowflake_database.test.name,
            schema: snowflake_schema.test.name,
        }],
        objectType: "COLUMN",
        tagId: snowflake_tag.test.id,
        tagValue: "engineering",
    });
    
    import pulumi
    import pulumi_snowflake as snowflake
    
    database = snowflake.Database("database")
    schema = snowflake.Schema("schema", database=database.name)
    tag = snowflake.Tag("tag",
        database=database.name,
        schema=schema.name,
        allowed_values=[
            "finance",
            "engineering",
        ])
    db_association = snowflake.TagAssociation("dbAssociation",
        object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
            name=database.name,
        )],
        object_type="DATABASE",
        tag_id=tag.id,
        tag_value="finance")
    test = snowflake.Table("test",
        database=snowflake_database["test"]["name"],
        schema=snowflake_schema["test"]["name"],
        comment="Terraform example table",
        columns=[
            snowflake.TableColumnArgs(
                name="column1",
                type="VARIANT",
            ),
            snowflake.TableColumnArgs(
                name="column2",
                type="VARCHAR(16)",
            ),
        ])
    table_association = snowflake.TagAssociation("tableAssociation",
        object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
            name=test.name,
            database=snowflake_database["test"]["name"],
            schema=snowflake_schema["test"]["name"],
        )],
        object_type="TABLE",
        tag_id=snowflake_tag["test"]["id"],
        tag_value="engineering")
    column_association = snowflake.TagAssociation("columnAssociation",
        object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
            name=test.name.apply(lambda name: f"{name}.column_name"),
            database=snowflake_database["test"]["name"],
            schema=snowflake_schema["test"]["name"],
        )],
        object_type="COLUMN",
        tag_id=snowflake_tag["test"]["id"],
        tag_value="engineering")
    
    package main
    
    import (
    	"fmt"
    
    	"github.com/pulumi/pulumi-snowflake/sdk/go/snowflake"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		database, err := snowflake.NewDatabase(ctx, "database", nil)
    		if err != nil {
    			return err
    		}
    		schema, err := snowflake.NewSchema(ctx, "schema", &snowflake.SchemaArgs{
    			Database: database.Name,
    		})
    		if err != nil {
    			return err
    		}
    		tag, err := snowflake.NewTag(ctx, "tag", &snowflake.TagArgs{
    			Database: database.Name,
    			Schema:   schema.Name,
    			AllowedValues: pulumi.StringArray{
    				pulumi.String("finance"),
    				pulumi.String("engineering"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = snowflake.NewTagAssociation(ctx, "dbAssociation", &snowflake.TagAssociationArgs{
    			ObjectIdentifiers: snowflake.TagAssociationObjectIdentifierArray{
    				&snowflake.TagAssociationObjectIdentifierArgs{
    					Name: database.Name,
    				},
    			},
    			ObjectType: pulumi.String("DATABASE"),
    			TagId:      tag.ID(),
    			TagValue:   pulumi.String("finance"),
    		})
    		if err != nil {
    			return err
    		}
    		test, err := snowflake.NewTable(ctx, "test", &snowflake.TableArgs{
    			Database: pulumi.Any(snowflake_database.Test.Name),
    			Schema:   pulumi.Any(snowflake_schema.Test.Name),
    			Comment:  pulumi.String("Terraform example table"),
    			Columns: snowflake.TableColumnArray{
    				&snowflake.TableColumnArgs{
    					Name: pulumi.String("column1"),
    					Type: pulumi.String("VARIANT"),
    				},
    				&snowflake.TableColumnArgs{
    					Name: pulumi.String("column2"),
    					Type: pulumi.String("VARCHAR(16)"),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = snowflake.NewTagAssociation(ctx, "tableAssociation", &snowflake.TagAssociationArgs{
    			ObjectIdentifiers: snowflake.TagAssociationObjectIdentifierArray{
    				&snowflake.TagAssociationObjectIdentifierArgs{
    					Name:     test.Name,
    					Database: pulumi.Any(snowflake_database.Test.Name),
    					Schema:   pulumi.Any(snowflake_schema.Test.Name),
    				},
    			},
    			ObjectType: pulumi.String("TABLE"),
    			TagId:      pulumi.Any(snowflake_tag.Test.Id),
    			TagValue:   pulumi.String("engineering"),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = snowflake.NewTagAssociation(ctx, "columnAssociation", &snowflake.TagAssociationArgs{
    			ObjectIdentifiers: snowflake.TagAssociationObjectIdentifierArray{
    				&snowflake.TagAssociationObjectIdentifierArgs{
    					Name: test.Name.ApplyT(func(name string) (string, error) {
    						return fmt.Sprintf("%v.column_name", name), nil
    					}).(pulumi.StringOutput),
    					Database: pulumi.Any(snowflake_database.Test.Name),
    					Schema:   pulumi.Any(snowflake_schema.Test.Name),
    				},
    			},
    			ObjectType: pulumi.String("COLUMN"),
    			TagId:      pulumi.Any(snowflake_tag.Test.Id),
    			TagValue:   pulumi.String("engineering"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Snowflake = Pulumi.Snowflake;
    
    return await Deployment.RunAsync(() => 
    {
        var database = new Snowflake.Database("database");
    
        var schema = new Snowflake.Schema("schema", new()
        {
            Database = database.Name,
        });
    
        var tag = new Snowflake.Tag("tag", new()
        {
            Database = database.Name,
            Schema = schema.Name,
            AllowedValues = new[]
            {
                "finance",
                "engineering",
            },
        });
    
        var dbAssociation = new Snowflake.TagAssociation("dbAssociation", new()
        {
            ObjectIdentifiers = new[]
            {
                new Snowflake.Inputs.TagAssociationObjectIdentifierArgs
                {
                    Name = database.Name,
                },
            },
            ObjectType = "DATABASE",
            TagId = tag.Id,
            TagValue = "finance",
        });
    
        var test = new Snowflake.Table("test", new()
        {
            Database = snowflake_database.Test.Name,
            Schema = snowflake_schema.Test.Name,
            Comment = "Terraform example table",
            Columns = new[]
            {
                new Snowflake.Inputs.TableColumnArgs
                {
                    Name = "column1",
                    Type = "VARIANT",
                },
                new Snowflake.Inputs.TableColumnArgs
                {
                    Name = "column2",
                    Type = "VARCHAR(16)",
                },
            },
        });
    
        var tableAssociation = new Snowflake.TagAssociation("tableAssociation", new()
        {
            ObjectIdentifiers = new[]
            {
                new Snowflake.Inputs.TagAssociationObjectIdentifierArgs
                {
                    Name = test.Name,
                    Database = snowflake_database.Test.Name,
                    Schema = snowflake_schema.Test.Name,
                },
            },
            ObjectType = "TABLE",
            TagId = snowflake_tag.Test.Id,
            TagValue = "engineering",
        });
    
        var columnAssociation = new Snowflake.TagAssociation("columnAssociation", new()
        {
            ObjectIdentifiers = new[]
            {
                new Snowflake.Inputs.TagAssociationObjectIdentifierArgs
                {
                    Name = test.Name.Apply(name => $"{name}.column_name"),
                    Database = snowflake_database.Test.Name,
                    Schema = snowflake_schema.Test.Name,
                },
            },
            ObjectType = "COLUMN",
            TagId = snowflake_tag.Test.Id,
            TagValue = "engineering",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.snowflake.Database;
    import com.pulumi.snowflake.Schema;
    import com.pulumi.snowflake.SchemaArgs;
    import com.pulumi.snowflake.Tag;
    import com.pulumi.snowflake.TagArgs;
    import com.pulumi.snowflake.TagAssociation;
    import com.pulumi.snowflake.TagAssociationArgs;
    import com.pulumi.snowflake.inputs.TagAssociationObjectIdentifierArgs;
    import com.pulumi.snowflake.Table;
    import com.pulumi.snowflake.TableArgs;
    import com.pulumi.snowflake.inputs.TableColumnArgs;
    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 database = new Database("database");
    
            var schema = new Schema("schema", SchemaArgs.builder()        
                .database(database.name())
                .build());
    
            var tag = new Tag("tag", TagArgs.builder()        
                .database(database.name())
                .schema(schema.name())
                .allowedValues(            
                    "finance",
                    "engineering")
                .build());
    
            var dbAssociation = new TagAssociation("dbAssociation", TagAssociationArgs.builder()        
                .objectIdentifiers(TagAssociationObjectIdentifierArgs.builder()
                    .name(database.name())
                    .build())
                .objectType("DATABASE")
                .tagId(tag.id())
                .tagValue("finance")
                .build());
    
            var test = new Table("test", TableArgs.builder()        
                .database(snowflake_database.test().name())
                .schema(snowflake_schema.test().name())
                .comment("Terraform example table")
                .columns(            
                    TableColumnArgs.builder()
                        .name("column1")
                        .type("VARIANT")
                        .build(),
                    TableColumnArgs.builder()
                        .name("column2")
                        .type("VARCHAR(16)")
                        .build())
                .build());
    
            var tableAssociation = new TagAssociation("tableAssociation", TagAssociationArgs.builder()        
                .objectIdentifiers(TagAssociationObjectIdentifierArgs.builder()
                    .name(test.name())
                    .database(snowflake_database.test().name())
                    .schema(snowflake_schema.test().name())
                    .build())
                .objectType("TABLE")
                .tagId(snowflake_tag.test().id())
                .tagValue("engineering")
                .build());
    
            var columnAssociation = new TagAssociation("columnAssociation", TagAssociationArgs.builder()        
                .objectIdentifiers(TagAssociationObjectIdentifierArgs.builder()
                    .name(test.name().applyValue(name -> String.format("%s.column_name", name)))
                    .database(snowflake_database.test().name())
                    .schema(snowflake_schema.test().name())
                    .build())
                .objectType("COLUMN")
                .tagId(snowflake_tag.test().id())
                .tagValue("engineering")
                .build());
    
        }
    }
    
    resources:
      database:
        type: snowflake:Database
      schema:
        type: snowflake:Schema
        properties:
          database: ${database.name}
      tag:
        type: snowflake:Tag
        properties:
          database: ${database.name}
          schema: ${schema.name}
          allowedValues:
            - finance
            - engineering
      dbAssociation:
        type: snowflake:TagAssociation
        properties:
          objectIdentifiers:
            - name: ${database.name}
          objectType: DATABASE
          tagId: ${tag.id}
          tagValue: finance
      test:
        type: snowflake:Table
        properties:
          database: ${snowflake_database.test.name}
          schema: ${snowflake_schema.test.name}
          comment: Terraform example table
          columns:
            - name: column1
              type: VARIANT
            - name: column2
              type: VARCHAR(16)
      tableAssociation:
        type: snowflake:TagAssociation
        properties:
          objectIdentifiers:
            - name: ${test.name}
              database: ${snowflake_database.test.name}
              schema: ${snowflake_schema.test.name}
          objectType: TABLE
          tagId: ${snowflake_tag.test.id}
          tagValue: engineering
      columnAssociation:
        type: snowflake:TagAssociation
        properties:
          objectIdentifiers:
            - name: ${test.name}.column_name
              database: ${snowflake_database.test.name}
              schema: ${snowflake_schema.test.name}
          objectType: COLUMN
          tagId: ${snowflake_tag.test.id}
          tagValue: engineering
    

    Create TagAssociation Resource

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

    Constructor syntax

    new TagAssociation(name: string, args: TagAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def TagAssociation(resource_name: str,
                       args: TagAssociationArgs,
                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def TagAssociation(resource_name: str,
                       opts: Optional[ResourceOptions] = None,
                       object_identifiers: Optional[Sequence[TagAssociationObjectIdentifierArgs]] = None,
                       object_type: Optional[str] = None,
                       tag_id: Optional[str] = None,
                       tag_value: Optional[str] = None,
                       object_name: Optional[str] = None,
                       skip_validation: Optional[bool] = None)
    func NewTagAssociation(ctx *Context, name string, args TagAssociationArgs, opts ...ResourceOption) (*TagAssociation, error)
    public TagAssociation(string name, TagAssociationArgs args, CustomResourceOptions? opts = null)
    public TagAssociation(String name, TagAssociationArgs args)
    public TagAssociation(String name, TagAssociationArgs args, CustomResourceOptions options)
    
    type: snowflake:TagAssociation
    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 TagAssociationArgs
    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 TagAssociationArgs
    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 TagAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TagAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TagAssociationArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

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

    var tagAssociationResource = new Snowflake.TagAssociation("tagAssociationResource", new()
    {
        ObjectIdentifiers = new[]
        {
            new Snowflake.Inputs.TagAssociationObjectIdentifierArgs
            {
                Name = "string",
                Database = "string",
                Schema = "string",
            },
        },
        ObjectType = "string",
        TagId = "string",
        TagValue = "string",
        SkipValidation = false,
    });
    
    example, err := snowflake.NewTagAssociation(ctx, "tagAssociationResource", &snowflake.TagAssociationArgs{
    	ObjectIdentifiers: snowflake.TagAssociationObjectIdentifierArray{
    		&snowflake.TagAssociationObjectIdentifierArgs{
    			Name:     pulumi.String("string"),
    			Database: pulumi.String("string"),
    			Schema:   pulumi.String("string"),
    		},
    	},
    	ObjectType:     pulumi.String("string"),
    	TagId:          pulumi.String("string"),
    	TagValue:       pulumi.String("string"),
    	SkipValidation: pulumi.Bool(false),
    })
    
    var tagAssociationResource = new TagAssociation("tagAssociationResource", TagAssociationArgs.builder()        
        .objectIdentifiers(TagAssociationObjectIdentifierArgs.builder()
            .name("string")
            .database("string")
            .schema("string")
            .build())
        .objectType("string")
        .tagId("string")
        .tagValue("string")
        .skipValidation(false)
        .build());
    
    tag_association_resource = snowflake.TagAssociation("tagAssociationResource",
        object_identifiers=[snowflake.TagAssociationObjectIdentifierArgs(
            name="string",
            database="string",
            schema="string",
        )],
        object_type="string",
        tag_id="string",
        tag_value="string",
        skip_validation=False)
    
    const tagAssociationResource = new snowflake.TagAssociation("tagAssociationResource", {
        objectIdentifiers: [{
            name: "string",
            database: "string",
            schema: "string",
        }],
        objectType: "string",
        tagId: "string",
        tagValue: "string",
        skipValidation: false,
    });
    
    type: snowflake:TagAssociation
    properties:
        objectIdentifiers:
            - database: string
              name: string
              schema: string
        objectType: string
        skipValidation: false
        tagId: string
        tagValue: string
    

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

    ObjectIdentifiers List<TagAssociationObjectIdentifier>
    Specifies the object identifier for the tag association.
    ObjectType string
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    TagId string
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    TagValue string
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')
    ObjectName string
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    SkipValidation bool
    If true, skips validation of the tag association.
    ObjectIdentifiers []TagAssociationObjectIdentifierArgs
    Specifies the object identifier for the tag association.
    ObjectType string
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    TagId string
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    TagValue string
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')
    ObjectName string
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    SkipValidation bool
    If true, skips validation of the tag association.
    objectIdentifiers List<TagAssociationObjectIdentifier>
    Specifies the object identifier for the tag association.
    objectType String
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    tagId String
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    tagValue String
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')
    objectName String
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    skipValidation Boolean
    If true, skips validation of the tag association.
    objectIdentifiers TagAssociationObjectIdentifier[]
    Specifies the object identifier for the tag association.
    objectType string
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    tagId string
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    tagValue string
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')
    objectName string
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    skipValidation boolean
    If true, skips validation of the tag association.
    object_identifiers Sequence[TagAssociationObjectIdentifierArgs]
    Specifies the object identifier for the tag association.
    object_type str
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    tag_id str
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    tag_value str
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')
    object_name str
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    skip_validation bool
    If true, skips validation of the tag association.
    objectIdentifiers List<Property Map>
    Specifies the object identifier for the tag association.
    objectType String
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    tagId String
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    tagValue String
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')
    objectName String
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    skipValidation Boolean
    If true, skips validation of the tag association.

    Outputs

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

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing TagAssociation Resource

    Get an existing TagAssociation 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?: TagAssociationState, opts?: CustomResourceOptions): TagAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            object_identifiers: Optional[Sequence[TagAssociationObjectIdentifierArgs]] = None,
            object_name: Optional[str] = None,
            object_type: Optional[str] = None,
            skip_validation: Optional[bool] = None,
            tag_id: Optional[str] = None,
            tag_value: Optional[str] = None) -> TagAssociation
    func GetTagAssociation(ctx *Context, name string, id IDInput, state *TagAssociationState, opts ...ResourceOption) (*TagAssociation, error)
    public static TagAssociation Get(string name, Input<string> id, TagAssociationState? state, CustomResourceOptions? opts = null)
    public static TagAssociation get(String name, Output<String> id, TagAssociationState 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:
    ObjectIdentifiers List<TagAssociationObjectIdentifier>
    Specifies the object identifier for the tag association.
    ObjectName string
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    ObjectType string
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    SkipValidation bool
    If true, skips validation of the tag association.
    TagId string
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    TagValue string
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')
    ObjectIdentifiers []TagAssociationObjectIdentifierArgs
    Specifies the object identifier for the tag association.
    ObjectName string
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    ObjectType string
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    SkipValidation bool
    If true, skips validation of the tag association.
    TagId string
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    TagValue string
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')
    objectIdentifiers List<TagAssociationObjectIdentifier>
    Specifies the object identifier for the tag association.
    objectName String
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    objectType String
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    skipValidation Boolean
    If true, skips validation of the tag association.
    tagId String
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    tagValue String
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')
    objectIdentifiers TagAssociationObjectIdentifier[]
    Specifies the object identifier for the tag association.
    objectName string
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    objectType string
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    skipValidation boolean
    If true, skips validation of the tag association.
    tagId string
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    tagValue string
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')
    object_identifiers Sequence[TagAssociationObjectIdentifierArgs]
    Specifies the object identifier for the tag association.
    object_name str
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    object_type str
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    skip_validation bool
    If true, skips validation of the tag association.
    tag_id str
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    tag_value str
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')
    objectIdentifiers List<Property Map>
    Specifies the object identifier for the tag association.
    objectName String
    Specifies the object identifier for the tag association.

    Deprecated: Use object_identifier instead

    objectType String
    Specifies the type of object to add a tag. Allowed object types: [ACCOUNT APPLICATION APPLICATION PACKAGE DATABASE INTEGRATION NETWORK POLICY ROLE SHARE USER WAREHOUSE DATABASE ROLE SCHEMA ALERT EXTERNAL FUNCTION EXTERNAL TABLE GIT REPOSITORY ICEBERG TABLE MATERIALIZED VIEW PIPE MASKING POLICY PASSWORD POLICY ROW ACCESS POLICY SESSION POLICY PROCEDURE STAGE STREAM TABLE TASK VIEW COLUMN EVENT TABLE].
    skipValidation Boolean
    If true, skips validation of the tag association.
    tagId String
    Specifies the identifier for the tag. Note: format must follow: "databaseName"."schemaName"."tagName" or "databaseName.schemaName.tagName" or "databaseName|schemaName.tagName" (snowflake_tag.tag.id)
    tagValue String
    Specifies the value of the tag, (e.g. 'finance' or 'engineering')

    Supporting Types

    TagAssociationObjectIdentifier, TagAssociationObjectIdentifierArgs

    Name string
    Name of the object to associate the tag with.
    Database string
    Name of the database that the object was created in.
    Schema string
    Name of the schema that the object was created in.
    Name string
    Name of the object to associate the tag with.
    Database string
    Name of the database that the object was created in.
    Schema string
    Name of the schema that the object was created in.
    name String
    Name of the object to associate the tag with.
    database String
    Name of the database that the object was created in.
    schema String
    Name of the schema that the object was created in.
    name string
    Name of the object to associate the tag with.
    database string
    Name of the database that the object was created in.
    schema string
    Name of the schema that the object was created in.
    name str
    Name of the object to associate the tag with.
    database str
    Name of the database that the object was created in.
    schema str
    Name of the schema that the object was created in.
    name String
    Name of the object to associate the tag with.
    database String
    Name of the database that the object was created in.
    schema String
    Name of the schema that the object was created in.

    Import

    format is dbName.schemaName.tagName or dbName.schemaName.tagName

    $ pulumi import snowflake:index/tagAssociation:TagAssociation example 'dbName.schemaName.tagName'
    

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

    Package Details

    Repository
    Snowflake pulumi/pulumi-snowflake
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the snowflake Terraform Provider.
    snowflake logo
    Snowflake v0.52.0 published on Thursday, Apr 18, 2024 by Pulumi