1. Registry
  2. Packages
  3. Google Cloud (GCP)
  4. API Docs
  5. parametermanager
  6. Template
Viewing docs for Google Cloud v10.2.0
published on Tuesday, Oct 20, 2026 by Pulumi
gcp logo
Viewing docs for Google Cloud v10.2.0
published on Tuesday, Oct 20, 2026 by Pulumi

    A Template is a logical parameter template.

    Warning: This resource is in beta, and should be used with the terraform-provider-google-beta provider. See Provider Versions for more details on beta resources.

    Example Usage

    Template Config Basic

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const template_basic = new gcp.parametermanager.Template("template-basic", {templateId: "template"});
    
    import pulumi
    import pulumi_gcp as gcp
    
    template_basic = gcp.parametermanager.Template("template-basic", template_id="template")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/parametermanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := parametermanager.NewTemplate(ctx, "template-basic", &parametermanager.TemplateArgs{
    			TemplateId: pulumi.String("template"),
    		})
    		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 template_basic = new Gcp.ParameterManager.Template("template-basic", new()
        {
            TemplateId = "template",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.parametermanager.Template;
    import com.pulumi.gcp.parametermanager.TemplateArgs;
    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) {
            var template_basic = new Template("template-basic", TemplateArgs.builder()
                .templateId("template")
                .build());
    
        }
    }
    
    resources:
      template-basic:
        type: gcp:parametermanager:Template
        properties:
          templateId: template
    
    terraform {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    resource "gcp_parametermanager_template" "template-basic" {
      lifecycle {
        create_before_destroy = true
      }
      template_id = "template"
    }
    

    Template With Format

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const template_with_format = new gcp.parametermanager.Template("template-with-format", {
        templateId: "template",
        format: "TEMPLATE_FORMAT_JSON",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    template_with_format = gcp.parametermanager.Template("template-with-format",
        template_id="template",
        format="TEMPLATE_FORMAT_JSON")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/parametermanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := parametermanager.NewTemplate(ctx, "template-with-format", &parametermanager.TemplateArgs{
    			TemplateId: pulumi.String("template"),
    			Format:     pulumi.String("TEMPLATE_FORMAT_JSON"),
    		})
    		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 template_with_format = new Gcp.ParameterManager.Template("template-with-format", new()
        {
            TemplateId = "template",
            Format = "TEMPLATE_FORMAT_JSON",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.parametermanager.Template;
    import com.pulumi.gcp.parametermanager.TemplateArgs;
    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) {
            var template_with_format = new Template("template-with-format", TemplateArgs.builder()
                .templateId("template")
                .format("TEMPLATE_FORMAT_JSON")
                .build());
    
        }
    }
    
    resources:
      template-with-format:
        type: gcp:parametermanager:Template
        properties:
          templateId: template
          format: TEMPLATE_FORMAT_JSON
    
    terraform {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    resource "gcp_parametermanager_template" "template-with-format" {
      lifecycle {
        create_before_destroy = true
      }
      template_id = "template"
      format      = "TEMPLATE_FORMAT_JSON"
    }
    

    Template With Labels

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const template_with_labels = new gcp.parametermanager.Template("template-with-labels", {
        templateId: "template",
        labels: {
            key1: "val1",
            key2: "val2",
            key3: "val3",
            key4: "val4",
            key5: "val5",
        },
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    template_with_labels = gcp.parametermanager.Template("template-with-labels",
        template_id="template",
        labels={
            "key1": "val1",
            "key2": "val2",
            "key3": "val3",
            "key4": "val4",
            "key5": "val5",
        })
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v10/go/gcp/parametermanager"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := parametermanager.NewTemplate(ctx, "template-with-labels", &parametermanager.TemplateArgs{
    			TemplateId: pulumi.String("template"),
    			Labels: pulumi.StringMap{
    				"key1": pulumi.String("val1"),
    				"key2": pulumi.String("val2"),
    				"key3": pulumi.String("val3"),
    				"key4": pulumi.String("val4"),
    				"key5": pulumi.String("val5"),
    			},
    		})
    		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 template_with_labels = new Gcp.ParameterManager.Template("template-with-labels", new()
        {
            TemplateId = "template",
            Labels = 
            {
                { "key1", "val1" },
                { "key2", "val2" },
                { "key3", "val3" },
                { "key4", "val4" },
                { "key5", "val5" },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.parametermanager.Template;
    import com.pulumi.gcp.parametermanager.TemplateArgs;
    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) {
            var template_with_labels = new Template("template-with-labels", TemplateArgs.builder()
                .templateId("template")
                .labels(Map.ofEntries(
                    Map.entry("key1", "val1"),
                    Map.entry("key2", "val2"),
                    Map.entry("key3", "val3"),
                    Map.entry("key4", "val4"),
                    Map.entry("key5", "val5")
                ))
                .build());
    
        }
    }
    
    resources:
      template-with-labels:
        type: gcp:parametermanager:Template
        properties:
          templateId: template
          labels:
            key1: val1
            key2: val2
            key3: val3
            key4: val4
            key5: val5
    
    terraform {
      required_providers {
        gcp = {
          source = "pulumi/gcp"
        }
      }
    }
    
    resource "gcp_parametermanager_template" "template-with-labels" {
      lifecycle {
        create_before_destroy = true
      }
      template_id = "template"
      labels = {
        "key1" = "val1"
        "key2" = "val2"
        "key3" = "val3"
        "key4" = "val4"
        "key5" = "val5"
      }
    }
    

    Create Template Resource

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

    Constructor syntax

    new Template(name: string, args: TemplateArgs, opts?: CustomResourceOptions);
    @overload
    def Template(resource_name: str,
                 args: TemplateArgs,
                 opts: Optional[ResourceOptions] = None)
    
    @overload
    def Template(resource_name: str,
                 opts: Optional[ResourceOptions] = None,
                 template_id: Optional[str] = None,
                 deletion_policy: Optional[str] = None,
                 format: Optional[str] = None,
                 labels: Optional[Mapping[str, str]] = None,
                 project: Optional[str] = None)
    func NewTemplate(ctx *Context, name string, args TemplateArgs, opts ...ResourceOption) (*Template, error)
    public Template(string name, TemplateArgs args, CustomResourceOptions? opts = null)
    public Template(String name, TemplateArgs args)
    public Template(String name, TemplateArgs args, CustomResourceOptions options)
    
    type: gcp:parametermanager:Template
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "gcp_parametermanager_template" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args TemplateArgs
    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 TemplateArgs
    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 TemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args TemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args TemplateArgs
    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 gcpTemplateResource = new Gcp.ParameterManager.Template("gcpTemplateResource", new()
    {
        TemplateId = "string",
        DeletionPolicy = "string",
        Format = "string",
        Labels = 
        {
            { "string", "string" },
        },
        Project = "string",
    });
    
    example, err := parametermanager.NewTemplate(ctx, "gcpTemplateResource", &parametermanager.TemplateArgs{
    	TemplateId:     pulumi.String("string"),
    	DeletionPolicy: pulumi.String("string"),
    	Format:         pulumi.String("string"),
    	Labels: pulumi.StringMap{
    		"string": pulumi.String("string"),
    	},
    	Project: pulumi.String("string"),
    })
    
    resource "gcp_parametermanager_template" "gcpTemplateResource" {
      lifecycle {
        create_before_destroy = true
      }
      template_id     = "string"
      deletion_policy = "string"
      format          = "string"
      labels = {
        "string" = "string"
      }
      project = "string"
    }
    
    var gcpTemplateResource = new com.pulumi.gcp.parametermanager.Template("gcpTemplateResource", com.pulumi.gcp.parametermanager.TemplateArgs.builder()
        .templateId("string")
        .deletionPolicy("string")
        .format("string")
        .labels(Map.of("string", "string"))
        .project("string")
        .build());
    
    gcp_template_resource = gcp.parametermanager.Template("gcpTemplateResource",
        template_id="string",
        deletion_policy="string",
        format="string",
        labels={
            "string": "string",
        },
        project="string")
    
    const gcpTemplateResource = new gcp.parametermanager.Template("gcpTemplateResource", {
        templateId: "string",
        deletionPolicy: "string",
        format: "string",
        labels: {
            string: "string",
        },
        project: "string",
    });
    
    type: gcp:parametermanager:Template
    properties:
        deletionPolicy: string
        format: string
        labels:
            string: string
        project: string
        templateId: string
    

    Template 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 Template resource accepts the following input properties:

    TemplateId string
    This must be unique within the project.
    DeletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    Format string
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    Labels Dictionary<string, string>

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    TemplateId string
    This must be unique within the project.
    DeletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    Format string
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    Labels map[string]string

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    template_id string
    This must be unique within the project.
    deletion_policy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    format string
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    labels map(string)

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    templateId String
    This must be unique within the project.
    deletionPolicy String
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    format String
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    labels Map<String,String>

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    templateId string
    This must be unique within the project.
    deletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    format string
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    labels {[key: string]: string}

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    template_id str
    This must be unique within the project.
    deletion_policy str
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    format str
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    labels Mapping[str, str]

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    templateId String
    This must be unique within the project.
    deletionPolicy String
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    format String
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    labels Map<String>

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.

    Outputs

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

    CreateTime string
    The time at which the Template was created.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    UpdateTime string
    The time at which the Template was updated.
    CreateTime string
    The time at which the Template was created.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Id string
    The provider-assigned unique ID for this managed resource.
    Name string
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    UpdateTime string
    The time at which the Template was updated.
    create_time string
    The time at which the Template was created.
    effective_labels map(string)
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    pulumi_labels map(string)
    The combination of labels configured directly on the resource and default labels configured on the provider.
    update_time string
    The time at which the Template was updated.
    createTime String
    The time at which the Template was created.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime String
    The time at which the Template was updated.
    createTime string
    The time at which the Template was created.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id string
    The provider-assigned unique ID for this managed resource.
    name string
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime string
    The time at which the Template was updated.
    create_time str
    The time at which the Template was created.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id str
    The provider-assigned unique ID for this managed resource.
    name str
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    update_time str
    The time at which the Template was updated.
    createTime String
    The time at which the Template was created.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    id String
    The provider-assigned unique ID for this managed resource.
    name String
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    updateTime String
    The time at which the Template was updated.

    Look up Existing Template Resource

    Get an existing Template 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?: TemplateState, opts?: CustomResourceOptions): Template
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            create_time: Optional[str] = None,
            deletion_policy: Optional[str] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            format: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            name: Optional[str] = None,
            project: Optional[str] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            template_id: Optional[str] = None,
            update_time: Optional[str] = None) -> Template
    func GetTemplate(ctx *Context, name string, id IDInput, state *TemplateState, opts ...ResourceOption) (*Template, error)
    public static Template Get(string name, Input<string> id, TemplateState? state, CustomResourceOptions? opts = null)
    public static Template get(String name, Output<String> id, TemplateState state, CustomResourceOptions options)
    resources:  _:    type: gcp:parametermanager:Template    get:      id: ${id}
    import {
      to = gcp_parametermanager_template.example
      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.
    The following state arguments are supported:
    CreateTime string
    The time at which the Template was created.
    DeletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    EffectiveLabels Dictionary<string, string>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Format string
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    Labels Dictionary<string, string>

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    Name string
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PulumiLabels Dictionary<string, string>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    TemplateId string
    This must be unique within the project.
    UpdateTime string
    The time at which the Template was updated.
    CreateTime string
    The time at which the Template was created.
    DeletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    EffectiveLabels map[string]string
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    Format string
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    Labels map[string]string

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    Name string
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    Project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    PulumiLabels map[string]string
    The combination of labels configured directly on the resource and default labels configured on the provider.
    TemplateId string
    This must be unique within the project.
    UpdateTime string
    The time at which the Template was updated.
    create_time string
    The time at which the Template was created.
    deletion_policy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    effective_labels map(string)
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    format string
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    labels map(string)

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name string
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumi_labels map(string)
    The combination of labels configured directly on the resource and default labels configured on the provider.
    template_id string
    This must be unique within the project.
    update_time string
    The time at which the Template was updated.
    createTime String
    The time at which the Template was created.
    deletionPolicy String
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    effectiveLabels Map<String,String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    format String
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    labels Map<String,String>

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name String
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels Map<String,String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    templateId String
    This must be unique within the project.
    updateTime String
    The time at which the Template was updated.
    createTime string
    The time at which the Template was created.
    deletionPolicy string
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    effectiveLabels {[key: string]: string}
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    format string
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    labels {[key: string]: string}

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name string
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    project string
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels {[key: string]: string}
    The combination of labels configured directly on the resource and default labels configured on the provider.
    templateId string
    This must be unique within the project.
    updateTime string
    The time at which the Template was updated.
    create_time str
    The time at which the Template was created.
    deletion_policy str
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    effective_labels Mapping[str, str]
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    format str
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    labels Mapping[str, str]

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name str
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    project str
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumi_labels Mapping[str, str]
    The combination of labels configured directly on the resource and default labels configured on the provider.
    template_id str
    This must be unique within the project.
    update_time str
    The time at which the Template was updated.
    createTime String
    The time at which the Template was created.
    deletionPolicy String
    Whether Terraform will be prevented from destroying the resource. Defaults to DELETE. When a 'terraform destroy' or 'pulumi up' would delete the resource, the command will fail if this field is set to "PREVENT" in Terraform state. When set to "ABANDON", the command will remove the resource from Terraform management without updating or deleting the resource in the API. When set to "DELETE", deleting the resource is allowed.
    effectiveLabels Map<String>
    All of labels (key/value pairs) present on the resource in GCP, including the labels configured through Pulumi, other clients and services.
    format String
    The format type of the template resource. Default value is TEMPLATE_FORMAT_YAML. Possible values are: TEMPLATE_FORMAT_YAML, TEMPLATE_FORMAT_JSON.
    labels Map<String>

    The labels assigned to this Template. Label keys must be between 1 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}][\p{Ll}\p{Lo}\p{N}-]{0,62} Label values must be between 0 and 63 characters long, have a UTF-8 encoding of maximum 128 bytes, and must conform to the following PCRE regular expression: [\p{Ll}\p{Lo}\p{N}-]{0,63} No more than 64 labels can be assigned to a given resource. An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

    Note: This field is non-authoritative, and will only manage the labels present in your configuration. Please refer to the field effectiveLabels for all of the labels present on the resource.

    name String
    The resource name of the Template. Format: projects/{{project}}/locations/global/templates/{{template_id}}
    project String
    The ID of the project in which the resource belongs. If it is not provided, the provider project is used.
    pulumiLabels Map<String>
    The combination of labels configured directly on the resource and default labels configured on the provider.
    templateId String
    This must be unique within the project.
    updateTime String
    The time at which the Template was updated.

    Import

    Template can be imported using any of these accepted formats:

    • projects/{{project}}/locations/global/templates/{{template_id}}
    • {{project}}/{{template_id}}
    • {{template_id}}

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

    $ pulumi import gcp:parametermanager/template:Template default projects/{{project}}/locations/global/templates/{{template_id}}
    $ pulumi import gcp:parametermanager/template:Template default {{project}}/{{template_id}}
    $ pulumi import gcp:parametermanager/template:Template default {{template_id}}
    

    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
    Viewing docs for Google Cloud v10.2.0
    published on Tuesday, Oct 20, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial