1. Packages
  2. Databricks Provider
  3. API Docs
  4. getEntityTagAssignment
Databricks v1.78.0 published on Friday, Nov 7, 2025 by Pulumi

databricks.getEntityTagAssignment

Start a Neo task
Explain and create a databricks.getEntityTagAssignment resource
databricks logo
Databricks v1.78.0 published on Friday, Nov 7, 2025 by Pulumi

    Public Preview

    This data source allows you to get information about a tag assignment for a specific entity using the entity type, entity name, and tag key.

    Example Usage

    Get environment tag from a catalog

    import * as pulumi from "@pulumi/pulumi";
    import * as databricks from "@pulumi/databricks";
    
    const catalogTag = databricks.getEntityTagAssignment({
        entityType: "catalogs",
        entityName: "production_catalog",
        tagKey: "environment",
    });
    const schemaTag = databricks.getEntityTagAssignment({
        entityType: "schemas",
        entityName: "production_catalog.analytics_data",
        tagKey: "cost_center",
    });
    const tableTag = databricks.getEntityTagAssignment({
        entityType: "tables",
        entityName: "production_catalog.sales_data.customer_orders",
        tagKey: "owner",
    });
    const columnTag = databricks.getEntityTagAssignment({
        entityType: "columns",
        entityName: "production_catalog.customer_data.users.email_address",
        tagKey: "pii_classification",
    });
    const volumeTag = databricks.getEntityTagAssignment({
        entityType: "volumes",
        entityName: "production_catalog.raw_data.landing_zone",
        tagKey: "purpose",
    });
    
    import pulumi
    import pulumi_databricks as databricks
    
    catalog_tag = databricks.get_entity_tag_assignment(entity_type="catalogs",
        entity_name="production_catalog",
        tag_key="environment")
    schema_tag = databricks.get_entity_tag_assignment(entity_type="schemas",
        entity_name="production_catalog.analytics_data",
        tag_key="cost_center")
    table_tag = databricks.get_entity_tag_assignment(entity_type="tables",
        entity_name="production_catalog.sales_data.customer_orders",
        tag_key="owner")
    column_tag = databricks.get_entity_tag_assignment(entity_type="columns",
        entity_name="production_catalog.customer_data.users.email_address",
        tag_key="pii_classification")
    volume_tag = databricks.get_entity_tag_assignment(entity_type="volumes",
        entity_name="production_catalog.raw_data.landing_zone",
        tag_key="purpose")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-databricks/sdk/go/databricks"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := databricks.LookupEntityTagAssignment(ctx, &databricks.LookupEntityTagAssignmentArgs{
    			EntityType: "catalogs",
    			EntityName: "production_catalog",
    			TagKey:     "environment",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = databricks.LookupEntityTagAssignment(ctx, &databricks.LookupEntityTagAssignmentArgs{
    			EntityType: "schemas",
    			EntityName: "production_catalog.analytics_data",
    			TagKey:     "cost_center",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = databricks.LookupEntityTagAssignment(ctx, &databricks.LookupEntityTagAssignmentArgs{
    			EntityType: "tables",
    			EntityName: "production_catalog.sales_data.customer_orders",
    			TagKey:     "owner",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = databricks.LookupEntityTagAssignment(ctx, &databricks.LookupEntityTagAssignmentArgs{
    			EntityType: "columns",
    			EntityName: "production_catalog.customer_data.users.email_address",
    			TagKey:     "pii_classification",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = databricks.LookupEntityTagAssignment(ctx, &databricks.LookupEntityTagAssignmentArgs{
    			EntityType: "volumes",
    			EntityName: "production_catalog.raw_data.landing_zone",
    			TagKey:     "purpose",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Databricks = Pulumi.Databricks;
    
    return await Deployment.RunAsync(() => 
    {
        var catalogTag = Databricks.GetEntityTagAssignment.Invoke(new()
        {
            EntityType = "catalogs",
            EntityName = "production_catalog",
            TagKey = "environment",
        });
    
        var schemaTag = Databricks.GetEntityTagAssignment.Invoke(new()
        {
            EntityType = "schemas",
            EntityName = "production_catalog.analytics_data",
            TagKey = "cost_center",
        });
    
        var tableTag = Databricks.GetEntityTagAssignment.Invoke(new()
        {
            EntityType = "tables",
            EntityName = "production_catalog.sales_data.customer_orders",
            TagKey = "owner",
        });
    
        var columnTag = Databricks.GetEntityTagAssignment.Invoke(new()
        {
            EntityType = "columns",
            EntityName = "production_catalog.customer_data.users.email_address",
            TagKey = "pii_classification",
        });
    
        var volumeTag = Databricks.GetEntityTagAssignment.Invoke(new()
        {
            EntityType = "volumes",
            EntityName = "production_catalog.raw_data.landing_zone",
            TagKey = "purpose",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.databricks.DatabricksFunctions;
    import com.pulumi.databricks.inputs.GetEntityTagAssignmentArgs;
    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) {
            final var catalogTag = DatabricksFunctions.getEntityTagAssignment(GetEntityTagAssignmentArgs.builder()
                .entityType("catalogs")
                .entityName("production_catalog")
                .tagKey("environment")
                .build());
    
            final var schemaTag = DatabricksFunctions.getEntityTagAssignment(GetEntityTagAssignmentArgs.builder()
                .entityType("schemas")
                .entityName("production_catalog.analytics_data")
                .tagKey("cost_center")
                .build());
    
            final var tableTag = DatabricksFunctions.getEntityTagAssignment(GetEntityTagAssignmentArgs.builder()
                .entityType("tables")
                .entityName("production_catalog.sales_data.customer_orders")
                .tagKey("owner")
                .build());
    
            final var columnTag = DatabricksFunctions.getEntityTagAssignment(GetEntityTagAssignmentArgs.builder()
                .entityType("columns")
                .entityName("production_catalog.customer_data.users.email_address")
                .tagKey("pii_classification")
                .build());
    
            final var volumeTag = DatabricksFunctions.getEntityTagAssignment(GetEntityTagAssignmentArgs.builder()
                .entityType("volumes")
                .entityName("production_catalog.raw_data.landing_zone")
                .tagKey("purpose")
                .build());
    
        }
    }
    
    variables:
      catalogTag:
        fn::invoke:
          function: databricks:getEntityTagAssignment
          arguments:
            entityType: catalogs
            entityName: production_catalog
            tagKey: environment
      schemaTag:
        fn::invoke:
          function: databricks:getEntityTagAssignment
          arguments:
            entityType: schemas
            entityName: production_catalog.analytics_data
            tagKey: cost_center
      tableTag:
        fn::invoke:
          function: databricks:getEntityTagAssignment
          arguments:
            entityType: tables
            entityName: production_catalog.sales_data.customer_orders
            tagKey: owner
      columnTag:
        fn::invoke:
          function: databricks:getEntityTagAssignment
          arguments:
            entityType: columns
            entityName: production_catalog.customer_data.users.email_address
            tagKey: pii_classification
      volumeTag:
        fn::invoke:
          function: databricks:getEntityTagAssignment
          arguments:
            entityType: volumes
            entityName: production_catalog.raw_data.landing_zone
            tagKey: purpose
    

    Using getEntityTagAssignment

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getEntityTagAssignment(args: GetEntityTagAssignmentArgs, opts?: InvokeOptions): Promise<GetEntityTagAssignmentResult>
    function getEntityTagAssignmentOutput(args: GetEntityTagAssignmentOutputArgs, opts?: InvokeOptions): Output<GetEntityTagAssignmentResult>
    def get_entity_tag_assignment(entity_name: Optional[str] = None,
                                  entity_type: Optional[str] = None,
                                  tag_key: Optional[str] = None,
                                  opts: Optional[InvokeOptions] = None) -> GetEntityTagAssignmentResult
    def get_entity_tag_assignment_output(entity_name: Optional[pulumi.Input[str]] = None,
                                  entity_type: Optional[pulumi.Input[str]] = None,
                                  tag_key: Optional[pulumi.Input[str]] = None,
                                  opts: Optional[InvokeOptions] = None) -> Output[GetEntityTagAssignmentResult]
    func LookupEntityTagAssignment(ctx *Context, args *LookupEntityTagAssignmentArgs, opts ...InvokeOption) (*LookupEntityTagAssignmentResult, error)
    func LookupEntityTagAssignmentOutput(ctx *Context, args *LookupEntityTagAssignmentOutputArgs, opts ...InvokeOption) LookupEntityTagAssignmentResultOutput

    > Note: This function is named LookupEntityTagAssignment in the Go SDK.

    public static class GetEntityTagAssignment 
    {
        public static Task<GetEntityTagAssignmentResult> InvokeAsync(GetEntityTagAssignmentArgs args, InvokeOptions? opts = null)
        public static Output<GetEntityTagAssignmentResult> Invoke(GetEntityTagAssignmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEntityTagAssignmentResult> getEntityTagAssignment(GetEntityTagAssignmentArgs args, InvokeOptions options)
    public static Output<GetEntityTagAssignmentResult> getEntityTagAssignment(GetEntityTagAssignmentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: databricks:index/getEntityTagAssignment:getEntityTagAssignment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    EntityName string
    The fully qualified name of the entity to which the tag is assigned
    EntityType string
    The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    TagKey string
    The key of the tag
    EntityName string
    The fully qualified name of the entity to which the tag is assigned
    EntityType string
    The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    TagKey string
    The key of the tag
    entityName String
    The fully qualified name of the entity to which the tag is assigned
    entityType String
    The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    tagKey String
    The key of the tag
    entityName string
    The fully qualified name of the entity to which the tag is assigned
    entityType string
    The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    tagKey string
    The key of the tag
    entity_name str
    The fully qualified name of the entity to which the tag is assigned
    entity_type str
    The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    tag_key str
    The key of the tag
    entityName String
    The fully qualified name of the entity to which the tag is assigned
    entityType String
    The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    tagKey String
    The key of the tag

    getEntityTagAssignment Result

    The following output properties are available:

    EntityName string
    (string) - The fully qualified name of the entity to which the tag is assigned
    EntityType string
    (string) - The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    Id string
    The provider-assigned unique ID for this managed resource.
    TagKey string
    (string) - The key of the tag
    TagValue string
    (string) - The value of the tag
    EntityName string
    (string) - The fully qualified name of the entity to which the tag is assigned
    EntityType string
    (string) - The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    Id string
    The provider-assigned unique ID for this managed resource.
    TagKey string
    (string) - The key of the tag
    TagValue string
    (string) - The value of the tag
    entityName String
    (string) - The fully qualified name of the entity to which the tag is assigned
    entityType String
    (string) - The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    id String
    The provider-assigned unique ID for this managed resource.
    tagKey String
    (string) - The key of the tag
    tagValue String
    (string) - The value of the tag
    entityName string
    (string) - The fully qualified name of the entity to which the tag is assigned
    entityType string
    (string) - The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    id string
    The provider-assigned unique ID for this managed resource.
    tagKey string
    (string) - The key of the tag
    tagValue string
    (string) - The value of the tag
    entity_name str
    (string) - The fully qualified name of the entity to which the tag is assigned
    entity_type str
    (string) - The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    id str
    The provider-assigned unique ID for this managed resource.
    tag_key str
    (string) - The key of the tag
    tag_value str
    (string) - The value of the tag
    entityName String
    (string) - The fully qualified name of the entity to which the tag is assigned
    entityType String
    (string) - The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
    id String
    The provider-assigned unique ID for this managed resource.
    tagKey String
    (string) - The key of the tag
    tagValue String
    (string) - The value of the tag

    Package Details

    Repository
    databricks pulumi/pulumi-databricks
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the databricks Terraform Provider.
    databricks logo
    Databricks v1.78.0 published on Friday, Nov 7, 2025 by Pulumi
      Meet Neo: Your AI Platform Teammate