1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. datacatalog
  5. TagTemplate
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

gcp.datacatalog.TagTemplate

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi

    A tag template defines a tag, which can have one or more typed fields. The template is used to create and attach the tag to GCP resources.

    To get more information about TagTemplate, see:

    Example Usage

    Data Catalog Tag Template Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const basicTagTemplate = new gcp.datacatalog.TagTemplate("basic_tag_template", {
        tagTemplateId: "my_template",
        region: "us-central1",
        displayName: "Demo Tag Template",
        fields: [
            {
                fieldId: "source",
                displayName: "Source of data asset",
                type: {
                    primitiveType: "STRING",
                },
                isRequired: true,
            },
            {
                fieldId: "num_rows",
                displayName: "Number of rows in the data asset",
                type: {
                    primitiveType: "DOUBLE",
                },
            },
            {
                fieldId: "pii_type",
                displayName: "PII type",
                type: {
                    enumType: {
                        allowedValues: [
                            {
                                displayName: "EMAIL",
                            },
                            {
                                displayName: "SOCIAL SECURITY NUMBER",
                            },
                            {
                                displayName: "NONE",
                            },
                        ],
                    },
                },
            },
        ],
        forceDelete: false,
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    basic_tag_template = gcp.datacatalog.TagTemplate("basic_tag_template",
        tag_template_id="my_template",
        region="us-central1",
        display_name="Demo Tag Template",
        fields=[
            gcp.datacatalog.TagTemplateFieldArgs(
                field_id="source",
                display_name="Source of data asset",
                type=gcp.datacatalog.TagTemplateFieldTypeArgs(
                    primitive_type="STRING",
                ),
                is_required=True,
            ),
            gcp.datacatalog.TagTemplateFieldArgs(
                field_id="num_rows",
                display_name="Number of rows in the data asset",
                type=gcp.datacatalog.TagTemplateFieldTypeArgs(
                    primitive_type="DOUBLE",
                ),
            ),
            gcp.datacatalog.TagTemplateFieldArgs(
                field_id="pii_type",
                display_name="PII type",
                type=gcp.datacatalog.TagTemplateFieldTypeArgs(
                    enum_type=gcp.datacatalog.TagTemplateFieldTypeEnumTypeArgs(
                        allowed_values=[
                            gcp.datacatalog.TagTemplateFieldTypeEnumTypeAllowedValueArgs(
                                display_name="EMAIL",
                            ),
                            gcp.datacatalog.TagTemplateFieldTypeEnumTypeAllowedValueArgs(
                                display_name="SOCIAL SECURITY NUMBER",
                            ),
                            gcp.datacatalog.TagTemplateFieldTypeEnumTypeAllowedValueArgs(
                                display_name="NONE",
                            ),
                        ],
                    ),
                ),
            ),
        ],
        force_delete=False)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/datacatalog"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := datacatalog.NewTagTemplate(ctx, "basic_tag_template", &datacatalog.TagTemplateArgs{
    			TagTemplateId: pulumi.String("my_template"),
    			Region:        pulumi.String("us-central1"),
    			DisplayName:   pulumi.String("Demo Tag Template"),
    			Fields: datacatalog.TagTemplateFieldArray{
    				&datacatalog.TagTemplateFieldArgs{
    					FieldId:     pulumi.String("source"),
    					DisplayName: pulumi.String("Source of data asset"),
    					Type: &datacatalog.TagTemplateFieldTypeArgs{
    						PrimitiveType: pulumi.String("STRING"),
    					},
    					IsRequired: pulumi.Bool(true),
    				},
    				&datacatalog.TagTemplateFieldArgs{
    					FieldId:     pulumi.String("num_rows"),
    					DisplayName: pulumi.String("Number of rows in the data asset"),
    					Type: &datacatalog.TagTemplateFieldTypeArgs{
    						PrimitiveType: pulumi.String("DOUBLE"),
    					},
    				},
    				&datacatalog.TagTemplateFieldArgs{
    					FieldId:     pulumi.String("pii_type"),
    					DisplayName: pulumi.String("PII type"),
    					Type: &datacatalog.TagTemplateFieldTypeArgs{
    						EnumType: &datacatalog.TagTemplateFieldTypeEnumTypeArgs{
    							AllowedValues: datacatalog.TagTemplateFieldTypeEnumTypeAllowedValueArray{
    								&datacatalog.TagTemplateFieldTypeEnumTypeAllowedValueArgs{
    									DisplayName: pulumi.String("EMAIL"),
    								},
    								&datacatalog.TagTemplateFieldTypeEnumTypeAllowedValueArgs{
    									DisplayName: pulumi.String("SOCIAL SECURITY NUMBER"),
    								},
    								&datacatalog.TagTemplateFieldTypeEnumTypeAllowedValueArgs{
    									DisplayName: pulumi.String("NONE"),
    								},
    							},
    						},
    					},
    				},
    			},
    			ForceDelete: pulumi.Bool(false),
    		})
    		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 basicTagTemplate = new Gcp.DataCatalog.TagTemplate("basic_tag_template", new()
        {
            TagTemplateId = "my_template",
            Region = "us-central1",
            DisplayName = "Demo Tag Template",
            Fields = new[]
            {
                new Gcp.DataCatalog.Inputs.TagTemplateFieldArgs
                {
                    FieldId = "source",
                    DisplayName = "Source of data asset",
                    Type = new Gcp.DataCatalog.Inputs.TagTemplateFieldTypeArgs
                    {
                        PrimitiveType = "STRING",
                    },
                    IsRequired = true,
                },
                new Gcp.DataCatalog.Inputs.TagTemplateFieldArgs
                {
                    FieldId = "num_rows",
                    DisplayName = "Number of rows in the data asset",
                    Type = new Gcp.DataCatalog.Inputs.TagTemplateFieldTypeArgs
                    {
                        PrimitiveType = "DOUBLE",
                    },
                },
                new Gcp.DataCatalog.Inputs.TagTemplateFieldArgs
                {
                    FieldId = "pii_type",
                    DisplayName = "PII type",
                    Type = new Gcp.DataCatalog.Inputs.TagTemplateFieldTypeArgs
                    {
                        EnumType = new Gcp.DataCatalog.Inputs.TagTemplateFieldTypeEnumTypeArgs
                        {
                            AllowedValues = new[]
                            {
                                new Gcp.DataCatalog.Inputs.TagTemplateFieldTypeEnumTypeAllowedValueArgs
                                {
                                    DisplayName = "EMAIL",
                                },
                                new Gcp.DataCatalog.Inputs.TagTemplateFieldTypeEnumTypeAllowedValueArgs
                                {
                                    DisplayName = "SOCIAL SECURITY NUMBER",
                                },
                                new Gcp.DataCatalog.Inputs.TagTemplateFieldTypeEnumTypeAllowedValueArgs
                                {
                                    DisplayName = "NONE",
                                },
                            },
                        },
                    },
                },
            },
            ForceDelete = false,
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.datacatalog.TagTemplate;
    import com.pulumi.gcp.datacatalog.TagTemplateArgs;
    import com.pulumi.gcp.datacatalog.inputs.TagTemplateFieldArgs;
    import com.pulumi.gcp.datacatalog.inputs.TagTemplateFieldTypeArgs;
    import com.pulumi.gcp.datacatalog.inputs.TagTemplateFieldTypeEnumTypeArgs;
    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 basicTagTemplate = new TagTemplate("basicTagTemplate", TagTemplateArgs.builder()
                .tagTemplateId("my_template")
                .region("us-central1")
                .displayName("Demo Tag Template")
                .fields(            
                    TagTemplateFieldArgs.builder()
                        .fieldId("source")
                        .displayName("Source of data asset")
                        .type(TagTemplateFieldTypeArgs.builder()
                            .primitiveType("STRING")
                            .build())
                        .isRequired(true)
                        .build(),
                    TagTemplateFieldArgs.builder()
                        .fieldId("num_rows")
                        .displayName("Number of rows in the data asset")
                        .type(TagTemplateFieldTypeArgs.builder()
                            .primitiveType("DOUBLE")
                            .build())
                        .build(),
                    TagTemplateFieldArgs.builder()
                        .fieldId("pii_type")
                        .displayName("PII type")
                        .type(TagTemplateFieldTypeArgs.builder()
                            .enumType(TagTemplateFieldTypeEnumTypeArgs.builder()
                                .allowedValues(                            
                                    TagTemplateFieldTypeEnumTypeAllowedValueArgs.builder()
                                        .displayName("EMAIL")
                                        .build(),
                                    TagTemplateFieldTypeEnumTypeAllowedValueArgs.builder()
                                        .displayName("SOCIAL SECURITY NUMBER")
                                        .build(),
                                    TagTemplateFieldTypeEnumTypeAllowedValueArgs.builder()
                                        .displayName("NONE")
                                        .build())
                                .build())
                            .build())
                        .build())
                .forceDelete("false")
                .build());
    
        }
    }
    
    resources:
      basicTagTemplate:
        type: gcp:datacatalog:TagTemplate
        name: basic_tag_template
        properties:
          tagTemplateId: my_template
          region: us-central1
          displayName: Demo Tag Template
          fields:
            - fieldId: source
              displayName: Source of data asset
              type:
                primitiveType: STRING
              isRequired: true
            - fieldId: num_rows
              displayName: Number of rows in the data asset
              type:
                primitiveType: DOUBLE
            - fieldId: pii_type
              displayName: PII type
              type:
                enumType:
                  allowedValues:
                    - displayName: EMAIL
                    - displayName: SOCIAL SECURITY NUMBER
                    - displayName: NONE
          forceDelete: 'false'
    

    Create TagTemplate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new TagTemplate(name: string, args: TagTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def TagTemplate(resource_name: str,
                    args: TagTemplateArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def TagTemplate(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    fields: Optional[Sequence[TagTemplateFieldArgs]] = None,
                    tag_template_id: Optional[str] = None,
                    display_name: Optional[str] = None,
                    force_delete: Optional[bool] = None,
                    project: Optional[str] = None,
                    region: Optional[str] = None)
    func NewTagTemplate(ctx *Context, name string, args TagTemplateArgs, opts ...ResourceOption) (*TagTemplate, error)
    public TagTemplate(string name, TagTemplateArgs args, CustomResourceOptions? opts = null)
    public TagTemplate(String name, TagTemplateArgs args)
    public TagTemplate(String name, TagTemplateArgs args, CustomResourceOptions options)
    
    type: gcp:datacatalog:TagTemplate
    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 TagTemplateArgs
    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 TagTemplateArgs
    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 TagTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TagTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TagTemplateArgs
    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 tagTemplateResource = new Gcp.DataCatalog.TagTemplate("tagTemplateResource", new()
    {
        Fields = new[]
        {
            new Gcp.DataCatalog.Inputs.TagTemplateFieldArgs
            {
                FieldId = "string",
                Type = new Gcp.DataCatalog.Inputs.TagTemplateFieldTypeArgs
                {
                    EnumType = new Gcp.DataCatalog.Inputs.TagTemplateFieldTypeEnumTypeArgs
                    {
                        AllowedValues = new[]
                        {
                            new Gcp.DataCatalog.Inputs.TagTemplateFieldTypeEnumTypeAllowedValueArgs
                            {
                                DisplayName = "string",
                            },
                        },
                    },
                    PrimitiveType = "string",
                },
                Description = "string",
                DisplayName = "string",
                IsRequired = false,
                Name = "string",
                Order = 0,
            },
        },
        TagTemplateId = "string",
        DisplayName = "string",
        ForceDelete = false,
        Project = "string",
        Region = "string",
    });
    
    example, err := datacatalog.NewTagTemplate(ctx, "tagTemplateResource", &datacatalog.TagTemplateArgs{
    	Fields: datacatalog.TagTemplateFieldArray{
    		&datacatalog.TagTemplateFieldArgs{
    			FieldId: pulumi.String("string"),
    			Type: &datacatalog.TagTemplateFieldTypeArgs{
    				EnumType: &datacatalog.TagTemplateFieldTypeEnumTypeArgs{
    					AllowedValues: datacatalog.TagTemplateFieldTypeEnumTypeAllowedValueArray{
    						&datacatalog.TagTemplateFieldTypeEnumTypeAllowedValueArgs{
    							DisplayName: pulumi.String("string"),
    						},
    					},
    				},
    				PrimitiveType: pulumi.String("string"),
    			},
    			Description: pulumi.String("string"),
    			DisplayName: pulumi.String("string"),
    			IsRequired:  pulumi.Bool(false),
    			Name:        pulumi.String("string"),
    			Order:       pulumi.Int(0),
    		},
    	},
    	TagTemplateId: pulumi.String("string"),
    	DisplayName:   pulumi.String("string"),
    	ForceDelete:   pulumi.Bool(false),
    	Project:       pulumi.String("string"),
    	Region:        pulumi.String("string"),
    })
    
    var tagTemplateResource = new TagTemplate("tagTemplateResource", TagTemplateArgs.builder()
        .fields(TagTemplateFieldArgs.builder()
            .fieldId("string")
            .type(TagTemplateFieldTypeArgs.builder()
                .enumType(TagTemplateFieldTypeEnumTypeArgs.builder()
                    .allowedValues(TagTemplateFieldTypeEnumTypeAllowedValueArgs.builder()
                        .displayName("string")
                        .build())
                    .build())
                .primitiveType("string")
                .build())
            .description("string")
            .displayName("string")
            .isRequired(false)
            .name("string")
            .order(0)
            .build())
        .tagTemplateId("string")
        .displayName("string")
        .forceDelete(false)
        .project("string")
        .region("string")
        .build());
    
    tag_template_resource = gcp.datacatalog.TagTemplate("tagTemplateResource",
        fields=[gcp.datacatalog.TagTemplateFieldArgs(
            field_id="string",
            type=gcp.datacatalog.TagTemplateFieldTypeArgs(
                enum_type=gcp.datacatalog.TagTemplateFieldTypeEnumTypeArgs(
                    allowed_values=[gcp.datacatalog.TagTemplateFieldTypeEnumTypeAllowedValueArgs(
                        display_name="string",
                    )],
                ),
                primitive_type="string",
            ),
            description="string",
            display_name="string",
            is_required=False,
            name="string",
            order=0,
        )],
        tag_template_id="string",
        display_name="string",
        force_delete=False,
        project="string",
        region="string")
    
    const tagTemplateResource = new gcp.datacatalog.TagTemplate("tagTemplateResource", {
        fields: [{
            fieldId: "string",
            type: {
                enumType: {
                    allowedValues: [{
                        displayName: "string",
                    }],
                },
                primitiveType: "string",
            },
            description: "string",
            displayName: "string",
            isRequired: false,
            name: "string",
            order: 0,
        }],
        tagTemplateId: "string",
        displayName: "string",
        forceDelete: false,
        project: "string",
        region: "string",
    });
    
    type: gcp:datacatalog:TagTemplate
    properties:
        displayName: string
        fields:
            - description: string
              displayName: string
              fieldId: string
              isRequired: false
              name: string
              order: 0
              type:
                enumType:
                    allowedValues:
                        - displayName: string
                primitiveType: string
        forceDelete: false
        project: string
        region: string
        tagTemplateId: string
    

    TagTemplate Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The TagTemplate resource accepts the following input properties:

    Fields List<TagTemplateField>
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    TagTemplateId string
    The id of the tag template to create.
    DisplayName string
    The display name for this template.
    ForceDelete bool
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    Project string
    Region string
    Template location region.
    Fields []TagTemplateFieldArgs
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    TagTemplateId string
    The id of the tag template to create.
    DisplayName string
    The display name for this template.
    ForceDelete bool
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    Project string
    Region string
    Template location region.
    fields List<TagTemplateField>
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    tagTemplateId String
    The id of the tag template to create.
    displayName String
    The display name for this template.
    forceDelete Boolean
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    project String
    region String
    Template location region.
    fields TagTemplateField[]
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    tagTemplateId string
    The id of the tag template to create.
    displayName string
    The display name for this template.
    forceDelete boolean
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    project string
    region string
    Template location region.
    fields Sequence[TagTemplateFieldArgs]
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    tag_template_id str
    The id of the tag template to create.
    display_name str
    The display name for this template.
    force_delete bool
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    project str
    region str
    Template location region.
    fields List<Property Map>
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    tagTemplateId String
    The id of the tag template to create.
    displayName String
    The display name for this template.
    forceDelete Boolean
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    project String
    region String
    Template location region.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the TagTemplate resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}

    Look up Existing TagTemplate Resource

    Get an existing TagTemplate 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?: TagTemplateState, opts?: CustomResourceOptions): TagTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            display_name: Optional[str] = None,
            fields: Optional[Sequence[TagTemplateFieldArgs]] = None,
            force_delete: Optional[bool] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            region: Optional[str] = None,
            tag_template_id: Optional[str] = None) -> TagTemplate
    func GetTagTemplate(ctx *Context, name string, id IDInput, state *TagTemplateState, opts ...ResourceOption) (*TagTemplate, error)
    public static TagTemplate Get(string name, Input<string> id, TagTemplateState? state, CustomResourceOptions? opts = null)
    public static TagTemplate get(String name, Output<String> id, TagTemplateState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    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.
    The following state arguments are supported:
    DisplayName string
    The display name for this template.
    Fields List<TagTemplateField>
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    ForceDelete bool
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    Name string
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}
    Project string
    Region string
    Template location region.
    TagTemplateId string
    The id of the tag template to create.
    DisplayName string
    The display name for this template.
    Fields []TagTemplateFieldArgs
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    ForceDelete bool
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    Name string
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}
    Project string
    Region string
    Template location region.
    TagTemplateId string
    The id of the tag template to create.
    displayName String
    The display name for this template.
    fields List<TagTemplateField>
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    forceDelete Boolean
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    name String
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}
    project String
    region String
    Template location region.
    tagTemplateId String
    The id of the tag template to create.
    displayName string
    The display name for this template.
    fields TagTemplateField[]
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    forceDelete boolean
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    name string
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}
    project string
    region string
    Template location region.
    tagTemplateId string
    The id of the tag template to create.
    display_name str
    The display name for this template.
    fields Sequence[TagTemplateFieldArgs]
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    force_delete bool
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    name str
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}
    project str
    region str
    Template location region.
    tag_template_id str
    The id of the tag template to create.
    displayName String
    The display name for this template.
    fields List<Property Map>
    Set of tag template field IDs and the settings for the field. This set is an exhaustive list of the allowed fields. This set must contain at least one field and at most 500 fields. The change of field_id will be resulting in re-creating of field. The change of primitive_type will be resulting in re-creating of field, however if the field is a required, you cannot update it. Structure is documented below.
    forceDelete Boolean
    This confirms the deletion of any possible tags using this template. Must be set to true in order to delete the tag template.
    name String
    The resource name of the tag template in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}
    project String
    region String
    Template location region.
    tagTemplateId String
    The id of the tag template to create.

    Supporting Types

    TagTemplateField, TagTemplateFieldArgs

    FieldId string
    The identifier for this object. Format specified above.
    Type TagTemplateFieldType
    The type of value this tag field can contain. Structure is documented below.
    Description string
    A description for this field.
    DisplayName string
    The display name for this field.
    IsRequired bool
    Whether this is a required field. Defaults to false.
    Name string
    (Output) The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}
    Order int
    The order of this field with respect to other fields in this tag template. A higher value indicates a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential.
    FieldId string
    The identifier for this object. Format specified above.
    Type TagTemplateFieldType
    The type of value this tag field can contain. Structure is documented below.
    Description string
    A description for this field.
    DisplayName string
    The display name for this field.
    IsRequired bool
    Whether this is a required field. Defaults to false.
    Name string
    (Output) The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}
    Order int
    The order of this field with respect to other fields in this tag template. A higher value indicates a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential.
    fieldId String
    The identifier for this object. Format specified above.
    type TagTemplateFieldType
    The type of value this tag field can contain. Structure is documented below.
    description String
    A description for this field.
    displayName String
    The display name for this field.
    isRequired Boolean
    Whether this is a required field. Defaults to false.
    name String
    (Output) The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}
    order Integer
    The order of this field with respect to other fields in this tag template. A higher value indicates a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential.
    fieldId string
    The identifier for this object. Format specified above.
    type TagTemplateFieldType
    The type of value this tag field can contain. Structure is documented below.
    description string
    A description for this field.
    displayName string
    The display name for this field.
    isRequired boolean
    Whether this is a required field. Defaults to false.
    name string
    (Output) The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}
    order number
    The order of this field with respect to other fields in this tag template. A higher value indicates a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential.
    field_id str
    The identifier for this object. Format specified above.
    type TagTemplateFieldType
    The type of value this tag field can contain. Structure is documented below.
    description str
    A description for this field.
    display_name str
    The display name for this field.
    is_required bool
    Whether this is a required field. Defaults to false.
    name str
    (Output) The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}
    order int
    The order of this field with respect to other fields in this tag template. A higher value indicates a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential.
    fieldId String
    The identifier for this object. Format specified above.
    type Property Map
    The type of value this tag field can contain. Structure is documented below.
    description String
    A description for this field.
    displayName String
    The display name for this field.
    isRequired Boolean
    Whether this is a required field. Defaults to false.
    name String
    (Output) The resource name of the tag template field in URL format. Example: projects/{project_id}/locations/{location}/tagTemplates/{tagTemplateId}/fields/{field}
    order Number
    The order of this field with respect to other fields in this tag template. A higher value indicates a more important field. The value can be negative. Multiple fields can have the same order, and field orders within a tag do not have to be sequential.

    TagTemplateFieldType, TagTemplateFieldTypeArgs

    EnumType TagTemplateFieldTypeEnumType
    Represents an enum type. Exactly one of primitive_type or enum_type must be set Structure is documented below.
    PrimitiveType string
    Represents primitive types - string, bool etc. Exactly one of primitive_type or enum_type must be set Possible values are: DOUBLE, STRING, BOOL, TIMESTAMP.
    EnumType TagTemplateFieldTypeEnumType
    Represents an enum type. Exactly one of primitive_type or enum_type must be set Structure is documented below.
    PrimitiveType string
    Represents primitive types - string, bool etc. Exactly one of primitive_type or enum_type must be set Possible values are: DOUBLE, STRING, BOOL, TIMESTAMP.
    enumType TagTemplateFieldTypeEnumType
    Represents an enum type. Exactly one of primitive_type or enum_type must be set Structure is documented below.
    primitiveType String
    Represents primitive types - string, bool etc. Exactly one of primitive_type or enum_type must be set Possible values are: DOUBLE, STRING, BOOL, TIMESTAMP.
    enumType TagTemplateFieldTypeEnumType
    Represents an enum type. Exactly one of primitive_type or enum_type must be set Structure is documented below.
    primitiveType string
    Represents primitive types - string, bool etc. Exactly one of primitive_type or enum_type must be set Possible values are: DOUBLE, STRING, BOOL, TIMESTAMP.
    enum_type TagTemplateFieldTypeEnumType
    Represents an enum type. Exactly one of primitive_type or enum_type must be set Structure is documented below.
    primitive_type str
    Represents primitive types - string, bool etc. Exactly one of primitive_type or enum_type must be set Possible values are: DOUBLE, STRING, BOOL, TIMESTAMP.
    enumType Property Map
    Represents an enum type. Exactly one of primitive_type or enum_type must be set Structure is documented below.
    primitiveType String
    Represents primitive types - string, bool etc. Exactly one of primitive_type or enum_type must be set Possible values are: DOUBLE, STRING, BOOL, TIMESTAMP.

    TagTemplateFieldTypeEnumType, TagTemplateFieldTypeEnumTypeArgs

    AllowedValues List<TagTemplateFieldTypeEnumTypeAllowedValue>
    The set of allowed values for this enum. The display names of the values must be case-insensitively unique within this set. Currently, enum values can only be added to the list of allowed values. Deletion and renaming of enum values are not supported. Can have up to 500 allowed values. Structure is documented below.
    AllowedValues []TagTemplateFieldTypeEnumTypeAllowedValue
    The set of allowed values for this enum. The display names of the values must be case-insensitively unique within this set. Currently, enum values can only be added to the list of allowed values. Deletion and renaming of enum values are not supported. Can have up to 500 allowed values. Structure is documented below.
    allowedValues List<TagTemplateFieldTypeEnumTypeAllowedValue>
    The set of allowed values for this enum. The display names of the values must be case-insensitively unique within this set. Currently, enum values can only be added to the list of allowed values. Deletion and renaming of enum values are not supported. Can have up to 500 allowed values. Structure is documented below.
    allowedValues TagTemplateFieldTypeEnumTypeAllowedValue[]
    The set of allowed values for this enum. The display names of the values must be case-insensitively unique within this set. Currently, enum values can only be added to the list of allowed values. Deletion and renaming of enum values are not supported. Can have up to 500 allowed values. Structure is documented below.
    allowed_values Sequence[TagTemplateFieldTypeEnumTypeAllowedValue]
    The set of allowed values for this enum. The display names of the values must be case-insensitively unique within this set. Currently, enum values can only be added to the list of allowed values. Deletion and renaming of enum values are not supported. Can have up to 500 allowed values. Structure is documented below.
    allowedValues List<Property Map>
    The set of allowed values for this enum. The display names of the values must be case-insensitively unique within this set. Currently, enum values can only be added to the list of allowed values. Deletion and renaming of enum values are not supported. Can have up to 500 allowed values. Structure is documented below.

    TagTemplateFieldTypeEnumTypeAllowedValue, TagTemplateFieldTypeEnumTypeAllowedValueArgs

    DisplayName string
    The display name for this template.
    DisplayName string
    The display name for this template.
    displayName String
    The display name for this template.
    displayName string
    The display name for this template.
    display_name str
    The display name for this template.
    displayName String
    The display name for this template.

    Import

    TagTemplate can be imported using any of these accepted formats:

    • {{name}}

    When using the pulumi import command, TagTemplate can be imported using one of the formats above. For example:

    $ pulumi import gcp:datacatalog/tagTemplate:TagTemplate default {{name}}
    

    To learn more about importing existing cloud resources, see Importing resources.

    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
    Google Cloud Classic v7.29.0 published on Wednesday, Jun 26, 2024 by Pulumi