Databricks v1.77.0 published on Tuesday, Nov 4, 2025 by Pulumi
databricks.getEntityTagAssignment
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 dictionaryThe following arguments are supported:
- Entity
Name string - The fully qualified name of the entity to which the tag is assigned
- Entity
Type string - The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
- Tag
Key string - The key of the tag
- Entity
Name string - The fully qualified name of the entity to which the tag is assigned
- Entity
Type string - The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
- Tag
Key string - The key of the tag
- entity
Name String - The fully qualified name of the entity to which the tag is assigned
- entity
Type String - The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
- tag
Key String - The key of the tag
- entity
Name string - The fully qualified name of the entity to which the tag is assigned
- entity
Type string - The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
- tag
Key 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
- entity
Name String - The fully qualified name of the entity to which the tag is assigned
- entity
Type String - The type of the entity to which the tag is assigned. Allowed values are: catalogs, schemas, tables, columns, volumes
- tag
Key String - The key of the tag
getEntityTagAssignment Result
The following output properties are available:
- Entity
Name string - (string) - The fully qualified name of the entity to which the tag is assigned
- Entity
Type 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.
- Tag
Key string - (string) - The key of the tag
- Tag
Value string - (string) - The value of the tag
- Entity
Name string - (string) - The fully qualified name of the entity to which the tag is assigned
- Entity
Type 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.
- Tag
Key string - (string) - The key of the tag
- Tag
Value string - (string) - The value of the tag
- entity
Name String - (string) - The fully qualified name of the entity to which the tag is assigned
- entity
Type 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.
- tag
Key String - (string) - The key of the tag
- tag
Value String - (string) - The value of the tag
- entity
Name string - (string) - The fully qualified name of the entity to which the tag is assigned
- entity
Type 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.
- tag
Key string - (string) - The key of the tag
- tag
Value 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
- entity
Name String - (string) - The fully qualified name of the entity to which the tag is assigned
- entity
Type 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.
- tag
Key String - (string) - The key of the tag
- tag
Value 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
databricksTerraform Provider.
