1. Packages
  2. Packages
  3. Google Cloud (GCP) Classic
  4. API Docs
  5. datacatalog
  6. getTaxonomy
Viewing docs for Google Cloud v9.32.1
published on Wednesday, Jul 29, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v9.32.1
published on Wednesday, Jul 29, 2026 by Pulumi

    Get information about a Google Data Catalog Taxonomy. For more information see the official documentation and API.

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const example = gcp.datacatalog.getTaxonomy({
        displayName: "my_taxonomy",
        region: "us-central1",
    });
    const examplePolicyTag = new gcp.datacatalog.PolicyTag("example", {
        taxonomy: example.then(example => example.id),
        displayName: "example_policy_tag",
        description: "A policy tag",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    example = gcp.datacatalog.get_taxonomy(display_name="my_taxonomy",
        region="us-central1")
    example_policy_tag = gcp.datacatalog.PolicyTag("example",
        taxonomy=example.id,
        display_name="example_policy_tag",
        description="A policy tag")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v9/go/gcp/datacatalog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := datacatalog.LookupTaxonomy(ctx, &datacatalog.LookupTaxonomyArgs{
    			DisplayName: "my_taxonomy",
    			Region:      "us-central1",
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = datacatalog.NewPolicyTag(ctx, "example", &datacatalog.PolicyTagArgs{
    			Taxonomy:    pulumi.String(example.Id),
    			DisplayName: pulumi.String("example_policy_tag"),
    			Description: pulumi.String("A policy tag"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var example = Gcp.DataCatalog.GetTaxonomy.Invoke(new()
        {
            DisplayName = "my_taxonomy",
            Region = "us-central1",
        });
    
        var examplePolicyTag = new Gcp.DataCatalog.PolicyTag("example", new()
        {
            Taxonomy = example.Apply(getTaxonomyResult => getTaxonomyResult.Id),
            DisplayName = "example_policy_tag",
            Description = "A policy tag",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.datacatalog.DatacatalogFunctions;
    import com.pulumi.gcp.datacatalog.inputs.GetTaxonomyArgs;
    import com.pulumi.gcp.datacatalog.PolicyTag;
    import com.pulumi.gcp.datacatalog.PolicyTagArgs;
    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 example = DatacatalogFunctions.getTaxonomy(GetTaxonomyArgs.builder()
                .displayName("my_taxonomy")
                .region("us-central1")
                .build());
    
            var examplePolicyTag = new PolicyTag("examplePolicyTag", PolicyTagArgs.builder()
                .taxonomy(example.id())
                .displayName("example_policy_tag")
                .description("A policy tag")
                .build());
    
        }
    }
    
    resources:
      examplePolicyTag:
        type: gcp:datacatalog:PolicyTag
        name: example
        properties:
          taxonomy: ${example.id}
          displayName: example_policy_tag
          description: A policy tag
    variables:
      example:
        fn::invoke:
          function: gcp:datacatalog:getTaxonomy
          arguments:
            displayName: my_taxonomy
            region: us-central1
    
    pulumi {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    data "gcp_datacatalog_gettaxonomy" "example" {
      display_name = "my_taxonomy"
      region       = "us-central1"
    }
    
    resource "gcp_datacatalog_policytag" "example" {
      taxonomy     = data.gcp_datacatalog_gettaxonomy.example.id
      display_name = "example_policy_tag"
      description  = "A policy tag"
    }
    

    Using getTaxonomy

    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 getTaxonomy(args: GetTaxonomyArgs, opts?: InvokeOptions): Promise<GetTaxonomyResult>
    function getTaxonomyOutput(args: GetTaxonomyOutputArgs, opts?: InvokeOptions): Output<GetTaxonomyResult>
    def get_taxonomy(display_name: Optional[str] = None,
                     project: Optional[str] = None,
                     region: Optional[str] = None,
                     opts: Optional[InvokeOptions] = None) -> GetTaxonomyResult
    def get_taxonomy_output(display_name: pulumi.Input[Optional[str]] = None,
                     project: pulumi.Input[Optional[str]] = None,
                     region: pulumi.Input[Optional[str]] = None,
                     opts: Optional[InvokeOptions] = None) -> Output[GetTaxonomyResult]
    func LookupTaxonomy(ctx *Context, args *LookupTaxonomyArgs, opts ...InvokeOption) (*LookupTaxonomyResult, error)
    func LookupTaxonomyOutput(ctx *Context, args *LookupTaxonomyOutputArgs, opts ...InvokeOption) LookupTaxonomyResultOutput

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

    public static class GetTaxonomy 
    {
        public static Task<GetTaxonomyResult> InvokeAsync(GetTaxonomyArgs args, InvokeOptions? opts = null)
        public static Output<GetTaxonomyResult> Invoke(GetTaxonomyInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetTaxonomyResult> getTaxonomy(GetTaxonomyArgs args, InvokeOptions options)
    public static Output<GetTaxonomyResult> getTaxonomy(GetTaxonomyArgs args, InvokeOptions options)
    
    fn::invoke:
      function: gcp:datacatalog/getTaxonomy:getTaxonomy
      arguments:
        # arguments dictionary
    data "gcp_datacatalog_get_taxonomy" "name" {
        # arguments
    }

    The following arguments are supported:

    DisplayName string
    The user-defined name of the taxonomy to look up.
    Region string
    The region the taxonomy is located in.
    Project string
    The project in which the taxonomy exists. If not provided, the provider project is used.
    DisplayName string
    The user-defined name of the taxonomy to look up.
    Region string
    The region the taxonomy is located in.
    Project string
    The project in which the taxonomy exists. If not provided, the provider project is used.
    display_name string
    The user-defined name of the taxonomy to look up.
    region string
    The region the taxonomy is located in.
    project string
    The project in which the taxonomy exists. If not provided, the provider project is used.
    displayName String
    The user-defined name of the taxonomy to look up.
    region String
    The region the taxonomy is located in.
    project String
    The project in which the taxonomy exists. If not provided, the provider project is used.
    displayName string
    The user-defined name of the taxonomy to look up.
    region string
    The region the taxonomy is located in.
    project string
    The project in which the taxonomy exists. If not provided, the provider project is used.
    display_name str
    The user-defined name of the taxonomy to look up.
    region str
    The region the taxonomy is located in.
    project str
    The project in which the taxonomy exists. If not provided, the provider project is used.
    displayName String
    The user-defined name of the taxonomy to look up.
    region String
    The region the taxonomy is located in.
    project String
    The project in which the taxonomy exists. If not provided, the provider project is used.

    getTaxonomy Result

    The following output properties are available:

    ActivatedPolicyTypes List<string>
    A list of policy types activated for this taxonomy.
    Description string
    The description of the taxonomy.
    DisplayName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The full resource name of the taxonomy.
    Project string
    Region string
    ActivatedPolicyTypes []string
    A list of policy types activated for this taxonomy.
    Description string
    The description of the taxonomy.
    DisplayName string
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The full resource name of the taxonomy.
    Project string
    Region string
    activated_policy_types list(string)
    A list of policy types activated for this taxonomy.
    description string
    The description of the taxonomy.
    display_name string
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The full resource name of the taxonomy.
    project string
    region string
    activatedPolicyTypes List<String>
    A list of policy types activated for this taxonomy.
    description String
    The description of the taxonomy.
    displayName String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The full resource name of the taxonomy.
    project String
    region String
    activatedPolicyTypes string[]
    A list of policy types activated for this taxonomy.
    description string
    The description of the taxonomy.
    displayName string
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The full resource name of the taxonomy.
    project string
    region string
    activated_policy_types Sequence[str]
    A list of policy types activated for this taxonomy.
    description str
    The description of the taxonomy.
    display_name str
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The full resource name of the taxonomy.
    project str
    region str
    activatedPolicyTypes List<String>
    A list of policy types activated for this taxonomy.
    description String
    The description of the taxonomy.
    displayName String
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The full resource name of the taxonomy.
    project String
    region String

    Package Details

    Repository
    Google Cloud (GCP) Classic pulumi/pulumi-gcp
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the google-beta Terraform Provider.
    gcp logo
    Viewing docs for Google Cloud v9.32.1
    published on Wednesday, Jul 29, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial