Viewing docs for Databricks v1.92.0
published on Tuesday, May 12, 2026 by Pulumi
published on Tuesday, May 12, 2026 by Pulumi
Viewing docs for Databricks v1.92.0
published on Tuesday, May 12, 2026 by Pulumi
published on Tuesday, May 12, 2026 by Pulumi
This data source can be used to get a single tag policy by its tag key.
The following resources are often used in the same context:
- databricks.EntityTagAssignment for assigning tags to supported Unity Catalog entities.
- databricks.WorkspaceEntityTagAssignment for assigning tags to supported workspace entities.
- databricks.PolicyInfo for defining ABAC policies using governed tags.
- databricks.AccessControlRuleSet for managing account-level and individual tag policy permissions.
Note This resource can only be used with a workspace-level provider!
Example Usage
Referring to a tag policy by its tag key:
import * as pulumi from "@pulumi/pulumi";
import * as databricks from "@pulumi/databricks";
const exampleTagPolicy = databricks.getTagPolicy({
tagKey: "example_tag_key",
});
import pulumi
import pulumi_databricks as databricks
example_tag_policy = databricks.get_tag_policy(tag_key="example_tag_key")
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.GetTagPolicy(ctx, &databricks.LookupTagPolicyArgs{
TagKey: "example_tag_key",
}, 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 exampleTagPolicy = Databricks.GetTagPolicy.Invoke(new()
{
TagKey = "example_tag_key",
});
});
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.GetTagPolicyArgs;
import java.util.ArrayList;
import java.util.Arrays;
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 exampleTagPolicy = DatabricksFunctions.getTagPolicy(GetTagPolicyArgs.builder()
.tagKey("example_tag_key")
.build());
}
}
variables:
exampleTagPolicy:
fn::invoke:
function: databricks:getTagPolicy
arguments:
tagKey: example_tag_key
Example coming soon!
Using getTagPolicy
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 getTagPolicy(args: GetTagPolicyArgs, opts?: InvokeOptions): Promise<GetTagPolicyResult>
function getTagPolicyOutput(args: GetTagPolicyOutputArgs, opts?: InvokeOptions): Output<GetTagPolicyResult>def get_tag_policy(provider_config: Optional[GetTagPolicyProviderConfig] = None,
tag_key: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetTagPolicyResult
def get_tag_policy_output(provider_config: pulumi.Input[Optional[GetTagPolicyProviderConfigArgs]] = None,
tag_key: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetTagPolicyResult]func LookupTagPolicy(ctx *Context, args *LookupTagPolicyArgs, opts ...InvokeOption) (*LookupTagPolicyResult, error)
func LookupTagPolicyOutput(ctx *Context, args *LookupTagPolicyOutputArgs, opts ...InvokeOption) LookupTagPolicyResultOutput> Note: This function is named LookupTagPolicy in the Go SDK.
public static class GetTagPolicy
{
public static Task<GetTagPolicyResult> InvokeAsync(GetTagPolicyArgs args, InvokeOptions? opts = null)
public static Output<GetTagPolicyResult> Invoke(GetTagPolicyInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetTagPolicyResult> getTagPolicy(GetTagPolicyArgs args, InvokeOptions options)
public static Output<GetTagPolicyResult> getTagPolicy(GetTagPolicyArgs args, InvokeOptions options)
fn::invoke:
function: databricks:index/getTagPolicy:getTagPolicy
arguments:
# arguments dictionarydata "databricks_gettagpolicy" "name" {
# arguments
}The following arguments are supported:
- Tag
Key string - Provider
Config GetTag Policy Provider Config - Configure the provider for management through account provider.
- Tag
Key string - Provider
Config GetTag Policy Provider Config - Configure the provider for management through account provider.
- tag_
key string - provider_
config object - Configure the provider for management through account provider.
- tag
Key String - provider
Config GetTag Policy Provider Config - Configure the provider for management through account provider.
- tag
Key string - provider
Config GetTag Policy Provider Config - Configure the provider for management through account provider.
- tag_
key str - provider_
config GetTag Policy Provider Config - Configure the provider for management through account provider.
- tag
Key String - provider
Config Property Map - Configure the provider for management through account provider.
getTagPolicy Result
The following output properties are available:
- Create
Time string - (string) - Timestamp when the tag policy was created
- Description string
- (string)
- Id string
- (string)
- Tag
Key string - (string)
- Update
Time string - (string) - Timestamp when the tag policy was last updated
- Values
List<Get
Tag Policy Value> - (list of Value)
- Provider
Config GetTag Policy Provider Config
- Create
Time string - (string) - Timestamp when the tag policy was created
- Description string
- (string)
- Id string
- (string)
- Tag
Key string - (string)
- Update
Time string - (string) - Timestamp when the tag policy was last updated
- Values
[]Get
Tag Policy Value - (list of Value)
- Provider
Config GetTag Policy Provider Config
- create_
time string - (string) - Timestamp when the tag policy was created
- description string
- (string)
- id string
- (string)
- tag_
key string - (string)
- update_
time string - (string) - Timestamp when the tag policy was last updated
- values list(object)
- (list of Value)
- provider_
config object
- create
Time String - (string) - Timestamp when the tag policy was created
- description String
- (string)
- id String
- (string)
- tag
Key String - (string)
- update
Time String - (string) - Timestamp when the tag policy was last updated
- values
List<Get
Tag Policy Value> - (list of Value)
- provider
Config GetTag Policy Provider Config
- create
Time string - (string) - Timestamp when the tag policy was created
- description string
- (string)
- id string
- (string)
- tag
Key string - (string)
- update
Time string - (string) - Timestamp when the tag policy was last updated
- values
Get
Tag Policy Value[] - (list of Value)
- provider
Config GetTag Policy Provider Config
- create_
time str - (string) - Timestamp when the tag policy was created
- description str
- (string)
- id str
- (string)
- tag_
key str - (string)
- update_
time str - (string) - Timestamp when the tag policy was last updated
- values
Sequence[Get
Tag Policy Value] - (list of Value)
- provider_
config GetTag Policy Provider Config
- create
Time String - (string) - Timestamp when the tag policy was created
- description String
- (string)
- id String
- (string)
- tag
Key String - (string)
- update
Time String - (string) - Timestamp when the tag policy was last updated
- values List<Property Map>
- (list of Value)
- provider
Config Property Map
Supporting Types
GetTagPolicyProviderConfig
- 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 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.
GetTagPolicyValue
- Name string
- (string)
- Name string
- (string)
- name string
- (string)
- name String
- (string)
- name string
- (string)
- name str
- (string)
- name String
- (string)
Package Details
- Repository
- databricks pulumi/pulumi-databricks
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
databricksTerraform Provider.
Viewing docs for Databricks v1.92.0
published on Tuesday, May 12, 2026 by Pulumi
published on Tuesday, May 12, 2026 by Pulumi
