1. Packages
  2. Google Cloud (GCP) Classic
  3. API Docs
  4. compute
  5. InstanceTemplate
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

gcp.compute.InstanceTemplate

Explore with Pulumi AI

gcp logo
Google Cloud Classic v7.2.1 published on Wednesday, Nov 22, 2023 by Pulumi

    Note: Global instance templates can be used in any region. To lower the impact of outages outside your region and gain data residency within your region, use google_compute_region_instance_template.

    Manages a VM instance template resource within GCE. For more information see the official documentation and API.

    Using with Instance Group Manager

    Instance Templates cannot be updated after creation with the Google Cloud Platform API. In order to update an Instance Template, this provider will create a replacement. In order to effectively use an Instance Template resource with an Instance Group Manager resource. Either omit the Instance Template name attribute, or specify a partial name with name_prefix. Example:

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.InstanceTemplate;
    import com.pulumi.gcp.compute.InstanceTemplateArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
    import com.pulumi.gcp.compute.InstanceGroupManager;
    import com.pulumi.gcp.compute.InstanceGroupManagerArgs;
    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 instanceTemplate = new InstanceTemplate("instanceTemplate", InstanceTemplateArgs.builder()        
                .namePrefix("instance-template-")
                .machineType("e2-medium")
                .region("us-central1")
                .disks()
                .networkInterfaces()
                .build());
    
            var instanceGroupManager = new InstanceGroupManager("instanceGroupManager", InstanceGroupManagerArgs.builder()        
                .instanceTemplate(instanceTemplate.id())
                .baseInstanceName("instance-group-manager")
                .zone("us-central1-f")
                .targetSize("1")
                .build());
    
        }
    }
    
    resources:
      instanceTemplate:
        type: gcp:compute:InstanceTemplate
        properties:
          namePrefix: instance-template-
          machineType: e2-medium
          region: us-central1
          # boot disk
          disks:
            - {}
          # networking
          networkInterfaces:
            - {}
      instanceGroupManager:
        type: gcp:compute:InstanceGroupManager
        properties:
          instanceTemplate: ${instanceTemplate.id}
          baseInstanceName: instance-group-manager
          zone: us-central1-f
          targetSize: '1'
    

    With this setup, this provider generates a unique name for your Instance Template and can then update the Instance Group manager without conflict before destroying the previous Instance Template.

    Deploying the Latest Image

    A common way to use instance templates and managed instance groups is to deploy the latest image in a family, usually the latest build of your application. There are two ways to do this in the provider, and they have their pros and cons. The difference ends up being in how “latest” is interpreted. You can either deploy the latest image available when the provider runs, or you can have each instance check what the latest image is when it’s being created, either as part of a scaling event or being rebuilt by the instance group manager.

    If you’re not sure, we recommend deploying the latest image available when the provider runs, because this means all the instances in your group will be based on the same image, always, and means that no upgrades or changes to your instances happen outside of a pulumi up. You can achieve this by using the gcp.compute.Image data source, which will retrieve the latest image on every pulumi apply, and will update the template to use that specific image:

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const myImage = gcp.compute.getImage({
        family: "debian-11",
        project: "debian-cloud",
    });
    const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", {
        namePrefix: "instance-template-",
        machineType: "e2-medium",
        region: "us-central1",
        disks: [{
            sourceImage: myImage.then(myImage => myImage.selfLink),
        }],
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_image = gcp.compute.get_image(family="debian-11",
        project="debian-cloud")
    instance_template = gcp.compute.InstanceTemplate("instanceTemplate",
        name_prefix="instance-template-",
        machine_type="e2-medium",
        region="us-central1",
        disks=[gcp.compute.InstanceTemplateDiskArgs(
            source_image=my_image.self_link,
        )])
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var myImage = Gcp.Compute.GetImage.Invoke(new()
        {
            Family = "debian-11",
            Project = "debian-cloud",
        });
    
        var instanceTemplate = new Gcp.Compute.InstanceTemplate("instanceTemplate", new()
        {
            NamePrefix = "instance-template-",
            MachineType = "e2-medium",
            Region = "us-central1",
            Disks = new[]
            {
                new Gcp.Compute.Inputs.InstanceTemplateDiskArgs
                {
                    SourceImage = myImage.Apply(getImageResult => getImageResult.SelfLink),
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myImage, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
    			Family:  pulumi.StringRef("debian-11"),
    			Project: pulumi.StringRef("debian-cloud"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewInstanceTemplate(ctx, "instanceTemplate", &compute.InstanceTemplateArgs{
    			NamePrefix:  pulumi.String("instance-template-"),
    			MachineType: pulumi.String("e2-medium"),
    			Region:      pulumi.String("us-central1"),
    			Disks: compute.InstanceTemplateDiskArray{
    				&compute.InstanceTemplateDiskArgs{
    					SourceImage: *pulumi.String(myImage.SelfLink),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ComputeFunctions;
    import com.pulumi.gcp.compute.inputs.GetImageArgs;
    import com.pulumi.gcp.compute.InstanceTemplate;
    import com.pulumi.gcp.compute.InstanceTemplateArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
    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) {
            final var myImage = ComputeFunctions.getImage(GetImageArgs.builder()
                .family("debian-11")
                .project("debian-cloud")
                .build());
    
            var instanceTemplate = new InstanceTemplate("instanceTemplate", InstanceTemplateArgs.builder()        
                .namePrefix("instance-template-")
                .machineType("e2-medium")
                .region("us-central1")
                .disks(InstanceTemplateDiskArgs.builder()
                    .sourceImage(myImage.applyValue(getImageResult -> getImageResult.selfLink()))
                    .build())
                .build());
    
        }
    }
    
    resources:
      instanceTemplate:
        type: gcp:compute:InstanceTemplate
        properties:
          namePrefix: instance-template-
          machineType: e2-medium
          region: us-central1
          # boot disk
          disks:
            - sourceImage: ${myImage.selfLink}
    variables:
      myImage:
        fn::invoke:
          Function: gcp:compute:getImage
          Arguments:
            family: debian-11
            project: debian-cloud
    

    To have instances update to the latest on every scaling event or instance re-creation, use the family as the image for the disk, and it will use GCP’s default behavior, setting the image for the template to the family:

    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", {
        disks: [{
            sourceImage: "debian-cloud/debian-11",
        }],
        machineType: "e2-medium",
        namePrefix: "instance-template-",
        region: "us-central1",
    });
    
    import pulumi
    import pulumi_gcp as gcp
    
    instance_template = gcp.compute.InstanceTemplate("instanceTemplate",
        disks=[gcp.compute.InstanceTemplateDiskArgs(
            source_image="debian-cloud/debian-11",
        )],
        machine_type="e2-medium",
        name_prefix="instance-template-",
        region="us-central1")
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var instanceTemplate = new Gcp.Compute.InstanceTemplate("instanceTemplate", new()
        {
            Disks = new[]
            {
                new Gcp.Compute.Inputs.InstanceTemplateDiskArgs
                {
                    SourceImage = "debian-cloud/debian-11",
                },
            },
            MachineType = "e2-medium",
            NamePrefix = "instance-template-",
            Region = "us-central1",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewInstanceTemplate(ctx, "instanceTemplate", &compute.InstanceTemplateArgs{
    			Disks: compute.InstanceTemplateDiskArray{
    				&compute.InstanceTemplateDiskArgs{
    					SourceImage: pulumi.String("debian-cloud/debian-11"),
    				},
    			},
    			MachineType: pulumi.String("e2-medium"),
    			NamePrefix:  pulumi.String("instance-template-"),
    			Region:      pulumi.String("us-central1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.InstanceTemplate;
    import com.pulumi.gcp.compute.InstanceTemplateArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
    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 instanceTemplate = new InstanceTemplate("instanceTemplate", InstanceTemplateArgs.builder()        
                .disks(InstanceTemplateDiskArgs.builder()
                    .sourceImage("debian-cloud/debian-11")
                    .build())
                .machineType("e2-medium")
                .namePrefix("instance-template-")
                .region("us-central1")
                .build());
    
        }
    }
    
    resources:
      instanceTemplate:
        type: gcp:compute:InstanceTemplate
        properties:
          # boot disk
          disks:
            - sourceImage: debian-cloud/debian-11
          machineType: e2-medium
          namePrefix: instance-template-
          region: us-central1
    

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = Gcp.Compute.GetDefaultServiceAccount.Invoke();
    
        var myImage = Gcp.Compute.GetImage.Invoke(new()
        {
            Family = "debian-11",
            Project = "debian-cloud",
        });
    
        var foobar = new Gcp.Compute.InstanceTemplate("foobar", new()
        {
            MachineType = "e2-medium",
            CanIpForward = false,
            Tags = new[]
            {
                "foo",
                "bar",
            },
            Disks = new[]
            {
                new Gcp.Compute.Inputs.InstanceTemplateDiskArgs
                {
                    SourceImage = myImage.Apply(getImageResult => getImageResult.SelfLink),
                    AutoDelete = true,
                    Boot = true,
                },
            },
            NetworkInterfaces = new[]
            {
                new Gcp.Compute.Inputs.InstanceTemplateNetworkInterfaceArgs
                {
                    Network = "default",
                },
            },
            Scheduling = new Gcp.Compute.Inputs.InstanceTemplateSchedulingArgs
            {
                Preemptible = false,
                AutomaticRestart = true,
            },
            Metadata = 
            {
                { "gce-software-declaration", @"{
      ""softwareRecipes"": [{
        ""name"": ""install-gce-service-proxy-agent"",
        ""desired_state"": ""INSTALLED"",
        ""installSteps"": [{
          ""scriptRun"": {
            ""script"": ""#! /bin/bash\nZONE=$(curl --silent http://metadata.google.internal/computeMetadata/v1/instance/zone -H Metadata-Flavor:Google | cut -d/ -f4 )\nexport SERVICE_PROXY_AGENT_DIRECTORY=$(mktemp -d)\nsudo gsutil cp   gs://gce-service-proxy-""$ZONE""/service-proxy-agent/releases/service-proxy-agent-0.2.tgz   ""$SERVICE_PROXY_AGENT_DIRECTORY""   || sudo gsutil cp     gs://gce-service-proxy/service-proxy-agent/releases/service-proxy-agent-0.2.tgz     ""$SERVICE_PROXY_AGENT_DIRECTORY""\nsudo tar -xzf ""$SERVICE_PROXY_AGENT_DIRECTORY""/service-proxy-agent-0.2.tgz -C ""$SERVICE_PROXY_AGENT_DIRECTORY""\n""$SERVICE_PROXY_AGENT_DIRECTORY""/service-proxy-agent/service-proxy-agent-bootstrap.sh""
          }
        }]
      }]
    }
    " },
                { "gce-service-proxy", @"{
      ""api-version"": ""0.2"",
      ""proxy-spec"": {
        ""proxy-port"": 15001,
        ""network"": ""my-network"",
        ""tracing"": ""ON"",
        ""access-log"": ""/var/log/envoy/access.log""
      }
      ""service"": {
        ""serving-ports"": [80, 81]
      },
     ""labels"": {
       ""app_name"": ""bookserver_app"",
       ""app_version"": ""STABLE""
      }
    }
    " },
                { "enable-guest-attributes", "true" },
                { "enable-osconfig", "true" },
            },
            ServiceAccount = new Gcp.Compute.Inputs.InstanceTemplateServiceAccountArgs
            {
                Email = @default.Apply(@default => @default.Apply(getDefaultServiceAccountResult => getDefaultServiceAccountResult.Email)),
                Scopes = new[]
                {
                    "cloud-platform",
                },
            },
            Labels = 
            {
                { "gce-service-proxy", "on" },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_default, err := compute.GetDefaultServiceAccount(ctx, nil, nil)
    		if err != nil {
    			return err
    		}
    		myImage, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
    			Family:  pulumi.StringRef("debian-11"),
    			Project: pulumi.StringRef("debian-cloud"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewInstanceTemplate(ctx, "foobar", &compute.InstanceTemplateArgs{
    			MachineType:  pulumi.String("e2-medium"),
    			CanIpForward: pulumi.Bool(false),
    			Tags: pulumi.StringArray{
    				pulumi.String("foo"),
    				pulumi.String("bar"),
    			},
    			Disks: compute.InstanceTemplateDiskArray{
    				&compute.InstanceTemplateDiskArgs{
    					SourceImage: *pulumi.String(myImage.SelfLink),
    					AutoDelete:  pulumi.Bool(true),
    					Boot:        pulumi.Bool(true),
    				},
    			},
    			NetworkInterfaces: compute.InstanceTemplateNetworkInterfaceArray{
    				&compute.InstanceTemplateNetworkInterfaceArgs{
    					Network: pulumi.String("default"),
    				},
    			},
    			Scheduling: &compute.InstanceTemplateSchedulingArgs{
    				Preemptible:      pulumi.Bool(false),
    				AutomaticRestart: pulumi.Bool(true),
    			},
    			Metadata: pulumi.Map{
    				"gce-software-declaration": pulumi.Any(`{
      "softwareRecipes": [{
        "name": "install-gce-service-proxy-agent",
        "desired_state": "INSTALLED",
        "installSteps": [{
          "scriptRun": {
            "script": "#! /bin/bash\nZONE=$(curl --silent http://metadata.google.internal/computeMetadata/v1/instance/zone -H Metadata-Flavor:Google | cut -d/ -f4 )\nexport SERVICE_PROXY_AGENT_DIRECTORY=$(mktemp -d)\nsudo gsutil cp   gs://gce-service-proxy-"$ZONE"/service-proxy-agent/releases/service-proxy-agent-0.2.tgz   "$SERVICE_PROXY_AGENT_DIRECTORY"   || sudo gsutil cp     gs://gce-service-proxy/service-proxy-agent/releases/service-proxy-agent-0.2.tgz     "$SERVICE_PROXY_AGENT_DIRECTORY"\nsudo tar -xzf "$SERVICE_PROXY_AGENT_DIRECTORY"/service-proxy-agent-0.2.tgz -C "$SERVICE_PROXY_AGENT_DIRECTORY"\n"$SERVICE_PROXY_AGENT_DIRECTORY"/service-proxy-agent/service-proxy-agent-bootstrap.sh"
          }
        }]
      }]
    }
    `),
    				"gce-service-proxy": pulumi.Any(`{
      "api-version": "0.2",
      "proxy-spec": {
        "proxy-port": 15001,
        "network": "my-network",
        "tracing": "ON",
        "access-log": "/var/log/envoy/access.log"
      }
      "service": {
        "serving-ports": [80, 81]
      },
     "labels": {
       "app_name": "bookserver_app",
       "app_version": "STABLE"
      }
    }
    `),
    				"enable-guest-attributes": pulumi.Any("true"),
    				"enable-osconfig":         pulumi.Any("true"),
    			},
    			ServiceAccount: &compute.InstanceTemplateServiceAccountArgs{
    				Email: *pulumi.String(_default.Email),
    				Scopes: pulumi.StringArray{
    					pulumi.String("cloud-platform"),
    				},
    			},
    			Labels: pulumi.StringMap{
    				"gce-service-proxy": pulumi.String("on"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.serviceaccount.Account;
    import com.pulumi.gcp.serviceaccount.AccountArgs;
    import com.pulumi.gcp.compute.ComputeFunctions;
    import com.pulumi.gcp.compute.inputs.GetImageArgs;
    import com.pulumi.gcp.compute.Disk;
    import com.pulumi.gcp.compute.DiskArgs;
    import com.pulumi.gcp.compute.ResourcePolicy;
    import com.pulumi.gcp.compute.ResourcePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyScheduleArgs;
    import com.pulumi.gcp.compute.inputs.ResourcePolicySnapshotSchedulePolicyScheduleDailyScheduleArgs;
    import com.pulumi.gcp.compute.InstanceTemplate;
    import com.pulumi.gcp.compute.InstanceTemplateArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateSchedulingArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateServiceAccountArgs;
    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 defaultAccount = new Account("defaultAccount", AccountArgs.builder()        
                .accountId("service-account-id")
                .displayName("Service Account")
                .build());
    
            final var myImage = ComputeFunctions.getImage(GetImageArgs.builder()
                .family("debian-11")
                .project("debian-cloud")
                .build());
    
            var foobar = new Disk("foobar", DiskArgs.builder()        
                .image(myImage.applyValue(getImageResult -> getImageResult.selfLink()))
                .size(10)
                .type("pd-ssd")
                .zone("us-central1-a")
                .build());
    
            var dailyBackup = new ResourcePolicy("dailyBackup", ResourcePolicyArgs.builder()        
                .region("us-central1")
                .snapshotSchedulePolicy(ResourcePolicySnapshotSchedulePolicyArgs.builder()
                    .schedule(ResourcePolicySnapshotSchedulePolicyScheduleArgs.builder()
                        .dailySchedule(ResourcePolicySnapshotSchedulePolicyScheduleDailyScheduleArgs.builder()
                            .daysInCycle(1)
                            .startTime("04:00")
                            .build())
                        .build())
                    .build())
                .build());
    
            var defaultInstanceTemplate = new InstanceTemplate("defaultInstanceTemplate", InstanceTemplateArgs.builder()        
                .description("This template is used to create app server instances.")
                .tags(            
                    "foo",
                    "bar")
                .labels(Map.of("environment", "dev"))
                .instanceDescription("description assigned to instances")
                .machineType("e2-medium")
                .canIpForward(false)
                .scheduling(InstanceTemplateSchedulingArgs.builder()
                    .automaticRestart(true)
                    .onHostMaintenance("MIGRATE")
                    .build())
                .disks(            
                    InstanceTemplateDiskArgs.builder()
                        .sourceImage("debian-cloud/debian-11")
                        .autoDelete(true)
                        .boot(true)
                        .resourcePolicies(dailyBackup.id())
                        .build(),
                    InstanceTemplateDiskArgs.builder()
                        .source(foobar.name())
                        .autoDelete(false)
                        .boot(false)
                        .build())
                .networkInterfaces(InstanceTemplateNetworkInterfaceArgs.builder()
                    .network("default")
                    .build())
                .metadata(Map.of("foo", "bar"))
                .serviceAccount(InstanceTemplateServiceAccountArgs.builder()
                    .email(defaultAccount.email())
                    .scopes("cloud-platform")
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    default = gcp.compute.get_default_service_account()
    my_image = gcp.compute.get_image(family="debian-11",
        project="debian-cloud")
    foobar = gcp.compute.InstanceTemplate("foobar",
        machine_type="e2-medium",
        can_ip_forward=False,
        tags=[
            "foo",
            "bar",
        ],
        disks=[gcp.compute.InstanceTemplateDiskArgs(
            source_image=my_image.self_link,
            auto_delete=True,
            boot=True,
        )],
        network_interfaces=[gcp.compute.InstanceTemplateNetworkInterfaceArgs(
            network="default",
        )],
        scheduling=gcp.compute.InstanceTemplateSchedulingArgs(
            preemptible=False,
            automatic_restart=True,
        ),
        metadata={
            "gce-software-declaration": """{
      "softwareRecipes": [{
        "name": "install-gce-service-proxy-agent",
        "desired_state": "INSTALLED",
        "installSteps": [{
          "scriptRun": {
            "script": "#! /bin/bash\nZONE=$(curl --silent http://metadata.google.internal/computeMetadata/v1/instance/zone -H Metadata-Flavor:Google | cut -d/ -f4 )\nexport SERVICE_PROXY_AGENT_DIRECTORY=$(mktemp -d)\nsudo gsutil cp   gs://gce-service-proxy-"$ZONE"/service-proxy-agent/releases/service-proxy-agent-0.2.tgz   "$SERVICE_PROXY_AGENT_DIRECTORY"   || sudo gsutil cp     gs://gce-service-proxy/service-proxy-agent/releases/service-proxy-agent-0.2.tgz     "$SERVICE_PROXY_AGENT_DIRECTORY"\nsudo tar -xzf "$SERVICE_PROXY_AGENT_DIRECTORY"/service-proxy-agent-0.2.tgz -C "$SERVICE_PROXY_AGENT_DIRECTORY"\n"$SERVICE_PROXY_AGENT_DIRECTORY"/service-proxy-agent/service-proxy-agent-bootstrap.sh"
          }
        }]
      }]
    }
    """,
            "gce-service-proxy": """{
      "api-version": "0.2",
      "proxy-spec": {
        "proxy-port": 15001,
        "network": "my-network",
        "tracing": "ON",
        "access-log": "/var/log/envoy/access.log"
      }
      "service": {
        "serving-ports": [80, 81]
      },
     "labels": {
       "app_name": "bookserver_app",
       "app_version": "STABLE"
      }
    }
    """,
            "enable-guest-attributes": "true",
            "enable-osconfig": "true",
        },
        service_account=gcp.compute.InstanceTemplateServiceAccountArgs(
            email=default.email,
            scopes=["cloud-platform"],
        ),
        labels={
            "gce-service-proxy": "on",
        })
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const default = gcp.compute.getDefaultServiceAccount({});
    const myImage = gcp.compute.getImage({
        family: "debian-11",
        project: "debian-cloud",
    });
    const foobar = new gcp.compute.InstanceTemplate("foobar", {
        machineType: "e2-medium",
        canIpForward: false,
        tags: [
            "foo",
            "bar",
        ],
        disks: [{
            sourceImage: myImage.then(myImage => myImage.selfLink),
            autoDelete: true,
            boot: true,
        }],
        networkInterfaces: [{
            network: "default",
        }],
        scheduling: {
            preemptible: false,
            automaticRestart: true,
        },
        metadata: {
            "gce-software-declaration": `{
      "softwareRecipes": [{
        "name": "install-gce-service-proxy-agent",
        "desired_state": "INSTALLED",
        "installSteps": [{
          "scriptRun": {
            "script": "#! /bin/bash\\nZONE=$(curl --silent http://metadata.google.internal/computeMetadata/v1/instance/zone -H Metadata-Flavor:Google | cut -d/ -f4 )\\nexport SERVICE_PROXY_AGENT_DIRECTORY=$(mktemp -d)\\nsudo gsutil cp   gs://gce-service-proxy-"$ZONE"/service-proxy-agent/releases/service-proxy-agent-0.2.tgz   "$SERVICE_PROXY_AGENT_DIRECTORY"   || sudo gsutil cp     gs://gce-service-proxy/service-proxy-agent/releases/service-proxy-agent-0.2.tgz     "$SERVICE_PROXY_AGENT_DIRECTORY"\\nsudo tar -xzf "$SERVICE_PROXY_AGENT_DIRECTORY"/service-proxy-agent-0.2.tgz -C "$SERVICE_PROXY_AGENT_DIRECTORY"\\n"$SERVICE_PROXY_AGENT_DIRECTORY"/service-proxy-agent/service-proxy-agent-bootstrap.sh"
          }
        }]
      }]
    }
    `,
            "gce-service-proxy": `{
      "api-version": "0.2",
      "proxy-spec": {
        "proxy-port": 15001,
        "network": "my-network",
        "tracing": "ON",
        "access-log": "/var/log/envoy/access.log"
      }
      "service": {
        "serving-ports": [80, 81]
      },
     "labels": {
       "app_name": "bookserver_app",
       "app_version": "STABLE"
      }
    }
    `,
            "enable-guest-attributes": "true",
            "enable-osconfig": "true",
        },
        serviceAccount: {
            email: _default.then(_default => _default.email),
            scopes: ["cloud-platform"],
        },
        labels: {
            "gce-service-proxy": "on",
        },
    });
    
    resources:
      defaultAccount:
        type: gcp:serviceaccount:Account
        properties:
          accountId: service-account-id
          displayName: Service Account
      defaultInstanceTemplate:
        type: gcp:compute:InstanceTemplate
        properties:
          description: This template is used to create app server instances.
          tags:
            - foo
            - bar
          labels:
            environment: dev
          instanceDescription: description assigned to instances
          machineType: e2-medium
          canIpForward: false
          scheduling:
            automaticRestart: true
            onHostMaintenance: MIGRATE
          # Create a new boot disk from an image
          disks:
            - sourceImage: debian-cloud/debian-11
              autoDelete: true
              boot: true
              resourcePolicies:
                - ${dailyBackup.id}
            - source: ${foobar.name}
              autoDelete: false
              boot: false
          networkInterfaces:
            - network: default
          metadata:
            foo: bar
          serviceAccount:
            email: ${defaultAccount.email}
            scopes:
              - cloud-platform
      foobar:
        type: gcp:compute:Disk
        properties:
          image: ${myImage.selfLink}
          size: 10
          type: pd-ssd
          zone: us-central1-a
      dailyBackup:
        type: gcp:compute:ResourcePolicy
        properties:
          region: us-central1
          snapshotSchedulePolicy:
            schedule:
              dailySchedule:
                daysInCycle: 1
                startTime: 04:00
    variables:
      myImage:
        fn::invoke:
          Function: gcp:compute:getImage
          Arguments:
            family: debian-11
            project: debian-cloud
    

    Automatic Envoy Deployment

    Coming soon!

    Coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ComputeFunctions;
    import com.pulumi.gcp.compute.inputs.GetDefaultServiceAccountArgs;
    import com.pulumi.gcp.compute.inputs.GetImageArgs;
    import com.pulumi.gcp.compute.InstanceTemplate;
    import com.pulumi.gcp.compute.InstanceTemplateArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateSchedulingArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateServiceAccountArgs;
    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) {
            final var default = ComputeFunctions.getDefaultServiceAccount();
    
            final var myImage = ComputeFunctions.getImage(GetImageArgs.builder()
                .family("debian-11")
                .project("debian-cloud")
                .build());
    
            var foobar = new InstanceTemplate("foobar", InstanceTemplateArgs.builder()        
                .machineType("e2-medium")
                .canIpForward(false)
                .tags(            
                    "foo",
                    "bar")
                .disks(InstanceTemplateDiskArgs.builder()
                    .sourceImage(myImage.applyValue(getImageResult -> getImageResult.selfLink()))
                    .autoDelete(true)
                    .boot(true)
                    .build())
                .networkInterfaces(InstanceTemplateNetworkInterfaceArgs.builder()
                    .network("default")
                    .build())
                .scheduling(InstanceTemplateSchedulingArgs.builder()
                    .preemptible(false)
                    .automaticRestart(true)
                    .build())
                .metadata(Map.ofEntries(
                    Map.entry("gce-software-declaration", """
    {
      "softwareRecipes": [{
        "name": "install-gce-service-proxy-agent",
        "desired_state": "INSTALLED",
        "installSteps": [{
          "scriptRun": {
            "script": "#! /bin/bash\nZONE=$(curl --silent http://metadata.google.internal/computeMetadata/v1/instance/zone -H Metadata-Flavor:Google | cut -d/ -f4 )\nexport SERVICE_PROXY_AGENT_DIRECTORY=$(mktemp -d)\nsudo gsutil cp   gs://gce-service-proxy-"$ZONE"/service-proxy-agent/releases/service-proxy-agent-0.2.tgz   "$SERVICE_PROXY_AGENT_DIRECTORY"   || sudo gsutil cp     gs://gce-service-proxy/service-proxy-agent/releases/service-proxy-agent-0.2.tgz     "$SERVICE_PROXY_AGENT_DIRECTORY"\nsudo tar -xzf "$SERVICE_PROXY_AGENT_DIRECTORY"/service-proxy-agent-0.2.tgz -C "$SERVICE_PROXY_AGENT_DIRECTORY"\n"$SERVICE_PROXY_AGENT_DIRECTORY"/service-proxy-agent/service-proxy-agent-bootstrap.sh"
          }
        }]
      }]
    }
                    """),
                    Map.entry("gce-service-proxy", """
    {
      "api-version": "0.2",
      "proxy-spec": {
        "proxy-port": 15001,
        "network": "my-network",
        "tracing": "ON",
        "access-log": "/var/log/envoy/access.log"
      }
      "service": {
        "serving-ports": [80, 81]
      },
     "labels": {
       "app_name": "bookserver_app",
       "app_version": "STABLE"
      }
    }
                    """),
                    Map.entry("enable-guest-attributes", "true"),
                    Map.entry("enable-osconfig", "true")
                ))
                .serviceAccount(InstanceTemplateServiceAccountArgs.builder()
                    .email(default_.email())
                    .scopes("cloud-platform")
                    .build())
                .labels(Map.of("gce-service-proxy", "on"))
                .build());
    
        }
    }
    

    Coming soon!

    Coming soon!

    resources:
      foobar:
        type: gcp:compute:InstanceTemplate
        properties:
          machineType: e2-medium
          canIpForward: false
          tags:
            - foo
            - bar
          disks:
            - sourceImage: ${myImage.selfLink}
              autoDelete: true
              boot: true
          networkInterfaces:
            - network: default
          scheduling:
            preemptible: false
            automaticRestart: true
          metadata:
            gce-software-declaration: |
              {
                "softwareRecipes": [{
                  "name": "install-gce-service-proxy-agent",
                  "desired_state": "INSTALLED",
                  "installSteps": [{
                    "scriptRun": {
                      "script": "#! /bin/bash\nZONE=$(curl --silent http://metadata.google.internal/computeMetadata/v1/instance/zone -H Metadata-Flavor:Google | cut -d/ -f4 )\nexport SERVICE_PROXY_AGENT_DIRECTORY=$(mktemp -d)\nsudo gsutil cp   gs://gce-service-proxy-"$ZONE"/service-proxy-agent/releases/service-proxy-agent-0.2.tgz   "$SERVICE_PROXY_AGENT_DIRECTORY"   || sudo gsutil cp     gs://gce-service-proxy/service-proxy-agent/releases/service-proxy-agent-0.2.tgz     "$SERVICE_PROXY_AGENT_DIRECTORY"\nsudo tar -xzf "$SERVICE_PROXY_AGENT_DIRECTORY"/service-proxy-agent-0.2.tgz -C "$SERVICE_PROXY_AGENT_DIRECTORY"\n"$SERVICE_PROXY_AGENT_DIRECTORY"/service-proxy-agent/service-proxy-agent-bootstrap.sh"
                    }
                  }]
                }]
              }          
            gce-service-proxy: |
              {
                "api-version": "0.2",
                "proxy-spec": {
                  "proxy-port": 15001,
                  "network": "my-network",
                  "tracing": "ON",
                  "access-log": "/var/log/envoy/access.log"
                }
                "service": {
                  "serving-ports": [80, 81]
                },
               "labels": {
                 "app_name": "bookserver_app",
                 "app_version": "STABLE"
                }
              }          
            enable-guest-attributes: 'true'
            enable-osconfig: 'true'
          serviceAccount:
            email: ${default.email}
            scopes:
              - cloud-platform
          labels:
            gce-service-proxy: on
    variables:
      default:
        fn::invoke:
          Function: gcp:compute:getDefaultServiceAccount
          Arguments: {}
      myImage:
        fn::invoke:
          Function: gcp:compute:getImage
          Arguments:
            family: debian-11
            project: debian-cloud
    

    . Example

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var myImage = Gcp.Compute.GetImage.Invoke(new()
        {
            Family = "debian-11",
            Project = "debian-cloud",
        });
    
        var instanceTemplate = new Gcp.Compute.InstanceTemplate("instanceTemplate", new()
        {
            NamePrefix = "instance-template-",
            MachineType = "e2-medium",
            Region = "us-central1",
            Disks = new[]
            {
                new Gcp.Compute.Inputs.InstanceTemplateDiskArgs
                {
                    SourceImage = myImage.Apply(getImageResult => getImageResult.SelfLink),
                },
            },
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		myImage, err := compute.LookupImage(ctx, &compute.LookupImageArgs{
    			Family:  pulumi.StringRef("debian-11"),
    			Project: pulumi.StringRef("debian-cloud"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = compute.NewInstanceTemplate(ctx, "instanceTemplate", &compute.InstanceTemplateArgs{
    			NamePrefix:  pulumi.String("instance-template-"),
    			MachineType: pulumi.String("e2-medium"),
    			Region:      pulumi.String("us-central1"),
    			Disks: compute.InstanceTemplateDiskArray{
    				&compute.InstanceTemplateDiskArgs{
    					SourceImage: *pulumi.String(myImage.SelfLink),
    				},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.InstanceTemplate;
    import com.pulumi.gcp.compute.InstanceTemplateArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateNetworkInterfaceArgs;
    import com.pulumi.gcp.compute.InstanceGroupManager;
    import com.pulumi.gcp.compute.InstanceGroupManagerArgs;
    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 instanceTemplate = new InstanceTemplate("instanceTemplate", InstanceTemplateArgs.builder()        
                .namePrefix("instance-template-")
                .machineType("e2-medium")
                .region("us-central1")
                .disks()
                .networkInterfaces()
                .build());
    
            var instanceGroupManager = new InstanceGroupManager("instanceGroupManager", InstanceGroupManagerArgs.builder()        
                .instanceTemplate(instanceTemplate.id())
                .baseInstanceName("instance-group-manager")
                .zone("us-central1-f")
                .targetSize("1")
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    my_image = gcp.compute.get_image(family="debian-11",
        project="debian-cloud")
    instance_template = gcp.compute.InstanceTemplate("instanceTemplate",
        name_prefix="instance-template-",
        machine_type="e2-medium",
        region="us-central1",
        disks=[gcp.compute.InstanceTemplateDiskArgs(
            source_image=my_image.self_link,
        )])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const myImage = gcp.compute.getImage({
        family: "debian-11",
        project: "debian-cloud",
    });
    const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", {
        namePrefix: "instance-template-",
        machineType: "e2-medium",
        region: "us-central1",
        disks: [{
            sourceImage: myImage.then(myImage => myImage.selfLink),
        }],
    });
    
    resources:
      instanceTemplate:
        type: gcp:compute:InstanceTemplate
        properties:
          namePrefix: instance-template-
          machineType: e2-medium
          region: us-central1
          # boot disk
          disks:
            - {}
          # networking
          networkInterfaces:
            - {}
      instanceGroupManager:
        type: gcp:compute:InstanceGroupManager
        properties:
          instanceTemplate: ${instanceTemplate.id}
          baseInstanceName: instance-group-manager
          zone: us-central1-f
          targetSize: '1'
    

    the template to use that specific image

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Gcp = Pulumi.Gcp;
    
    return await Deployment.RunAsync(() => 
    {
        var instanceTemplate = new Gcp.Compute.InstanceTemplate("instanceTemplate", new()
        {
            Disks = new[]
            {
                new Gcp.Compute.Inputs.InstanceTemplateDiskArgs
                {
                    SourceImage = "debian-cloud/debian-11",
                },
            },
            MachineType = "e2-medium",
            NamePrefix = "instance-template-",
            Region = "us-central1",
        });
    
    });
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-gcp/sdk/v7/go/gcp/compute"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := compute.NewInstanceTemplate(ctx, "instanceTemplate", &compute.InstanceTemplateArgs{
    			Disks: compute.InstanceTemplateDiskArray{
    				&compute.InstanceTemplateDiskArgs{
    					SourceImage: pulumi.String("debian-cloud/debian-11"),
    				},
    			},
    			MachineType: pulumi.String("e2-medium"),
    			NamePrefix:  pulumi.String("instance-template-"),
    			Region:      pulumi.String("us-central1"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.ComputeFunctions;
    import com.pulumi.gcp.compute.inputs.GetImageArgs;
    import com.pulumi.gcp.compute.InstanceTemplate;
    import com.pulumi.gcp.compute.InstanceTemplateArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
    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) {
            final var myImage = ComputeFunctions.getImage(GetImageArgs.builder()
                .family("debian-11")
                .project("debian-cloud")
                .build());
    
            var instanceTemplate = new InstanceTemplate("instanceTemplate", InstanceTemplateArgs.builder()        
                .namePrefix("instance-template-")
                .machineType("e2-medium")
                .region("us-central1")
                .disks(InstanceTemplateDiskArgs.builder()
                    .sourceImage(myImage.applyValue(getImageResult -> getImageResult.selfLink()))
                    .build())
                .build());
    
        }
    }
    
    import pulumi
    import pulumi_gcp as gcp
    
    instance_template = gcp.compute.InstanceTemplate("instanceTemplate",
        disks=[gcp.compute.InstanceTemplateDiskArgs(
            source_image="debian-cloud/debian-11",
        )],
        machine_type="e2-medium",
        name_prefix="instance-template-",
        region="us-central1")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as gcp from "@pulumi/gcp";
    
    const instanceTemplate = new gcp.compute.InstanceTemplate("instanceTemplate", {
        disks: [{
            sourceImage: "debian-cloud/debian-11",
        }],
        machineType: "e2-medium",
        namePrefix: "instance-template-",
        region: "us-central1",
    });
    
    resources:
      instanceTemplate:
        type: gcp:compute:InstanceTemplate
        properties:
          namePrefix: instance-template-
          machineType: e2-medium
          region: us-central1
          # boot disk
          disks:
            - sourceImage: ${myImage.selfLink}
    variables:
      myImage:
        fn::invoke:
          Function: gcp:compute:getImage
          Arguments:
            family: debian-11
            project: debian-cloud
    

    the image for the template to the family

    Coming soon!

    Coming soon!

    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.gcp.compute.InstanceTemplate;
    import com.pulumi.gcp.compute.InstanceTemplateArgs;
    import com.pulumi.gcp.compute.inputs.InstanceTemplateDiskArgs;
    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 instanceTemplate = new InstanceTemplate("instanceTemplate", InstanceTemplateArgs.builder()        
                .disks(InstanceTemplateDiskArgs.builder()
                    .sourceImage("debian-cloud/debian-11")
                    .build())
                .machineType("e2-medium")
                .namePrefix("instance-template-")
                .region("us-central1")
                .build());
    
        }
    }
    

    Coming soon!

    Coming soon!

    resources:
      instanceTemplate:
        type: gcp:compute:InstanceTemplate
        properties:
          # boot disk
          disks:
            - sourceImage: debian-cloud/debian-11
          machineType: e2-medium
          namePrefix: instance-template-
          region: us-central1
    

    Create InstanceTemplate Resource

    new InstanceTemplate(name: string, args: InstanceTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def InstanceTemplate(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         advanced_machine_features: Optional[InstanceTemplateAdvancedMachineFeaturesArgs] = None,
                         can_ip_forward: Optional[bool] = None,
                         confidential_instance_config: Optional[InstanceTemplateConfidentialInstanceConfigArgs] = None,
                         description: Optional[str] = None,
                         disks: Optional[Sequence[InstanceTemplateDiskArgs]] = None,
                         enable_display: Optional[bool] = None,
                         guest_accelerators: Optional[Sequence[InstanceTemplateGuestAcceleratorArgs]] = None,
                         instance_description: Optional[str] = None,
                         labels: Optional[Mapping[str, str]] = None,
                         machine_type: Optional[str] = None,
                         metadata: Optional[Mapping[str, Any]] = None,
                         metadata_startup_script: Optional[str] = None,
                         min_cpu_platform: Optional[str] = None,
                         name: Optional[str] = None,
                         name_prefix: Optional[str] = None,
                         network_interfaces: Optional[Sequence[InstanceTemplateNetworkInterfaceArgs]] = None,
                         network_performance_config: Optional[InstanceTemplateNetworkPerformanceConfigArgs] = None,
                         project: Optional[str] = None,
                         region: Optional[str] = None,
                         reservation_affinity: Optional[InstanceTemplateReservationAffinityArgs] = None,
                         resource_policies: Optional[str] = None,
                         scheduling: Optional[InstanceTemplateSchedulingArgs] = None,
                         service_account: Optional[InstanceTemplateServiceAccountArgs] = None,
                         shielded_instance_config: Optional[InstanceTemplateShieldedInstanceConfigArgs] = None,
                         tags: Optional[Sequence[str]] = None)
    @overload
    def InstanceTemplate(resource_name: str,
                         args: InstanceTemplateArgs,
                         opts: Optional[ResourceOptions] = None)
    func NewInstanceTemplate(ctx *Context, name string, args InstanceTemplateArgs, opts ...ResourceOption) (*InstanceTemplate, error)
    public InstanceTemplate(string name, InstanceTemplateArgs args, CustomResourceOptions? opts = null)
    public InstanceTemplate(String name, InstanceTemplateArgs args)
    public InstanceTemplate(String name, InstanceTemplateArgs args, CustomResourceOptions options)
    
    type: gcp:compute:InstanceTemplate
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    name string
    The unique name of the resource.
    args InstanceTemplateArgs
    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 InstanceTemplateArgs
    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 InstanceTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args InstanceTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args InstanceTemplateArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

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

    Disks List<InstanceTemplateDisk>

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    MachineType string

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    AdvancedMachineFeatures InstanceTemplateAdvancedMachineFeatures

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    CanIpForward bool

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    ConfidentialInstanceConfig InstanceTemplateConfidentialInstanceConfig

    Enable Confidential Mode on this VM. Structure is documented below

    Description string

    A brief description of this resource.

    EnableDisplay bool

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    GuestAccelerators List<InstanceTemplateGuestAccelerator>

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    InstanceDescription string

    A brief description to use for instances created from this template.

    Labels Dictionary<string, string>

    A set of key/value label pairs to assign to instances created from this template.

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

    Metadata Dictionary<string, object>

    Metadata key/value pairs to make available from within instances created from this template.

    MetadataStartupScript string

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    MinCpuPlatform string

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    Name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    NamePrefix string

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    NetworkInterfaces List<InstanceTemplateNetworkInterface>

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    NetworkPerformanceConfig InstanceTemplateNetworkPerformanceConfig

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    Project string

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

    Region string

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    ReservationAffinity InstanceTemplateReservationAffinity

    Specifies the reservations that this instance can consume from. Structure is documented below.

    ResourcePolicies string
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    Scheduling InstanceTemplateScheduling

    The scheduling strategy to use. More details about this configuration option are detailed below.

    ServiceAccount InstanceTemplateServiceAccount

    Service account to attach to the instance. Structure is documented below.

    ShieldedInstanceConfig InstanceTemplateShieldedInstanceConfig

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    Tags List<string>

    Tags to attach to the instance.

    Disks []InstanceTemplateDiskArgs

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    MachineType string

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    AdvancedMachineFeatures InstanceTemplateAdvancedMachineFeaturesArgs

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    CanIpForward bool

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    ConfidentialInstanceConfig InstanceTemplateConfidentialInstanceConfigArgs

    Enable Confidential Mode on this VM. Structure is documented below

    Description string

    A brief description of this resource.

    EnableDisplay bool

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    GuestAccelerators []InstanceTemplateGuestAcceleratorArgs

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    InstanceDescription string

    A brief description to use for instances created from this template.

    Labels map[string]string

    A set of key/value label pairs to assign to instances created from this template.

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

    Metadata map[string]interface{}

    Metadata key/value pairs to make available from within instances created from this template.

    MetadataStartupScript string

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    MinCpuPlatform string

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    Name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    NamePrefix string

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    NetworkInterfaces []InstanceTemplateNetworkInterfaceArgs

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    NetworkPerformanceConfig InstanceTemplateNetworkPerformanceConfigArgs

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    Project string

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

    Region string

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    ReservationAffinity InstanceTemplateReservationAffinityArgs

    Specifies the reservations that this instance can consume from. Structure is documented below.

    ResourcePolicies string
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    Scheduling InstanceTemplateSchedulingArgs

    The scheduling strategy to use. More details about this configuration option are detailed below.

    ServiceAccount InstanceTemplateServiceAccountArgs

    Service account to attach to the instance. Structure is documented below.

    ShieldedInstanceConfig InstanceTemplateShieldedInstanceConfigArgs

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    Tags []string

    Tags to attach to the instance.

    disks List<InstanceTemplateDisk>

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    machineType String

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    advancedMachineFeatures InstanceTemplateAdvancedMachineFeatures

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    canIpForward Boolean

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    confidentialInstanceConfig InstanceTemplateConfidentialInstanceConfig

    Enable Confidential Mode on this VM. Structure is documented below

    description String

    A brief description of this resource.

    enableDisplay Boolean

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    guestAccelerators List<InstanceTemplateGuestAccelerator>

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    instanceDescription String

    A brief description to use for instances created from this template.

    labels Map<String,String>

    A set of key/value label pairs to assign to instances created from this template.

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

    metadata Map<String,Object>

    Metadata key/value pairs to make available from within instances created from this template.

    metadataStartupScript String

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    minCpuPlatform String

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    name String

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    namePrefix String

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    networkInterfaces List<InstanceTemplateNetworkInterface>

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    networkPerformanceConfig InstanceTemplateNetworkPerformanceConfig

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    project String

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

    region String

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    reservationAffinity InstanceTemplateReservationAffinity

    Specifies the reservations that this instance can consume from. Structure is documented below.

    resourcePolicies String
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    scheduling InstanceTemplateScheduling

    The scheduling strategy to use. More details about this configuration option are detailed below.

    serviceAccount InstanceTemplateServiceAccount

    Service account to attach to the instance. Structure is documented below.

    shieldedInstanceConfig InstanceTemplateShieldedInstanceConfig

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    tags List<String>

    Tags to attach to the instance.

    disks InstanceTemplateDisk[]

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    machineType string

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    advancedMachineFeatures InstanceTemplateAdvancedMachineFeatures

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    canIpForward boolean

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    confidentialInstanceConfig InstanceTemplateConfidentialInstanceConfig

    Enable Confidential Mode on this VM. Structure is documented below

    description string

    A brief description of this resource.

    enableDisplay boolean

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    guestAccelerators InstanceTemplateGuestAccelerator[]

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    instanceDescription string

    A brief description to use for instances created from this template.

    labels {[key: string]: string}

    A set of key/value label pairs to assign to instances created from this template.

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

    metadata {[key: string]: any}

    Metadata key/value pairs to make available from within instances created from this template.

    metadataStartupScript string

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    minCpuPlatform string

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    namePrefix string

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    networkInterfaces InstanceTemplateNetworkInterface[]

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    networkPerformanceConfig InstanceTemplateNetworkPerformanceConfig

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    project string

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

    region string

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    reservationAffinity InstanceTemplateReservationAffinity

    Specifies the reservations that this instance can consume from. Structure is documented below.

    resourcePolicies string
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    scheduling InstanceTemplateScheduling

    The scheduling strategy to use. More details about this configuration option are detailed below.

    serviceAccount InstanceTemplateServiceAccount

    Service account to attach to the instance. Structure is documented below.

    shieldedInstanceConfig InstanceTemplateShieldedInstanceConfig

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    tags string[]

    Tags to attach to the instance.

    disks Sequence[InstanceTemplateDiskArgs]

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    machine_type str

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    advanced_machine_features InstanceTemplateAdvancedMachineFeaturesArgs

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    can_ip_forward bool

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    confidential_instance_config InstanceTemplateConfidentialInstanceConfigArgs

    Enable Confidential Mode on this VM. Structure is documented below

    description str

    A brief description of this resource.

    enable_display bool

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    guest_accelerators Sequence[InstanceTemplateGuestAcceleratorArgs]

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    instance_description str

    A brief description to use for instances created from this template.

    labels Mapping[str, str]

    A set of key/value label pairs to assign to instances created from this template.

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

    metadata Mapping[str, Any]

    Metadata key/value pairs to make available from within instances created from this template.

    metadata_startup_script str

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    min_cpu_platform str

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    name str

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    name_prefix str

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    network_interfaces Sequence[InstanceTemplateNetworkInterfaceArgs]

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    network_performance_config InstanceTemplateNetworkPerformanceConfigArgs

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    project str

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

    region str

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    reservation_affinity InstanceTemplateReservationAffinityArgs

    Specifies the reservations that this instance can consume from. Structure is documented below.

    resource_policies str
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    scheduling InstanceTemplateSchedulingArgs

    The scheduling strategy to use. More details about this configuration option are detailed below.

    service_account InstanceTemplateServiceAccountArgs

    Service account to attach to the instance. Structure is documented below.

    shielded_instance_config InstanceTemplateShieldedInstanceConfigArgs

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    tags Sequence[str]

    Tags to attach to the instance.

    disks List<Property Map>

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    machineType String

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    advancedMachineFeatures Property Map

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    canIpForward Boolean

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    confidentialInstanceConfig Property Map

    Enable Confidential Mode on this VM. Structure is documented below

    description String

    A brief description of this resource.

    enableDisplay Boolean

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    guestAccelerators List<Property Map>

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    instanceDescription String

    A brief description to use for instances created from this template.

    labels Map<String>

    A set of key/value label pairs to assign to instances created from this template.

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

    metadata Map<Any>

    Metadata key/value pairs to make available from within instances created from this template.

    metadataStartupScript String

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    minCpuPlatform String

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    name String

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    namePrefix String

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    networkInterfaces List<Property Map>

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    networkPerformanceConfig Property Map

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    project String

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

    region String

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    reservationAffinity Property Map

    Specifies the reservations that this instance can consume from. Structure is documented below.

    resourcePolicies String
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    scheduling Property Map

    The scheduling strategy to use. More details about this configuration option are detailed below.

    serviceAccount Property Map

    Service account to attach to the instance. Structure is documented below.

    shieldedInstanceConfig Property Map

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    tags List<String>

    Tags to attach to the instance.

    Outputs

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

    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.

    MetadataFingerprint string

    The unique fingerprint of the metadata.

    PulumiLabels Dictionary<string, string>

    The combination of labels configured directly on the resource and default labels configured on the provider.

    SelfLink string

    The URI of the created resource.

    SelfLinkUnique string

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    TagsFingerprint string

    The unique fingerprint of the tags.

    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.

    MetadataFingerprint string

    The unique fingerprint of the metadata.

    PulumiLabels map[string]string

    The combination of labels configured directly on the resource and default labels configured on the provider.

    SelfLink string

    The URI of the created resource.

    SelfLinkUnique string

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    TagsFingerprint string

    The unique fingerprint of the tags.

    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.

    metadataFingerprint String

    The unique fingerprint of the metadata.

    pulumiLabels Map<String,String>

    The combination of labels configured directly on the resource and default labels configured on the provider.

    selfLink String

    The URI of the created resource.

    selfLinkUnique String

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    tagsFingerprint String

    The unique fingerprint of the tags.

    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.

    metadataFingerprint string

    The unique fingerprint of the metadata.

    pulumiLabels {[key: string]: string}

    The combination of labels configured directly on the resource and default labels configured on the provider.

    selfLink string

    The URI of the created resource.

    selfLinkUnique string

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    tagsFingerprint string

    The unique fingerprint of the tags.

    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.

    metadata_fingerprint str

    The unique fingerprint of the metadata.

    pulumi_labels Mapping[str, str]

    The combination of labels configured directly on the resource and default labels configured on the provider.

    self_link str

    The URI of the created resource.

    self_link_unique str

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    tags_fingerprint str

    The unique fingerprint of the tags.

    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.

    metadataFingerprint String

    The unique fingerprint of the metadata.

    pulumiLabels Map<String>

    The combination of labels configured directly on the resource and default labels configured on the provider.

    selfLink String

    The URI of the created resource.

    selfLinkUnique String

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    tagsFingerprint String

    The unique fingerprint of the tags.

    Look up Existing InstanceTemplate Resource

    Get an existing InstanceTemplate 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?: InstanceTemplateState, opts?: CustomResourceOptions): InstanceTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            advanced_machine_features: Optional[InstanceTemplateAdvancedMachineFeaturesArgs] = None,
            can_ip_forward: Optional[bool] = None,
            confidential_instance_config: Optional[InstanceTemplateConfidentialInstanceConfigArgs] = None,
            description: Optional[str] = None,
            disks: Optional[Sequence[InstanceTemplateDiskArgs]] = None,
            effective_labels: Optional[Mapping[str, str]] = None,
            enable_display: Optional[bool] = None,
            guest_accelerators: Optional[Sequence[InstanceTemplateGuestAcceleratorArgs]] = None,
            instance_description: Optional[str] = None,
            labels: Optional[Mapping[str, str]] = None,
            machine_type: Optional[str] = None,
            metadata: Optional[Mapping[str, Any]] = None,
            metadata_fingerprint: Optional[str] = None,
            metadata_startup_script: Optional[str] = None,
            min_cpu_platform: Optional[str] = None,
            name: Optional[str] = None,
            name_prefix: Optional[str] = None,
            network_interfaces: Optional[Sequence[InstanceTemplateNetworkInterfaceArgs]] = None,
            network_performance_config: Optional[InstanceTemplateNetworkPerformanceConfigArgs] = None,
            project: Optional[str] = None,
            pulumi_labels: Optional[Mapping[str, str]] = None,
            region: Optional[str] = None,
            reservation_affinity: Optional[InstanceTemplateReservationAffinityArgs] = None,
            resource_policies: Optional[str] = None,
            scheduling: Optional[InstanceTemplateSchedulingArgs] = None,
            self_link: Optional[str] = None,
            self_link_unique: Optional[str] = None,
            service_account: Optional[InstanceTemplateServiceAccountArgs] = None,
            shielded_instance_config: Optional[InstanceTemplateShieldedInstanceConfigArgs] = None,
            tags: Optional[Sequence[str]] = None,
            tags_fingerprint: Optional[str] = None) -> InstanceTemplate
    func GetInstanceTemplate(ctx *Context, name string, id IDInput, state *InstanceTemplateState, opts ...ResourceOption) (*InstanceTemplate, error)
    public static InstanceTemplate Get(string name, Input<string> id, InstanceTemplateState? state, CustomResourceOptions? opts = null)
    public static InstanceTemplate get(String name, Output<String> id, InstanceTemplateState 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:
    AdvancedMachineFeatures InstanceTemplateAdvancedMachineFeatures

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    CanIpForward bool

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    ConfidentialInstanceConfig InstanceTemplateConfidentialInstanceConfig

    Enable Confidential Mode on this VM. Structure is documented below

    Description string

    A brief description of this resource.

    Disks List<InstanceTemplateDisk>

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    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.

    EnableDisplay bool

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    GuestAccelerators List<InstanceTemplateGuestAccelerator>

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    InstanceDescription string

    A brief description to use for instances created from this template.

    Labels Dictionary<string, string>

    A set of key/value label pairs to assign to instances created from this template.

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

    MachineType string

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    Metadata Dictionary<string, object>

    Metadata key/value pairs to make available from within instances created from this template.

    MetadataFingerprint string

    The unique fingerprint of the metadata.

    MetadataStartupScript string

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    MinCpuPlatform string

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    Name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    NamePrefix string

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    NetworkInterfaces List<InstanceTemplateNetworkInterface>

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    NetworkPerformanceConfig InstanceTemplateNetworkPerformanceConfig

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    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.

    Region string

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    ReservationAffinity InstanceTemplateReservationAffinity

    Specifies the reservations that this instance can consume from. Structure is documented below.

    ResourcePolicies string
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    Scheduling InstanceTemplateScheduling

    The scheduling strategy to use. More details about this configuration option are detailed below.

    SelfLink string

    The URI of the created resource.

    SelfLinkUnique string

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    ServiceAccount InstanceTemplateServiceAccount

    Service account to attach to the instance. Structure is documented below.

    ShieldedInstanceConfig InstanceTemplateShieldedInstanceConfig

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    Tags List<string>

    Tags to attach to the instance.

    TagsFingerprint string

    The unique fingerprint of the tags.

    AdvancedMachineFeatures InstanceTemplateAdvancedMachineFeaturesArgs

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    CanIpForward bool

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    ConfidentialInstanceConfig InstanceTemplateConfidentialInstanceConfigArgs

    Enable Confidential Mode on this VM. Structure is documented below

    Description string

    A brief description of this resource.

    Disks []InstanceTemplateDiskArgs

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    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.

    EnableDisplay bool

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    GuestAccelerators []InstanceTemplateGuestAcceleratorArgs

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    InstanceDescription string

    A brief description to use for instances created from this template.

    Labels map[string]string

    A set of key/value label pairs to assign to instances created from this template.

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

    MachineType string

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    Metadata map[string]interface{}

    Metadata key/value pairs to make available from within instances created from this template.

    MetadataFingerprint string

    The unique fingerprint of the metadata.

    MetadataStartupScript string

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    MinCpuPlatform string

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    Name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    NamePrefix string

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    NetworkInterfaces []InstanceTemplateNetworkInterfaceArgs

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    NetworkPerformanceConfig InstanceTemplateNetworkPerformanceConfigArgs

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    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.

    Region string

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    ReservationAffinity InstanceTemplateReservationAffinityArgs

    Specifies the reservations that this instance can consume from. Structure is documented below.

    ResourcePolicies string
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    Scheduling InstanceTemplateSchedulingArgs

    The scheduling strategy to use. More details about this configuration option are detailed below.

    SelfLink string

    The URI of the created resource.

    SelfLinkUnique string

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    ServiceAccount InstanceTemplateServiceAccountArgs

    Service account to attach to the instance. Structure is documented below.

    ShieldedInstanceConfig InstanceTemplateShieldedInstanceConfigArgs

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    Tags []string

    Tags to attach to the instance.

    TagsFingerprint string

    The unique fingerprint of the tags.

    advancedMachineFeatures InstanceTemplateAdvancedMachineFeatures

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    canIpForward Boolean

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    confidentialInstanceConfig InstanceTemplateConfidentialInstanceConfig

    Enable Confidential Mode on this VM. Structure is documented below

    description String

    A brief description of this resource.

    disks List<InstanceTemplateDisk>

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    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.

    enableDisplay Boolean

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    guestAccelerators List<InstanceTemplateGuestAccelerator>

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    instanceDescription String

    A brief description to use for instances created from this template.

    labels Map<String,String>

    A set of key/value label pairs to assign to instances created from this template.

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

    machineType String

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    metadata Map<String,Object>

    Metadata key/value pairs to make available from within instances created from this template.

    metadataFingerprint String

    The unique fingerprint of the metadata.

    metadataStartupScript String

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    minCpuPlatform String

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    name String

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    namePrefix String

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    networkInterfaces List<InstanceTemplateNetworkInterface>

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    networkPerformanceConfig InstanceTemplateNetworkPerformanceConfig

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    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.

    region String

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    reservationAffinity InstanceTemplateReservationAffinity

    Specifies the reservations that this instance can consume from. Structure is documented below.

    resourcePolicies String
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    scheduling InstanceTemplateScheduling

    The scheduling strategy to use. More details about this configuration option are detailed below.

    selfLink String

    The URI of the created resource.

    selfLinkUnique String

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    serviceAccount InstanceTemplateServiceAccount

    Service account to attach to the instance. Structure is documented below.

    shieldedInstanceConfig InstanceTemplateShieldedInstanceConfig

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    tags List<String>

    Tags to attach to the instance.

    tagsFingerprint String

    The unique fingerprint of the tags.

    advancedMachineFeatures InstanceTemplateAdvancedMachineFeatures

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    canIpForward boolean

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    confidentialInstanceConfig InstanceTemplateConfidentialInstanceConfig

    Enable Confidential Mode on this VM. Structure is documented below

    description string

    A brief description of this resource.

    disks InstanceTemplateDisk[]

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    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.

    enableDisplay boolean

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    guestAccelerators InstanceTemplateGuestAccelerator[]

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    instanceDescription string

    A brief description to use for instances created from this template.

    labels {[key: string]: string}

    A set of key/value label pairs to assign to instances created from this template.

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

    machineType string

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    metadata {[key: string]: any}

    Metadata key/value pairs to make available from within instances created from this template.

    metadataFingerprint string

    The unique fingerprint of the metadata.

    metadataStartupScript string

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    minCpuPlatform string

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    namePrefix string

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    networkInterfaces InstanceTemplateNetworkInterface[]

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    networkPerformanceConfig InstanceTemplateNetworkPerformanceConfig

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    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.

    region string

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    reservationAffinity InstanceTemplateReservationAffinity

    Specifies the reservations that this instance can consume from. Structure is documented below.

    resourcePolicies string
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    scheduling InstanceTemplateScheduling

    The scheduling strategy to use. More details about this configuration option are detailed below.

    selfLink string

    The URI of the created resource.

    selfLinkUnique string

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    serviceAccount InstanceTemplateServiceAccount

    Service account to attach to the instance. Structure is documented below.

    shieldedInstanceConfig InstanceTemplateShieldedInstanceConfig

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    tags string[]

    Tags to attach to the instance.

    tagsFingerprint string

    The unique fingerprint of the tags.

    advanced_machine_features InstanceTemplateAdvancedMachineFeaturesArgs

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    can_ip_forward bool

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    confidential_instance_config InstanceTemplateConfidentialInstanceConfigArgs

    Enable Confidential Mode on this VM. Structure is documented below

    description str

    A brief description of this resource.

    disks Sequence[InstanceTemplateDiskArgs]

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    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.

    enable_display bool

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    guest_accelerators Sequence[InstanceTemplateGuestAcceleratorArgs]

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    instance_description str

    A brief description to use for instances created from this template.

    labels Mapping[str, str]

    A set of key/value label pairs to assign to instances created from this template.

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

    machine_type str

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    metadata Mapping[str, Any]

    Metadata key/value pairs to make available from within instances created from this template.

    metadata_fingerprint str

    The unique fingerprint of the metadata.

    metadata_startup_script str

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    min_cpu_platform str

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    name str

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    name_prefix str

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    network_interfaces Sequence[InstanceTemplateNetworkInterfaceArgs]

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    network_performance_config InstanceTemplateNetworkPerformanceConfigArgs

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    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.

    region str

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    reservation_affinity InstanceTemplateReservationAffinityArgs

    Specifies the reservations that this instance can consume from. Structure is documented below.

    resource_policies str
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    scheduling InstanceTemplateSchedulingArgs

    The scheduling strategy to use. More details about this configuration option are detailed below.

    self_link str

    The URI of the created resource.

    self_link_unique str

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    service_account InstanceTemplateServiceAccountArgs

    Service account to attach to the instance. Structure is documented below.

    shielded_instance_config InstanceTemplateShieldedInstanceConfigArgs

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    tags Sequence[str]

    Tags to attach to the instance.

    tags_fingerprint str

    The unique fingerprint of the tags.

    advancedMachineFeatures Property Map

    Configure Nested Virtualisation and Simultaneous Hyper Threading on this VM. Structure is documented below

    canIpForward Boolean

    Whether to allow sending and receiving of packets with non-matching source or destination IPs. This defaults to false.

    confidentialInstanceConfig Property Map

    Enable Confidential Mode on this VM. Structure is documented below

    description String

    A brief description of this resource.

    disks List<Property Map>

    Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.

    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.

    enableDisplay Boolean

    ) Enable Virtual Displays on this instance. Note: allow_stopping_for_update must be set to true in order to update this field.

    guestAccelerators List<Property Map>

    List of the type and count of accelerator cards attached to the instance. Structure documented below.

    instanceDescription String

    A brief description to use for instances created from this template.

    labels Map<String>

    A set of key/value label pairs to assign to instances created from this template.

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

    machineType String

    The machine type to create.

    To create a machine with a custom type (such as extended memory), format the value like custom-VCPUS-MEM_IN_MB like custom-6-20480 for 6 vCPU and 20GB of RAM.


    metadata Map<Any>

    Metadata key/value pairs to make available from within instances created from this template.

    metadataFingerprint String

    The unique fingerprint of the metadata.

    metadataStartupScript String

    An alternative to using the startup-script metadata key, mostly to match the compute_instance resource. This replaces the startup-script metadata key on the created instance and thus the two mechanisms are not allowed to be used simultaneously.

    minCpuPlatform String

    Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as Intel Haswell or Intel Skylake. See the complete list here.

    name String

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    namePrefix String

    Creates a unique name beginning with the specified prefix. Conflicts with name.

    networkInterfaces List<Property Map>

    Networks to attach to instances created from this template. This can be specified multiple times for multiple networks. Structure is documented below.

    networkPerformanceConfig Property Map

    (Optional, Configures network performance settings for the instance created from the template. Structure is documented below. Note: machine_type must be a supported type, the image used must include the GVNIC in guest-os-features, and network_interface.0.nic-type must be GVNIC in order for this setting to take effect.

    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.

    region String

    An instance template is a global resource that is not bound to a zone or a region. However, you can still specify some regional resources in an instance template, which restricts the template to the region where that resource resides. For example, a custom subnetwork resource is tied to a specific region. Defaults to the region of the Provider if no value is given.

    reservationAffinity Property Map

    Specifies the reservations that this instance can consume from. Structure is documented below.

    resourcePolicies String
    • A list of self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.
    scheduling Property Map

    The scheduling strategy to use. More details about this configuration option are detailed below.

    selfLink String

    The URI of the created resource.

    selfLinkUnique String

    A special URI of the created resource that uniquely identifies this instance template with the following format: projects/{{project}}/global/instanceTemplates/{{name}}?uniqueId={{uniqueId}} Referencing an instance template via this attribute prevents Time of Check to Time of Use attacks when the instance template resides in a shared/untrusted environment.

    serviceAccount Property Map

    Service account to attach to the instance. Structure is documented below.

    shieldedInstanceConfig Property Map

    Enable Shielded VM on this instance. Shielded VM provides verifiable integrity to prevent against malware and rootkits. Defaults to disabled. Structure is documented below. Note: shielded_instance_config can only be used with boot images with shielded vm support. See the complete list here.

    tags List<String>

    Tags to attach to the instance.

    tagsFingerprint String

    The unique fingerprint of the tags.

    Supporting Types

    InstanceTemplateAdvancedMachineFeatures, InstanceTemplateAdvancedMachineFeaturesArgs

    EnableNestedVirtualization bool

    Defines whether the instance should have nested virtualization enabled. Defaults to false.

    ThreadsPerCore int

    The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1.

    VisibleCoreCount int

    ) The number of physical cores to expose to an instance. visible cores info (VC).

    EnableNestedVirtualization bool

    Defines whether the instance should have nested virtualization enabled. Defaults to false.

    ThreadsPerCore int

    The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1.

    VisibleCoreCount int

    ) The number of physical cores to expose to an instance. visible cores info (VC).

    enableNestedVirtualization Boolean

    Defines whether the instance should have nested virtualization enabled. Defaults to false.

    threadsPerCore Integer

    The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1.

    visibleCoreCount Integer

    ) The number of physical cores to expose to an instance. visible cores info (VC).

    enableNestedVirtualization boolean

    Defines whether the instance should have nested virtualization enabled. Defaults to false.

    threadsPerCore number

    The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1.

    visibleCoreCount number

    ) The number of physical cores to expose to an instance. visible cores info (VC).

    enable_nested_virtualization bool

    Defines whether the instance should have nested virtualization enabled. Defaults to false.

    threads_per_core int

    The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1.

    visible_core_count int

    ) The number of physical cores to expose to an instance. visible cores info (VC).

    enableNestedVirtualization Boolean

    Defines whether the instance should have nested virtualization enabled. Defaults to false.

    threadsPerCore Number

    The number of threads per physical core. To disable simultaneous multithreading (SMT) set this to 1.

    visibleCoreCount Number

    ) The number of physical cores to expose to an instance. visible cores info (VC).

    InstanceTemplateConfidentialInstanceConfig, InstanceTemplateConfidentialInstanceConfigArgs

    EnableConfidentialCompute bool

    Defines whether the instance should have confidential compute enabled. on_host_maintenance has to be set to TERMINATE or this will fail to create the VM.

    EnableConfidentialCompute bool

    Defines whether the instance should have confidential compute enabled. on_host_maintenance has to be set to TERMINATE or this will fail to create the VM.

    enableConfidentialCompute Boolean

    Defines whether the instance should have confidential compute enabled. on_host_maintenance has to be set to TERMINATE or this will fail to create the VM.

    enableConfidentialCompute boolean

    Defines whether the instance should have confidential compute enabled. on_host_maintenance has to be set to TERMINATE or this will fail to create the VM.

    enable_confidential_compute bool

    Defines whether the instance should have confidential compute enabled. on_host_maintenance has to be set to TERMINATE or this will fail to create the VM.

    enableConfidentialCompute Boolean

    Defines whether the instance should have confidential compute enabled. on_host_maintenance has to be set to TERMINATE or this will fail to create the VM.

    InstanceTemplateDisk, InstanceTemplateDiskArgs

    AutoDelete bool

    Whether or not the disk should be auto-deleted. This defaults to true.

    Boot bool

    Indicates that this is a boot disk.

    DeviceName string

    A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk.

    DiskEncryptionKey InstanceTemplateDiskDiskEncryptionKey

    Encrypts or decrypts a disk using a customer-supplied encryption key.

    If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.

    If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.

    If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.

    Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. Structure documented below.

    DiskName string

    Name of the disk. When not provided, this defaults to the name of the instance.

    DiskSizeGb int

    The size of the image in gigabytes. If not specified, it will inherit the size of its base image. For SCRATCH disks, the size must be exactly 375GB.

    DiskType string

    The GCE disk type. Such as "pd-ssd", "local-ssd", "pd-balanced" or "pd-standard".

    Interface string

    Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI.

    Labels Dictionary<string, string>

    A set of ket/value label pairs to assign to disk created from this template

    Mode string

    The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If you are attaching or creating a boot disk, this must read-write mode.

    ProvisionedIops int

    Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation.

    ResourcePolicies string
    • A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
    Source string

    The name (not self_link) of the disk (such as those managed by gcp.compute.Disk) to attach.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    SourceImage string

    The image from which to initialize this disk. This can be one of: the image's self_link, projects/{project}/global/images/{image}, projects/{project}/global/images/family/{family}, global/images/{image}, global/images/family/{family}, family/{family}, {project}/{family}, {project}/{image}, {family}, or {image}.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    SourceImageEncryptionKey InstanceTemplateDiskSourceImageEncryptionKey

    The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.

    Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. Structure documented below.

    SourceSnapshot string

    The source snapshot to create this disk.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    SourceSnapshotEncryptionKey InstanceTemplateDiskSourceSnapshotEncryptionKey

    The customer-supplied encryption key of the source snapshot. Structure documented below.

    Type string

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    AutoDelete bool

    Whether or not the disk should be auto-deleted. This defaults to true.

    Boot bool

    Indicates that this is a boot disk.

    DeviceName string

    A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk.

    DiskEncryptionKey InstanceTemplateDiskDiskEncryptionKey

    Encrypts or decrypts a disk using a customer-supplied encryption key.

    If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.

    If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.

    If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.

    Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. Structure documented below.

    DiskName string

    Name of the disk. When not provided, this defaults to the name of the instance.

    DiskSizeGb int

    The size of the image in gigabytes. If not specified, it will inherit the size of its base image. For SCRATCH disks, the size must be exactly 375GB.

    DiskType string

    The GCE disk type. Such as "pd-ssd", "local-ssd", "pd-balanced" or "pd-standard".

    Interface string

    Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI.

    Labels map[string]string

    A set of ket/value label pairs to assign to disk created from this template

    Mode string

    The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If you are attaching or creating a boot disk, this must read-write mode.

    ProvisionedIops int

    Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation.

    ResourcePolicies string
    • A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
    Source string

    The name (not self_link) of the disk (such as those managed by gcp.compute.Disk) to attach.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    SourceImage string

    The image from which to initialize this disk. This can be one of: the image's self_link, projects/{project}/global/images/{image}, projects/{project}/global/images/family/{family}, global/images/{image}, global/images/family/{family}, family/{family}, {project}/{family}, {project}/{image}, {family}, or {image}.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    SourceImageEncryptionKey InstanceTemplateDiskSourceImageEncryptionKey

    The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.

    Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. Structure documented below.

    SourceSnapshot string

    The source snapshot to create this disk.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    SourceSnapshotEncryptionKey InstanceTemplateDiskSourceSnapshotEncryptionKey

    The customer-supplied encryption key of the source snapshot. Structure documented below.

    Type string

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    autoDelete Boolean

    Whether or not the disk should be auto-deleted. This defaults to true.

    boot Boolean

    Indicates that this is a boot disk.

    deviceName String

    A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk.

    diskEncryptionKey InstanceTemplateDiskDiskEncryptionKey

    Encrypts or decrypts a disk using a customer-supplied encryption key.

    If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.

    If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.

    If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.

    Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. Structure documented below.

    diskName String

    Name of the disk. When not provided, this defaults to the name of the instance.

    diskSizeGb Integer

    The size of the image in gigabytes. If not specified, it will inherit the size of its base image. For SCRATCH disks, the size must be exactly 375GB.

    diskType String

    The GCE disk type. Such as "pd-ssd", "local-ssd", "pd-balanced" or "pd-standard".

    interface_ String

    Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI.

    labels Map<String,String>

    A set of ket/value label pairs to assign to disk created from this template

    mode String

    The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If you are attaching or creating a boot disk, this must read-write mode.

    provisionedIops Integer

    Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation.

    resourcePolicies String
    • A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
    source String

    The name (not self_link) of the disk (such as those managed by gcp.compute.Disk) to attach.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    sourceImage String

    The image from which to initialize this disk. This can be one of: the image's self_link, projects/{project}/global/images/{image}, projects/{project}/global/images/family/{family}, global/images/{image}, global/images/family/{family}, family/{family}, {project}/{family}, {project}/{image}, {family}, or {image}.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    sourceImageEncryptionKey InstanceTemplateDiskSourceImageEncryptionKey

    The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.

    Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. Structure documented below.

    sourceSnapshot String

    The source snapshot to create this disk.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    sourceSnapshotEncryptionKey InstanceTemplateDiskSourceSnapshotEncryptionKey

    The customer-supplied encryption key of the source snapshot. Structure documented below.

    type String

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    autoDelete boolean

    Whether or not the disk should be auto-deleted. This defaults to true.

    boot boolean

    Indicates that this is a boot disk.

    deviceName string

    A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk.

    diskEncryptionKey InstanceTemplateDiskDiskEncryptionKey

    Encrypts or decrypts a disk using a customer-supplied encryption key.

    If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.

    If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.

    If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.

    Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. Structure documented below.

    diskName string

    Name of the disk. When not provided, this defaults to the name of the instance.

    diskSizeGb number

    The size of the image in gigabytes. If not specified, it will inherit the size of its base image. For SCRATCH disks, the size must be exactly 375GB.

    diskType string

    The GCE disk type. Such as "pd-ssd", "local-ssd", "pd-balanced" or "pd-standard".

    interface string

    Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI.

    labels {[key: string]: string}

    A set of ket/value label pairs to assign to disk created from this template

    mode string

    The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If you are attaching or creating a boot disk, this must read-write mode.

    provisionedIops number

    Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation.

    resourcePolicies string
    • A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
    source string

    The name (not self_link) of the disk (such as those managed by gcp.compute.Disk) to attach.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    sourceImage string

    The image from which to initialize this disk. This can be one of: the image's self_link, projects/{project}/global/images/{image}, projects/{project}/global/images/family/{family}, global/images/{image}, global/images/family/{family}, family/{family}, {project}/{family}, {project}/{image}, {family}, or {image}.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    sourceImageEncryptionKey InstanceTemplateDiskSourceImageEncryptionKey

    The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.

    Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. Structure documented below.

    sourceSnapshot string

    The source snapshot to create this disk.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    sourceSnapshotEncryptionKey InstanceTemplateDiskSourceSnapshotEncryptionKey

    The customer-supplied encryption key of the source snapshot. Structure documented below.

    type string

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    auto_delete bool

    Whether or not the disk should be auto-deleted. This defaults to true.

    boot bool

    Indicates that this is a boot disk.

    device_name str

    A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk.

    disk_encryption_key InstanceTemplateDiskDiskEncryptionKey

    Encrypts or decrypts a disk using a customer-supplied encryption key.

    If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.

    If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.

    If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.

    Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. Structure documented below.

    disk_name str

    Name of the disk. When not provided, this defaults to the name of the instance.

    disk_size_gb int

    The size of the image in gigabytes. If not specified, it will inherit the size of its base image. For SCRATCH disks, the size must be exactly 375GB.

    disk_type str

    The GCE disk type. Such as "pd-ssd", "local-ssd", "pd-balanced" or "pd-standard".

    interface str

    Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI.

    labels Mapping[str, str]

    A set of ket/value label pairs to assign to disk created from this template

    mode str

    The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If you are attaching or creating a boot disk, this must read-write mode.

    provisioned_iops int

    Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation.

    resource_policies str
    • A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
    source str

    The name (not self_link) of the disk (such as those managed by gcp.compute.Disk) to attach.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    source_image str

    The image from which to initialize this disk. This can be one of: the image's self_link, projects/{project}/global/images/{image}, projects/{project}/global/images/family/{family}, global/images/{image}, global/images/family/{family}, family/{family}, {project}/{family}, {project}/{image}, {family}, or {image}.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    source_image_encryption_key InstanceTemplateDiskSourceImageEncryptionKey

    The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.

    Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. Structure documented below.

    source_snapshot str

    The source snapshot to create this disk.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    source_snapshot_encryption_key InstanceTemplateDiskSourceSnapshotEncryptionKey

    The customer-supplied encryption key of the source snapshot. Structure documented below.

    type str

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    autoDelete Boolean

    Whether or not the disk should be auto-deleted. This defaults to true.

    boot Boolean

    Indicates that this is a boot disk.

    deviceName String

    A unique device name that is reflected into the /dev/ tree of a Linux operating system running within the instance. If not specified, the server chooses a default device name to apply to this disk.

    diskEncryptionKey Property Map

    Encrypts or decrypts a disk using a customer-supplied encryption key.

    If you are creating a new disk, this field encrypts the new disk using an encryption key that you provide. If you are attaching an existing disk that is already encrypted, this field decrypts the disk using the customer-supplied encryption key.

    If you encrypt a disk using a customer-supplied key, you must provide the same key again when you attempt to use this resource at a later time. For example, you must provide the key when you create a snapshot or an image from the disk or when you attach the disk to a virtual machine instance.

    If you do not provide an encryption key, then the disk will be encrypted using an automatically generated key and you do not need to provide a key to use the disk later.

    Instance templates do not store customer-supplied encryption keys, so you cannot use your own keys to encrypt disks in a managed instance group. Structure documented below.

    diskName String

    Name of the disk. When not provided, this defaults to the name of the instance.

    diskSizeGb Number

    The size of the image in gigabytes. If not specified, it will inherit the size of its base image. For SCRATCH disks, the size must be exactly 375GB.

    diskType String

    The GCE disk type. Such as "pd-ssd", "local-ssd", "pd-balanced" or "pd-standard".

    interface String

    Specifies the disk interface to use for attaching this disk, which is either SCSI or NVME. The default is SCSI. Persistent disks must always use SCSI and the request will fail if you attempt to attach a persistent disk in any other format than SCSI. Local SSDs can use either NVME or SCSI.

    labels Map<String>

    A set of ket/value label pairs to assign to disk created from this template

    mode String

    The mode in which to attach this disk, either READ_WRITE or READ_ONLY. If you are attaching or creating a boot disk, this must read-write mode.

    provisionedIops Number

    Indicates how many IOPS to provision for the disk. This sets the number of I/O operations per second that the disk can handle. Values must be between 10,000 and 120,000. For more details, see the Extreme persistent disk documentation.

    resourcePolicies String
    • A list (short name or id) of resource policies to attach to this disk for automatic snapshot creations. Currently a max of 1 resource policy is supported.
    source String

    The name (not self_link) of the disk (such as those managed by gcp.compute.Disk) to attach.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    sourceImage String

    The image from which to initialize this disk. This can be one of: the image's self_link, projects/{project}/global/images/{image}, projects/{project}/global/images/family/{family}, global/images/{image}, global/images/family/{family}, family/{family}, {project}/{family}, {project}/{image}, {family}, or {image}.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    sourceImageEncryptionKey Property Map

    The customer-supplied encryption key of the source image. Required if the source image is protected by a customer-supplied encryption key.

    Instance templates do not store customer-supplied encryption keys, so you cannot create disks for instances in a managed instance group if the source images are encrypted with your own keys. Structure documented below.

    sourceSnapshot String

    The source snapshot to create this disk.

    Note: Either source, source_image, or source_snapshot is required in a disk block unless the disk type is local-ssd. Check the API docs for details.

    sourceSnapshotEncryptionKey Property Map

    The customer-supplied encryption key of the source snapshot. Structure documented below.

    type String

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    InstanceTemplateDiskDiskEncryptionKey, InstanceTemplateDiskDiskEncryptionKeyArgs

    KmsKeySelfLink string

    The self link of the encryption key that is stored in Google Cloud KMS

    KmsKeySelfLink string

    The self link of the encryption key that is stored in Google Cloud KMS

    kmsKeySelfLink String

    The self link of the encryption key that is stored in Google Cloud KMS

    kmsKeySelfLink string

    The self link of the encryption key that is stored in Google Cloud KMS

    kms_key_self_link str

    The self link of the encryption key that is stored in Google Cloud KMS

    kmsKeySelfLink String

    The self link of the encryption key that is stored in Google Cloud KMS

    InstanceTemplateDiskSourceImageEncryptionKey, InstanceTemplateDiskSourceImageEncryptionKeyArgs

    KmsKeySelfLink string

    The self link of the encryption key that is stored in Google Cloud KMS.

    KmsKeyServiceAccount string

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    KmsKeySelfLink string

    The self link of the encryption key that is stored in Google Cloud KMS.

    KmsKeyServiceAccount string

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    kmsKeySelfLink String

    The self link of the encryption key that is stored in Google Cloud KMS.

    kmsKeyServiceAccount String

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    kmsKeySelfLink string

    The self link of the encryption key that is stored in Google Cloud KMS.

    kmsKeyServiceAccount string

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    kms_key_self_link str

    The self link of the encryption key that is stored in Google Cloud KMS.

    kms_key_service_account str

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    kmsKeySelfLink String

    The self link of the encryption key that is stored in Google Cloud KMS.

    kmsKeyServiceAccount String

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    InstanceTemplateDiskSourceSnapshotEncryptionKey, InstanceTemplateDiskSourceSnapshotEncryptionKeyArgs

    KmsKeySelfLink string

    The self link of the encryption key that is stored in Google Cloud KMS.

    KmsKeyServiceAccount string

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    KmsKeySelfLink string

    The self link of the encryption key that is stored in Google Cloud KMS.

    KmsKeyServiceAccount string

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    kmsKeySelfLink String

    The self link of the encryption key that is stored in Google Cloud KMS.

    kmsKeyServiceAccount String

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    kmsKeySelfLink string

    The self link of the encryption key that is stored in Google Cloud KMS.

    kmsKeyServiceAccount string

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    kms_key_self_link str

    The self link of the encryption key that is stored in Google Cloud KMS.

    kms_key_service_account str

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    kmsKeySelfLink String

    The self link of the encryption key that is stored in Google Cloud KMS.

    kmsKeyServiceAccount String

    The service account being used for the encryption request for the given KMS key. If absent, the Compute Engine default service account is used.

    InstanceTemplateGuestAccelerator, InstanceTemplateGuestAcceleratorArgs

    Count int

    The number of the guest accelerator cards exposed to this instance.

    Type string

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    Count int

    The number of the guest accelerator cards exposed to this instance.

    Type string

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    count Integer

    The number of the guest accelerator cards exposed to this instance.

    type String

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    count number

    The number of the guest accelerator cards exposed to this instance.

    type string

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    count int

    The number of the guest accelerator cards exposed to this instance.

    type str

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    count Number

    The number of the guest accelerator cards exposed to this instance.

    type String

    The type of GCE disk, can be either "SCRATCH" or "PERSISTENT".

    InstanceTemplateNetworkInterface, InstanceTemplateNetworkInterfaceArgs

    AccessConfigs List<InstanceTemplateNetworkInterfaceAccessConfig>

    Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet (this means that ssh provisioners will not work unless you can send traffic to the instance's network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.

    AliasIpRanges List<InstanceTemplateNetworkInterfaceAliasIpRange>

    An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.

    InternalIpv6PrefixLength int
    Ipv6AccessConfigs List<InstanceTemplateNetworkInterfaceIpv6AccessConfig>

    An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access. Structure documented below.

    Ipv6AccessType string
    Ipv6Address string
    Name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    Network string

    The name or self_link of the network to attach this interface to. Use network attribute for Legacy or Auto subnetted networks and subnetwork for custom subnetted networks.

    NetworkAttachment string

    ) The URL of the network attachment that this interface should connect to in the following format: projects/{projectNumber}/regions/{region_name}/networkAttachments/{network_attachment_name}.

    NetworkIp string

    The private IP address to assign to the instance. If empty, the address will be automatically assigned.

    NicType string

    The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET.

    QueueCount int

    The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It will be empty if not specified.

    StackType string

    The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4_IPV6 or IPV4_ONLY. If not specified, IPV4_ONLY will be used.

    Subnetwork string

    the name of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Either network or subnetwork must be provided.

    SubnetworkProject string

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

    AccessConfigs []InstanceTemplateNetworkInterfaceAccessConfig

    Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet (this means that ssh provisioners will not work unless you can send traffic to the instance's network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.

    AliasIpRanges []InstanceTemplateNetworkInterfaceAliasIpRange

    An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.

    InternalIpv6PrefixLength int
    Ipv6AccessConfigs []InstanceTemplateNetworkInterfaceIpv6AccessConfig

    An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access. Structure documented below.

    Ipv6AccessType string
    Ipv6Address string
    Name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    Network string

    The name or self_link of the network to attach this interface to. Use network attribute for Legacy or Auto subnetted networks and subnetwork for custom subnetted networks.

    NetworkAttachment string

    ) The URL of the network attachment that this interface should connect to in the following format: projects/{projectNumber}/regions/{region_name}/networkAttachments/{network_attachment_name}.

    NetworkIp string

    The private IP address to assign to the instance. If empty, the address will be automatically assigned.

    NicType string

    The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET.

    QueueCount int

    The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It will be empty if not specified.

    StackType string

    The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4_IPV6 or IPV4_ONLY. If not specified, IPV4_ONLY will be used.

    Subnetwork string

    the name of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Either network or subnetwork must be provided.

    SubnetworkProject string

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

    accessConfigs List<InstanceTemplateNetworkInterfaceAccessConfig>

    Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet (this means that ssh provisioners will not work unless you can send traffic to the instance's network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.

    aliasIpRanges List<InstanceTemplateNetworkInterfaceAliasIpRange>

    An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.

    internalIpv6PrefixLength Integer
    ipv6AccessConfigs List<InstanceTemplateNetworkInterfaceIpv6AccessConfig>

    An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access. Structure documented below.

    ipv6AccessType String
    ipv6Address String
    name String

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    network String

    The name or self_link of the network to attach this interface to. Use network attribute for Legacy or Auto subnetted networks and subnetwork for custom subnetted networks.

    networkAttachment String

    ) The URL of the network attachment that this interface should connect to in the following format: projects/{projectNumber}/regions/{region_name}/networkAttachments/{network_attachment_name}.

    networkIp String

    The private IP address to assign to the instance. If empty, the address will be automatically assigned.

    nicType String

    The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET.

    queueCount Integer

    The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It will be empty if not specified.

    stackType String

    The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4_IPV6 or IPV4_ONLY. If not specified, IPV4_ONLY will be used.

    subnetwork String

    the name of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Either network or subnetwork must be provided.

    subnetworkProject String

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

    accessConfigs InstanceTemplateNetworkInterfaceAccessConfig[]

    Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet (this means that ssh provisioners will not work unless you can send traffic to the instance's network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.

    aliasIpRanges InstanceTemplateNetworkInterfaceAliasIpRange[]

    An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.

    internalIpv6PrefixLength number
    ipv6AccessConfigs InstanceTemplateNetworkInterfaceIpv6AccessConfig[]

    An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access. Structure documented below.

    ipv6AccessType string
    ipv6Address string
    name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    network string

    The name or self_link of the network to attach this interface to. Use network attribute for Legacy or Auto subnetted networks and subnetwork for custom subnetted networks.

    networkAttachment string

    ) The URL of the network attachment that this interface should connect to in the following format: projects/{projectNumber}/regions/{region_name}/networkAttachments/{network_attachment_name}.

    networkIp string

    The private IP address to assign to the instance. If empty, the address will be automatically assigned.

    nicType string

    The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET.

    queueCount number

    The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It will be empty if not specified.

    stackType string

    The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4_IPV6 or IPV4_ONLY. If not specified, IPV4_ONLY will be used.

    subnetwork string

    the name of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Either network or subnetwork must be provided.

    subnetworkProject string

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

    access_configs Sequence[InstanceTemplateNetworkInterfaceAccessConfig]

    Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet (this means that ssh provisioners will not work unless you can send traffic to the instance's network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.

    alias_ip_ranges Sequence[InstanceTemplateNetworkInterfaceAliasIpRange]

    An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.

    internal_ipv6_prefix_length int
    ipv6_access_configs Sequence[InstanceTemplateNetworkInterfaceIpv6AccessConfig]

    An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access. Structure documented below.

    ipv6_access_type str
    ipv6_address str
    name str

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    network str

    The name or self_link of the network to attach this interface to. Use network attribute for Legacy or Auto subnetted networks and subnetwork for custom subnetted networks.

    network_attachment str

    ) The URL of the network attachment that this interface should connect to in the following format: projects/{projectNumber}/regions/{region_name}/networkAttachments/{network_attachment_name}.

    network_ip str

    The private IP address to assign to the instance. If empty, the address will be automatically assigned.

    nic_type str

    The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET.

    queue_count int

    The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It will be empty if not specified.

    stack_type str

    The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4_IPV6 or IPV4_ONLY. If not specified, IPV4_ONLY will be used.

    subnetwork str

    the name of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Either network or subnetwork must be provided.

    subnetwork_project str

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

    accessConfigs List<Property Map>

    Access configurations, i.e. IPs via which this instance can be accessed via the Internet. Omit to ensure that the instance is not accessible from the Internet (this means that ssh provisioners will not work unless you can send traffic to the instance's network (e.g. via tunnel or because it is running on another cloud instance on that network). This block can be repeated multiple times. Structure documented below.

    aliasIpRanges List<Property Map>

    An array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure documented below.

    internalIpv6PrefixLength Number
    ipv6AccessConfigs List<Property Map>

    An array of IPv6 access configurations for this interface. Currently, only one IPv6 access config, DIRECT_IPV6, is supported. If there is no ipv6AccessConfig specified, then this instance will have no external IPv6 Internet access. Structure documented below.

    ipv6AccessType String
    ipv6Address String
    name String

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    network String

    The name or self_link of the network to attach this interface to. Use network attribute for Legacy or Auto subnetted networks and subnetwork for custom subnetted networks.

    networkAttachment String

    ) The URL of the network attachment that this interface should connect to in the following format: projects/{projectNumber}/regions/{region_name}/networkAttachments/{network_attachment_name}.

    networkIp String

    The private IP address to assign to the instance. If empty, the address will be automatically assigned.

    nicType String

    The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET.

    queueCount Number

    The networking queue count that's specified by users for the network interface. Both Rx and Tx queues will be set to this number. It will be empty if not specified.

    stackType String

    The stack type for this network interface to identify whether the IPv6 feature is enabled or not. Values are IPV4_IPV6 or IPV4_ONLY. If not specified, IPV4_ONLY will be used.

    subnetwork String

    the name of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Either network or subnetwork must be provided.

    subnetworkProject String

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

    InstanceTemplateNetworkInterfaceAccessConfig, InstanceTemplateNetworkInterfaceAccessConfigArgs

    NatIp string

    The IP address that will be 1:1 mapped to the instance's network ip. If not given, one will be generated.

    NetworkTier string

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    PublicPtrDomainName string
    NatIp string

    The IP address that will be 1:1 mapped to the instance's network ip. If not given, one will be generated.

    NetworkTier string

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    PublicPtrDomainName string
    natIp String

    The IP address that will be 1:1 mapped to the instance's network ip. If not given, one will be generated.

    networkTier String

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    publicPtrDomainName String
    natIp string

    The IP address that will be 1:1 mapped to the instance's network ip. If not given, one will be generated.

    networkTier string

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    publicPtrDomainName string
    nat_ip str

    The IP address that will be 1:1 mapped to the instance's network ip. If not given, one will be generated.

    network_tier str

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    public_ptr_domain_name str
    natIp String

    The IP address that will be 1:1 mapped to the instance's network ip. If not given, one will be generated.

    networkTier String

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    publicPtrDomainName String

    InstanceTemplateNetworkInterfaceAliasIpRange, InstanceTemplateNetworkInterfaceAliasIpRangeArgs

    IpCidrRange string

    The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.

    SubnetworkRangeName string

    The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.

    IpCidrRange string

    The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.

    SubnetworkRangeName string

    The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.

    ipCidrRange String

    The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.

    subnetworkRangeName String

    The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.

    ipCidrRange string

    The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.

    subnetworkRangeName string

    The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.

    ip_cidr_range str

    The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.

    subnetwork_range_name str

    The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.

    ipCidrRange String

    The IP CIDR range represented by this alias IP range. This IP CIDR range must belong to the specified subnetwork and cannot contain IP addresses reserved by system or used by other network interfaces. At the time of writing only a netmask (e.g. /24) may be supplied, with a CIDR format resulting in an API error.

    subnetworkRangeName String

    The subnetwork secondary range name specifying the secondary range from which to allocate the IP CIDR range for this alias IP range. If left unspecified, the primary range of the subnetwork will be used.

    InstanceTemplateNetworkInterfaceIpv6AccessConfig, InstanceTemplateNetworkInterfaceIpv6AccessConfigArgs

    NetworkTier string

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    ExternalIpv6 string
    ExternalIpv6PrefixLength string
    Name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    PublicPtrDomainName string
    NetworkTier string

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    ExternalIpv6 string
    ExternalIpv6PrefixLength string
    Name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    PublicPtrDomainName string
    networkTier String

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    externalIpv6 String
    externalIpv6PrefixLength String
    name String

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    publicPtrDomainName String
    networkTier string

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    externalIpv6 string
    externalIpv6PrefixLength string
    name string

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    publicPtrDomainName string
    network_tier str

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    external_ipv6 str
    external_ipv6_prefix_length str
    name str

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    public_ptr_domain_name str
    networkTier String

    The service-level to be provided for IPv6 traffic when the subnet has an external subnet. Only PREMIUM and STANDARD tier is valid for IPv6.

    externalIpv6 String
    externalIpv6PrefixLength String
    name String

    The name of the instance template. If you leave this blank, the provider will auto-generate a unique name.

    publicPtrDomainName String

    InstanceTemplateNetworkPerformanceConfig, InstanceTemplateNetworkPerformanceConfigArgs

    TotalEgressBandwidthTier string

    The egress bandwidth tier to enable. Possible values: TIER_1, DEFAULT

    TotalEgressBandwidthTier string

    The egress bandwidth tier to enable. Possible values: TIER_1, DEFAULT

    totalEgressBandwidthTier String

    The egress bandwidth tier to enable. Possible values: TIER_1, DEFAULT

    totalEgressBandwidthTier string

    The egress bandwidth tier to enable. Possible values: TIER_1, DEFAULT

    total_egress_bandwidth_tier str

    The egress bandwidth tier to enable. Possible values: TIER_1, DEFAULT

    totalEgressBandwidthTier String

    The egress bandwidth tier to enable. Possible values: TIER_1, DEFAULT

    InstanceTemplateReservationAffinity, InstanceTemplateReservationAffinityArgs

    Type string

    The type of reservation from which this instance can consume resources.

    SpecificReservation InstanceTemplateReservationAffinitySpecificReservation

    Specifies the label selector for the reservation to use.. Structure is documented below.

    Type string

    The type of reservation from which this instance can consume resources.

    SpecificReservation InstanceTemplateReservationAffinitySpecificReservation

    Specifies the label selector for the reservation to use.. Structure is documented below.

    type String

    The type of reservation from which this instance can consume resources.

    specificReservation InstanceTemplateReservationAffinitySpecificReservation

    Specifies the label selector for the reservation to use.. Structure is documented below.

    type string

    The type of reservation from which this instance can consume resources.

    specificReservation InstanceTemplateReservationAffinitySpecificReservation

    Specifies the label selector for the reservation to use.. Structure is documented below.

    type str

    The type of reservation from which this instance can consume resources.

    specific_reservation InstanceTemplateReservationAffinitySpecificReservation

    Specifies the label selector for the reservation to use.. Structure is documented below.

    type String

    The type of reservation from which this instance can consume resources.

    specificReservation Property Map

    Specifies the label selector for the reservation to use.. Structure is documented below.

    InstanceTemplateReservationAffinitySpecificReservation, InstanceTemplateReservationAffinitySpecificReservationArgs

    Key string

    Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify compute.googleapis.com/reservation-name as the key and specify the name of your reservation as the only value.

    Values List<string>

    Corresponds to the label values of a reservation resource.

    Key string

    Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify compute.googleapis.com/reservation-name as the key and specify the name of your reservation as the only value.

    Values []string

    Corresponds to the label values of a reservation resource.

    key String

    Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify compute.googleapis.com/reservation-name as the key and specify the name of your reservation as the only value.

    values List<String>

    Corresponds to the label values of a reservation resource.

    key string

    Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify compute.googleapis.com/reservation-name as the key and specify the name of your reservation as the only value.

    values string[]

    Corresponds to the label values of a reservation resource.

    key str

    Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify compute.googleapis.com/reservation-name as the key and specify the name of your reservation as the only value.

    values Sequence[str]

    Corresponds to the label values of a reservation resource.

    key String

    Corresponds to the label key of a reservation resource. To target a SPECIFIC_RESERVATION by name, specify compute.googleapis.com/reservation-name as the key and specify the name of your reservation as the only value.

    values List<String>

    Corresponds to the label values of a reservation resource.

    InstanceTemplateScheduling, InstanceTemplateSchedulingArgs

    AutomaticRestart bool

    Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). This defaults to true.

    InstanceTerminationAction string

    Describe the type of termination action for SPOT VM. Can be STOP or DELETE. Read more on here

    LocalSsdRecoveryTimeouts List<InstanceTemplateSchedulingLocalSsdRecoveryTimeout>
    MaintenanceInterval string
    MaxRunDuration InstanceTemplateSchedulingMaxRunDuration

    Beta - The duration of the instance. Instance will run and be terminated after then, the termination action could be defined in instance_termination_action. Only support DELETE instance_termination_action at this point. Structure is documented below. The max_run_duration block supports:

    MinNodeCpus int
    NodeAffinities List<InstanceTemplateSchedulingNodeAffinity>

    Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.

    OnHostMaintenance string

    Defines the maintenance behavior for this instance.

    Preemptible bool

    Allows instance to be preempted. This defaults to false. Read more on this here.

    ProvisioningModel string

    Describe the type of preemptible VM. This field accepts the value STANDARD or SPOT. If the value is STANDARD, there will be no discount. If this is set to SPOT, preemptible should be true and automatic_restart should be false. For more info about SPOT, read here

    AutomaticRestart bool

    Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). This defaults to true.

    InstanceTerminationAction string

    Describe the type of termination action for SPOT VM. Can be STOP or DELETE. Read more on here

    LocalSsdRecoveryTimeouts []InstanceTemplateSchedulingLocalSsdRecoveryTimeout
    MaintenanceInterval string
    MaxRunDuration InstanceTemplateSchedulingMaxRunDuration

    Beta - The duration of the instance. Instance will run and be terminated after then, the termination action could be defined in instance_termination_action. Only support DELETE instance_termination_action at this point. Structure is documented below. The max_run_duration block supports:

    MinNodeCpus int
    NodeAffinities []InstanceTemplateSchedulingNodeAffinity

    Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.

    OnHostMaintenance string

    Defines the maintenance behavior for this instance.

    Preemptible bool

    Allows instance to be preempted. This defaults to false. Read more on this here.

    ProvisioningModel string

    Describe the type of preemptible VM. This field accepts the value STANDARD or SPOT. If the value is STANDARD, there will be no discount. If this is set to SPOT, preemptible should be true and automatic_restart should be false. For more info about SPOT, read here

    automaticRestart Boolean

    Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). This defaults to true.

    instanceTerminationAction String

    Describe the type of termination action for SPOT VM. Can be STOP or DELETE. Read more on here

    localSsdRecoveryTimeouts List<InstanceTemplateSchedulingLocalSsdRecoveryTimeout>
    maintenanceInterval String
    maxRunDuration InstanceTemplateSchedulingMaxRunDuration

    Beta - The duration of the instance. Instance will run and be terminated after then, the termination action could be defined in instance_termination_action. Only support DELETE instance_termination_action at this point. Structure is documented below. The max_run_duration block supports:

    minNodeCpus Integer
    nodeAffinities List<InstanceTemplateSchedulingNodeAffinity>

    Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.

    onHostMaintenance String

    Defines the maintenance behavior for this instance.

    preemptible Boolean

    Allows instance to be preempted. This defaults to false. Read more on this here.

    provisioningModel String

    Describe the type of preemptible VM. This field accepts the value STANDARD or SPOT. If the value is STANDARD, there will be no discount. If this is set to SPOT, preemptible should be true and automatic_restart should be false. For more info about SPOT, read here

    automaticRestart boolean

    Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). This defaults to true.

    instanceTerminationAction string

    Describe the type of termination action for SPOT VM. Can be STOP or DELETE. Read more on here

    localSsdRecoveryTimeouts InstanceTemplateSchedulingLocalSsdRecoveryTimeout[]
    maintenanceInterval string
    maxRunDuration InstanceTemplateSchedulingMaxRunDuration

    Beta - The duration of the instance. Instance will run and be terminated after then, the termination action could be defined in instance_termination_action. Only support DELETE instance_termination_action at this point. Structure is documented below. The max_run_duration block supports:

    minNodeCpus number
    nodeAffinities InstanceTemplateSchedulingNodeAffinity[]

    Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.

    onHostMaintenance string

    Defines the maintenance behavior for this instance.

    preemptible boolean

    Allows instance to be preempted. This defaults to false. Read more on this here.

    provisioningModel string

    Describe the type of preemptible VM. This field accepts the value STANDARD or SPOT. If the value is STANDARD, there will be no discount. If this is set to SPOT, preemptible should be true and automatic_restart should be false. For more info about SPOT, read here

    automatic_restart bool

    Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). This defaults to true.

    instance_termination_action str

    Describe the type of termination action for SPOT VM. Can be STOP or DELETE. Read more on here

    local_ssd_recovery_timeouts Sequence[InstanceTemplateSchedulingLocalSsdRecoveryTimeout]
    maintenance_interval str
    max_run_duration InstanceTemplateSchedulingMaxRunDuration

    Beta - The duration of the instance. Instance will run and be terminated after then, the termination action could be defined in instance_termination_action. Only support DELETE instance_termination_action at this point. Structure is documented below. The max_run_duration block supports:

    min_node_cpus int
    node_affinities Sequence[InstanceTemplateSchedulingNodeAffinity]

    Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.

    on_host_maintenance str

    Defines the maintenance behavior for this instance.

    preemptible bool

    Allows instance to be preempted. This defaults to false. Read more on this here.

    provisioning_model str

    Describe the type of preemptible VM. This field accepts the value STANDARD or SPOT. If the value is STANDARD, there will be no discount. If this is set to SPOT, preemptible should be true and automatic_restart should be false. For more info about SPOT, read here

    automaticRestart Boolean

    Specifies whether the instance should be automatically restarted if it is terminated by Compute Engine (not terminated by a user). This defaults to true.

    instanceTerminationAction String

    Describe the type of termination action for SPOT VM. Can be STOP or DELETE. Read more on here

    localSsdRecoveryTimeouts List<Property Map>
    maintenanceInterval String
    maxRunDuration Property Map

    Beta - The duration of the instance. Instance will run and be terminated after then, the termination action could be defined in instance_termination_action. Only support DELETE instance_termination_action at this point. Structure is documented below. The max_run_duration block supports:

    minNodeCpus Number
    nodeAffinities List<Property Map>

    Specifies node affinities or anti-affinities to determine which sole-tenant nodes your instances and managed instance groups will use as host systems. Read more on sole-tenant node creation here. Structure documented below.

    onHostMaintenance String

    Defines the maintenance behavior for this instance.

    preemptible Boolean

    Allows instance to be preempted. This defaults to false. Read more on this here.

    provisioningModel String

    Describe the type of preemptible VM. This field accepts the value STANDARD or SPOT. If the value is STANDARD, there will be no discount. If this is set to SPOT, preemptible should be true and automatic_restart should be false. For more info about SPOT, read here

    InstanceTemplateSchedulingLocalSsdRecoveryTimeout, InstanceTemplateSchedulingLocalSsdRecoveryTimeoutArgs

    Seconds int

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    Nanos int

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    Seconds int

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    Nanos int

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    seconds Integer

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    nanos Integer

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    seconds number

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    nanos number

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    seconds int

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    nanos int

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    seconds Number

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    nanos Number

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    InstanceTemplateSchedulingMaxRunDuration, InstanceTemplateSchedulingMaxRunDurationArgs

    Seconds int

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    Nanos int

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    Seconds int

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    Nanos int

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    seconds Integer

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    nanos Integer

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    seconds number

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    nanos number

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    seconds int

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    nanos int

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    seconds Number

    Span of time at a resolution of a second. Must be from 0 to 315,576,000,000 inclusive. Note: these bounds are computed from: 60 sec/min * 60 min/hr * 24 hr/day * 365.25 days/year * 10000 years.

    nanos Number

    Span of time that's a fraction of a second at nanosecond resolution. Durations less than one second are represented with a 0 seconds field and a positive nanos field. Must be from 0 to 999,999,999 inclusive.

    InstanceTemplateSchedulingNodeAffinity, InstanceTemplateSchedulingNodeAffinityArgs

    Key string

    The key for the node affinity label.

    Operator string

    The operator. Can be IN for node-affinities or NOT_IN for anti-affinities.

    Values List<string>

    Corresponds to the label values of a reservation resource.

    Key string

    The key for the node affinity label.

    Operator string

    The operator. Can be IN for node-affinities or NOT_IN for anti-affinities.

    Values []string

    Corresponds to the label values of a reservation resource.

    key String

    The key for the node affinity label.

    operator String

    The operator. Can be IN for node-affinities or NOT_IN for anti-affinities.

    values List<String>

    Corresponds to the label values of a reservation resource.

    key string

    The key for the node affinity label.

    operator string

    The operator. Can be IN for node-affinities or NOT_IN for anti-affinities.

    values string[]

    Corresponds to the label values of a reservation resource.

    key str

    The key for the node affinity label.

    operator str

    The operator. Can be IN for node-affinities or NOT_IN for anti-affinities.

    values Sequence[str]

    Corresponds to the label values of a reservation resource.

    key String

    The key for the node affinity label.

    operator String

    The operator. Can be IN for node-affinities or NOT_IN for anti-affinities.

    values List<String>

    Corresponds to the label values of a reservation resource.

    InstanceTemplateServiceAccount, InstanceTemplateServiceAccountArgs

    Scopes List<string>

    A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use the cloud-platform scope. See a complete list of scopes here.

    The service accounts documentation explains that access scopes are the legacy method of specifying permissions for your instance. To follow best practices you should create a dedicated service account with the minimum permissions the VM requires. To use a dedicated service account this field should be configured as a list containing the cloud-platform scope. See Authenticate workloads using service accounts best practices and Best practices for using service accounts.

    Email string

    The service account e-mail address. If not given, the default Google Compute Engine service account is used.

    Scopes []string

    A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use the cloud-platform scope. See a complete list of scopes here.

    The service accounts documentation explains that access scopes are the legacy method of specifying permissions for your instance. To follow best practices you should create a dedicated service account with the minimum permissions the VM requires. To use a dedicated service account this field should be configured as a list containing the cloud-platform scope. See Authenticate workloads using service accounts best practices and Best practices for using service accounts.

    Email string

    The service account e-mail address. If not given, the default Google Compute Engine service account is used.

    scopes List<String>

    A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use the cloud-platform scope. See a complete list of scopes here.

    The service accounts documentation explains that access scopes are the legacy method of specifying permissions for your instance. To follow best practices you should create a dedicated service account with the minimum permissions the VM requires. To use a dedicated service account this field should be configured as a list containing the cloud-platform scope. See Authenticate workloads using service accounts best practices and Best practices for using service accounts.

    email String

    The service account e-mail address. If not given, the default Google Compute Engine service account is used.

    scopes string[]

    A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use the cloud-platform scope. See a complete list of scopes here.

    The service accounts documentation explains that access scopes are the legacy method of specifying permissions for your instance. To follow best practices you should create a dedicated service account with the minimum permissions the VM requires. To use a dedicated service account this field should be configured as a list containing the cloud-platform scope. See Authenticate workloads using service accounts best practices and Best practices for using service accounts.

    email string

    The service account e-mail address. If not given, the default Google Compute Engine service account is used.

    scopes Sequence[str]

    A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use the cloud-platform scope. See a complete list of scopes here.

    The service accounts documentation explains that access scopes are the legacy method of specifying permissions for your instance. To follow best practices you should create a dedicated service account with the minimum permissions the VM requires. To use a dedicated service account this field should be configured as a list containing the cloud-platform scope. See Authenticate workloads using service accounts best practices and Best practices for using service accounts.

    email str

    The service account e-mail address. If not given, the default Google Compute Engine service account is used.

    scopes List<String>

    A list of service scopes. Both OAuth2 URLs and gcloud short names are supported. To allow full access to all Cloud APIs, use the cloud-platform scope. See a complete list of scopes here.

    The service accounts documentation explains that access scopes are the legacy method of specifying permissions for your instance. To follow best practices you should create a dedicated service account with the minimum permissions the VM requires. To use a dedicated service account this field should be configured as a list containing the cloud-platform scope. See Authenticate workloads using service accounts best practices and Best practices for using service accounts.

    email String

    The service account e-mail address. If not given, the default Google Compute Engine service account is used.

    InstanceTemplateShieldedInstanceConfig, InstanceTemplateShieldedInstanceConfigArgs

    EnableIntegrityMonitoring bool
    • Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.
    EnableSecureBoot bool
    • Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.
    EnableVtpm bool
    • Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.
    EnableIntegrityMonitoring bool
    • Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.
    EnableSecureBoot bool
    • Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.
    EnableVtpm bool
    • Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.
    enableIntegrityMonitoring Boolean
    • Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.
    enableSecureBoot Boolean
    • Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.
    enableVtpm Boolean
    • Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.
    enableIntegrityMonitoring boolean
    • Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.
    enableSecureBoot boolean
    • Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.
    enableVtpm boolean
    • Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.
    enable_integrity_monitoring bool
    • Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.
    enable_secure_boot bool
    • Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.
    enable_vtpm bool
    • Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.
    enableIntegrityMonitoring Boolean
    • Compare the most recent boot measurements to the integrity policy baseline and return a pair of pass/fail results depending on whether they match or not. Defaults to true.
    enableSecureBoot Boolean
    • Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.
    enableVtpm Boolean
    • Use a virtualized trusted platform module, which is a specialized computer chip you can use to encrypt objects like keys and certificates. Defaults to true.

    Import

    Instance templates can be imported using any of these accepted formats* projects/{{project}}/global/instanceTemplates/{{name}} * {{project}}/{{name}} * {{name}} In Terraform v1.5.0 and later, use an import block to import instance templates using one of the formats above. For exampletf import {

    id = “projects/{{project}}/global/instanceTemplates/{{name}}”

    to = google_compute_instance_template.default }

     $ pulumi import gcp:compute/instanceTemplate:InstanceTemplate When using the [`terraform import` command](https://developer.hashicorp.com/terraform/cli/commands/import), instance templates can be imported using one of the formats above. For example
    
     $ pulumi import gcp:compute/instanceTemplate:InstanceTemplate default projects/{{project}}/global/instanceTemplates/{{name}}
    
     $ pulumi import gcp:compute/instanceTemplate:InstanceTemplate default {{project}}/{{name}}
    
     $ pulumi import gcp:compute/instanceTemplate:InstanceTemplate default {{name}}
    

    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.2.1 published on Wednesday, Nov 22, 2023 by Pulumi