This resource allows you to create, update, list, and delete tag assignments on Unity Catalog entities.
Example Usage
Basic tag assignment to a catalog
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const catalogTag = new databricks.EntityTagAssignment("catalog_tag", {
entityType: "catalogs",
entityName: "production_catalog",
tagKey: "environment",
tagValue: "production",
});
const schemaTag = new databricks.EntityTagAssignment("schema_tag", {
entityType: "schemas",
entityName: "production_catalog.sales_data",
tagKey: "owner",
tagValue: "sales-team",
});
const tableTag = new databricks.EntityTagAssignment("table_tag", {
entityType: "tables",
entityName: "production_catalog.sales_data.customer_orders",
tagKey: "data_classification",
tagValue: "confidential",
});
const columnTag = new databricks.EntityTagAssignment("column_tag", {
entityType: "columns",
entityName: "production_catalog.sales_data.customers.email_address",
tagKey: "pii",
tagValue: "email",
});
const volumeTag = new databricks.EntityTagAssignment("volume_tag", {
entityType: "volumes",
entityName: "production_catalog.raw_data.landing_zone",
tagKey: "purpose",
tagValue: "data_ingestion",
});
import pulumi
import pulumi_databricks as databricks
catalog_tag = databricks.EntityTagAssignment("catalog_tag",
entity_type="catalogs",
entity_name="production_catalog",
tag_key="environment",
tag_value="production")
schema_tag = databricks.EntityTagAssignment("schema_tag",
entity_type="schemas",
entity_name="production_catalog.sales_data",
tag_key="owner",
tag_value="sales-team")
table_tag = databricks.EntityTagAssignment("table_tag",
entity_type="tables",
entity_name="production_catalog.sales_data.customer_orders",
tag_key="data_classification",
tag_value="confidential")
column_tag = databricks.EntityTagAssignment("column_tag",
entity_type="columns",
entity_name="production_catalog.sales_data.customers.email_address",
tag_key="pii",
tag_value="email")
volume_tag = databricks.EntityTagAssignment("volume_tag",
entity_type="volumes",
entity_name="production_catalog.raw_data.landing_zone",
tag_key="purpose",
tag_value="data_ingestion")
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.NewEntityTagAssignment(ctx, "catalog_tag", &databricks.EntityTagAssignmentArgs{
EntityType: pulumi.String("catalogs"),
EntityName: pulumi.String("production_catalog"),
TagKey: pulumi.String("environment"),
TagValue: pulumi.String("production"),
})
if err != nil {
return err
}
_, err = databricks.NewEntityTagAssignment(ctx, "schema_tag", &databricks.EntityTagAssignmentArgs{
EntityType: pulumi.String("schemas"),
EntityName: pulumi.String("production_catalog.sales_data"),
TagKey: pulumi.String("owner"),
TagValue: pulumi.String("sales-team"),
})
if err != nil {
return err
}
_, err = databricks.NewEntityTagAssignment(ctx, "table_tag", &databricks.EntityTagAssignmentArgs{
EntityType: pulumi.String("tables"),
EntityName: pulumi.String("production_catalog.sales_data.customer_orders"),
TagKey: pulumi.String("data_classification"),
TagValue: pulumi.String("confidential"),
})
if err != nil {
return err
}
_, err = databricks.NewEntityTagAssignment(ctx, "column_tag", &databricks.EntityTagAssignmentArgs{
EntityType: pulumi.String("columns"),
EntityName: pulumi.String("production_catalog.sales_data.customers.email_address"),
TagKey: pulumi.String("pii"),
TagValue: pulumi.String("email"),
})
if err != nil {
return err
}
_, err = databricks.NewEntityTagAssignment(ctx, "volume_tag", &databricks.EntityTagAssignmentArgs{
EntityType: pulumi.String("volumes"),
EntityName: pulumi.String("production_catalog.raw_data.landing_zone"),
TagKey: pulumi.String("purpose"),
TagValue: pulumi.String("data_ingestion"),
})
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 = new Databricks.EntityTagAssignment("catalog_tag", new()
{
EntityType = "catalogs",
EntityName = "production_catalog",
TagKey = "environment",
TagValue = "production",
});
var schemaTag = new Databricks.EntityTagAssignment("schema_tag", new()
{
EntityType = "schemas",
EntityName = "production_catalog.sales_data",
TagKey = "owner",
TagValue = "sales-team",
});
var tableTag = new Databricks.EntityTagAssignment("table_tag", new()
{
EntityType = "tables",
EntityName = "production_catalog.sales_data.customer_orders",
TagKey = "data_classification",
TagValue = "confidential",
});
var columnTag = new Databricks.EntityTagAssignment("column_tag", new()
{
EntityType = "columns",
EntityName = "production_catalog.sales_data.customers.email_address",
TagKey = "pii",
TagValue = "email",
});
var volumeTag = new Databricks.EntityTagAssignment("volume_tag", new()
{
EntityType = "volumes",
EntityName = "production_catalog.raw_data.landing_zone",
TagKey = "purpose",
TagValue = "data_ingestion",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.databricks.EntityTagAssignment;
import com.pulumi.databricks.EntityTagAssignmentArgs;
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 catalogTag = new EntityTagAssignment("catalogTag", EntityTagAssignmentArgs.builder()
.entityType("catalogs")
.entityName("production_catalog")
.tagKey("environment")
.tagValue("production")
.build());
var schemaTag = new EntityTagAssignment("schemaTag", EntityTagAssignmentArgs.builder()
.entityType("schemas")
.entityName("production_catalog.sales_data")
.tagKey("owner")
.tagValue("sales-team")
.build());
var tableTag = new EntityTagAssignment("tableTag", EntityTagAssignmentArgs.builder()
.entityType("tables")
.entityName("production_catalog.sales_data.customer_orders")
.tagKey("data_classification")
.tagValue("confidential")
.build());
var columnTag = new EntityTagAssignment("columnTag", EntityTagAssignmentArgs.builder()
.entityType("columns")
.entityName("production_catalog.sales_data.customers.email_address")
.tagKey("pii")
.tagValue("email")
.build());
var volumeTag = new EntityTagAssignment("volumeTag", EntityTagAssignmentArgs.builder()
.entityType("volumes")
.entityName("production_catalog.raw_data.landing_zone")
.tagKey("purpose")
.tagValue("data_ingestion")
.build());
}
}
resources:
catalogTag:
type: databricks:EntityTagAssignment
name: catalog_tag
properties:
entityType: catalogs
entityName: production_catalog
tagKey: environment
tagValue: production
schemaTag:
type: databricks:EntityTagAssignment
name: schema_tag
properties:
entityType: schemas
entityName: production_catalog.sales_data
tagKey: owner
tagValue: sales-team
tableTag:
type: databricks:EntityTagAssignment
name: table_tag
properties:
entityType: tables
entityName: production_catalog.sales_data.customer_orders
tagKey: data_classification
tagValue: confidential
columnTag:
type: databricks:EntityTagAssignment
name: column_tag
properties:
entityType: columns
entityName: production_catalog.sales_data.customers.email_address
tagKey: pii
tagValue: email
volumeTag:
type: databricks:EntityTagAssignment
name: volume_tag
properties:
entityType: volumes
entityName: production_catalog.raw_data.landing_zone
tagKey: purpose
tagValue: data_ingestion
Create EntityTagAssignment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new EntityTagAssignment(name: string, args: EntityTagAssignmentArgs, opts?: CustomResourceOptions);@overload
def EntityTagAssignment(resource_name: str,
args: EntityTagAssignmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def EntityTagAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
entity_name: Optional[str] = None,
entity_type: Optional[str] = None,
tag_key: Optional[str] = None,
provider_config: Optional[EntityTagAssignmentProviderConfigArgs] = None,
tag_value: Optional[str] = None)func NewEntityTagAssignment(ctx *Context, name string, args EntityTagAssignmentArgs, opts ...ResourceOption) (*EntityTagAssignment, error)public EntityTagAssignment(string name, EntityTagAssignmentArgs args, CustomResourceOptions? opts = null)
public EntityTagAssignment(String name, EntityTagAssignmentArgs args)
public EntityTagAssignment(String name, EntityTagAssignmentArgs args, CustomResourceOptions options)
type: databricks:EntityTagAssignment
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 EntityTagAssignmentArgs
- 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 EntityTagAssignmentArgs
- 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 EntityTagAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args EntityTagAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args EntityTagAssignmentArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var entityTagAssignmentResource = new Databricks.EntityTagAssignment("entityTagAssignmentResource", new()
{
EntityName = "string",
EntityType = "string",
TagKey = "string",
ProviderConfig = new Databricks.Inputs.EntityTagAssignmentProviderConfigArgs
{
WorkspaceId = "string",
},
TagValue = "string",
});
example, err := databricks.NewEntityTagAssignment(ctx, "entityTagAssignmentResource", &databricks.EntityTagAssignmentArgs{
EntityName: pulumi.String("string"),
EntityType: pulumi.String("string"),
TagKey: pulumi.String("string"),
ProviderConfig: &databricks.EntityTagAssignmentProviderConfigArgs{
WorkspaceId: pulumi.String("string"),
},
TagValue: pulumi.String("string"),
})
var entityTagAssignmentResource = new EntityTagAssignment("entityTagAssignmentResource", EntityTagAssignmentArgs.builder()
.entityName("string")
.entityType("string")
.tagKey("string")
.providerConfig(EntityTagAssignmentProviderConfigArgs.builder()
.workspaceId("string")
.build())
.tagValue("string")
.build());
entity_tag_assignment_resource = databricks.EntityTagAssignment("entityTagAssignmentResource",
entity_name="string",
entity_type="string",
tag_key="string",
provider_config={
"workspace_id": "string",
},
tag_value="string")
const entityTagAssignmentResource = new databricks.EntityTagAssignment("entityTagAssignmentResource", {
entityName: "string",
entityType: "string",
tagKey: "string",
providerConfig: {
workspaceId: "string",
},
tagValue: "string",
});
type: databricks:EntityTagAssignment
properties:
entityName: string
entityType: string
providerConfig:
workspaceId: string
tagKey: string
tagValue: string
EntityTagAssignment Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The EntityTagAssignment resource accepts the following input properties:
- 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
- Provider
Config EntityTag Assignment Provider Config - Configure the provider for management through account provider.
- Tag
Value string - The value 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
- Provider
Config EntityTag Assignment Provider Config Args - Configure the provider for management through account provider.
- Tag
Value string - The value 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
- provider
Config EntityTag Assignment Provider Config - Configure the provider for management through account provider.
- tag
Value String - The value 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
- provider
Config EntityTag Assignment Provider Config - Configure the provider for management through account provider.
- tag
Value string - The value 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
- provider_
config EntityTag Assignment Provider Config Args - Configure the provider for management through account provider.
- tag_
value str - The value 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
- provider
Config Property Map - Configure the provider for management through account provider.
- tag
Value String - The value of the tag
Outputs
All input properties are implicitly available as output properties. Additionally, the EntityTagAssignment resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Source
Type string - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - Update
Time string - (string) - The timestamp when the tag assignment was last updated
- Updated
By string - (string) - The user or principal who updated the tag assignment
- Id string
- The provider-assigned unique ID for this managed resource.
- Source
Type string - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - Update
Time string - (string) - The timestamp when the tag assignment was last updated
- Updated
By string - (string) - The user or principal who updated the tag assignment
- id String
- The provider-assigned unique ID for this managed resource.
- source
Type String - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - update
Time String - (string) - The timestamp when the tag assignment was last updated
- updated
By String - (string) - The user or principal who updated the tag assignment
- id string
- The provider-assigned unique ID for this managed resource.
- source
Type string - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - update
Time string - (string) - The timestamp when the tag assignment was last updated
- updated
By string - (string) - The user or principal who updated the tag assignment
- id str
- The provider-assigned unique ID for this managed resource.
- source_
type str - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - update_
time str - (string) - The timestamp when the tag assignment was last updated
- updated_
by str - (string) - The user or principal who updated the tag assignment
- id String
- The provider-assigned unique ID for this managed resource.
- source
Type String - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - update
Time String - (string) - The timestamp when the tag assignment was last updated
- updated
By String - (string) - The user or principal who updated the tag assignment
Look up Existing EntityTagAssignment Resource
Get an existing EntityTagAssignment 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?: EntityTagAssignmentState, opts?: CustomResourceOptions): EntityTagAssignment@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
entity_name: Optional[str] = None,
entity_type: Optional[str] = None,
provider_config: Optional[EntityTagAssignmentProviderConfigArgs] = None,
source_type: Optional[str] = None,
tag_key: Optional[str] = None,
tag_value: Optional[str] = None,
update_time: Optional[str] = None,
updated_by: Optional[str] = None) -> EntityTagAssignmentfunc GetEntityTagAssignment(ctx *Context, name string, id IDInput, state *EntityTagAssignmentState, opts ...ResourceOption) (*EntityTagAssignment, error)public static EntityTagAssignment Get(string name, Input<string> id, EntityTagAssignmentState? state, CustomResourceOptions? opts = null)public static EntityTagAssignment get(String name, Output<String> id, EntityTagAssignmentState state, CustomResourceOptions options)resources: _: type: databricks:EntityTagAssignment get: id: ${id}- 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.
- 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
- Provider
Config EntityTag Assignment Provider Config - Configure the provider for management through account provider.
- Source
Type string - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - Tag
Key string - The key of the tag
- Tag
Value string - The value of the tag
- Update
Time string - (string) - The timestamp when the tag assignment was last updated
- Updated
By string - (string) - The user or principal who updated the tag assignment
- 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
- Provider
Config EntityTag Assignment Provider Config Args - Configure the provider for management through account provider.
- Source
Type string - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - Tag
Key string - The key of the tag
- Tag
Value string - The value of the tag
- Update
Time string - (string) - The timestamp when the tag assignment was last updated
- Updated
By string - (string) - The user or principal who updated the tag assignment
- 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
- provider
Config EntityTag Assignment Provider Config - Configure the provider for management through account provider.
- source
Type String - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - tag
Key String - The key of the tag
- tag
Value String - The value of the tag
- update
Time String - (string) - The timestamp when the tag assignment was last updated
- updated
By String - (string) - The user or principal who updated the tag assignment
- 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
- provider
Config EntityTag Assignment Provider Config - Configure the provider for management through account provider.
- source
Type string - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - tag
Key string - The key of the tag
- tag
Value string - The value of the tag
- update
Time string - (string) - The timestamp when the tag assignment was last updated
- updated
By string - (string) - The user or principal who updated the tag assignment
- 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
- provider_
config EntityTag Assignment Provider Config Args - Configure the provider for management through account provider.
- source_
type str - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - tag_
key str - The key of the tag
- tag_
value str - The value of the tag
- update_
time str - (string) - The timestamp when the tag assignment was last updated
- updated_
by str - (string) - The user or principal who updated the tag assignment
- 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
- provider
Config Property Map - Configure the provider for management through account provider.
- source
Type String - (string) - The source type of the tag assignment, e.g., user-assigned or system-assigned. Possible values are:
TAG_ASSIGNMENT_SOURCE_TYPE_SYSTEM_DATA_CLASSIFICATION - tag
Key String - The key of the tag
- tag
Value String - The value of the tag
- update
Time String - (string) - The timestamp when the tag assignment was last updated
- updated
By String - (string) - The user or principal who updated the tag assignment
Supporting Types
EntityTagAssignmentProviderConfig, EntityTagAssignmentProviderConfigArgs
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- Workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id string - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace_
id str - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
- workspace
Id String - Workspace ID which the resource belongs to. This workspace must be part of the account which the provider is configured with.
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
