InstanceTemplate

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

Create a InstanceTemplate Resource

def InstanceTemplate(resource_name, opts=None, can_ip_forward=None, description=None, disks=None, enable_display=None, guest_accelerators=None, instance_description=None, labels=None, machine_type=None, metadata=None, metadata_startup_script=None, min_cpu_platform=None, name=None, name_prefix=None, network_interfaces=None, project=None, region=None, scheduling=None, service_account=None, shielded_instance_config=None, tags=None, __props__=None);
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.
opts ResourceOptions
A bag of options that control this 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.

InstanceTemplate Resource Properties

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

Inputs

The InstanceTemplate resource accepts the following input properties:

Disks List<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.

CanIpForward bool

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

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<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 Dictionary<string, string>

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

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<InstanceTemplateNetworkInterfaceArgs>

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

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.

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 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.

CanIpForward bool

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

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 []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,

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 []InstanceTemplateNetworkInterface

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

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.

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 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.

canIpForward boolean

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

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,

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.

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.

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 List[InstanceTemplateDisk]

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.

can_ip_forward bool

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

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 List[InstanceTemplateGuestAccelerator]

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 Dict[str, str]

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

metadata Dict[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 List[InstanceTemplateNetworkInterface]

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

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.

scheduling Dict[InstanceTemplateScheduling]

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

service_account Dict[InstanceTemplateServiceAccount]

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

shielded_instance_config Dict[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[str]

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:

Id string
The provider-assigned unique ID for this managed resource.
MetadataFingerprint string

The unique fingerprint of the metadata.

SelfLink string

The URI of the created resource.

TagsFingerprint string

The unique fingerprint of the tags.

Id string
The provider-assigned unique ID for this managed resource.
MetadataFingerprint string

The unique fingerprint of the metadata.

SelfLink string

The URI of the created resource.

TagsFingerprint string

The unique fingerprint of the tags.

id string
The provider-assigned unique ID for this managed resource.
metadataFingerprint string

The unique fingerprint of the metadata.

selfLink string

The URI of the created resource.

tagsFingerprint string

The unique fingerprint of the tags.

id str
The provider-assigned unique ID for this managed resource.
metadata_fingerprint str

The unique fingerprint of the metadata.

self_link str

The URI of the created resource.

tags_fingerprint str

The unique fingerprint of the tags.

Look up an 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
static get(resource_name, id, opts=None, can_ip_forward=None, description=None, disks=None, enable_display=None, guest_accelerators=None, instance_description=None, labels=None, machine_type=None, metadata=None, metadata_fingerprint=None, metadata_startup_script=None, min_cpu_platform=None, name=None, name_prefix=None, network_interfaces=None, project=None, region=None, scheduling=None, self_link=None, service_account=None, shielded_instance_config=None, tags=None, tags_fingerprint=None, __props__=None);
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)
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.

The following state arguments are supported:

CanIpForward bool

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

Description string

A brief description of this resource.

Disks List<InstanceTemplateDiskArgs>

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

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<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 Dictionary<string, string>

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

MachineType string

The machine type to create.

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<InstanceTemplateNetworkInterfaceArgs>

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

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.

Scheduling InstanceTemplateSchedulingArgs

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

SelfLink string

The URI of the created resource.

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 List<string>

Tags to attach to the instance.

TagsFingerprint string

The unique fingerprint of the tags.

CanIpForward bool

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

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.

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 []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,

MachineType string

The machine type to create.

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 []InstanceTemplateNetworkInterface

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

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.

Scheduling InstanceTemplateScheduling

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

SelfLink string

The URI of the created resource.

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.

canIpForward boolean

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

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.

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,

machineType string

The machine type to create.

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.

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.

scheduling InstanceTemplateScheduling

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

selfLink string

The URI of the created resource.

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.

can_ip_forward bool

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

description str

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.

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 List[InstanceTemplateGuestAccelerator]

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 Dict[str, str]

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

machine_type str

The machine type to create.

metadata Dict[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 List[InstanceTemplateNetworkInterface]

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

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.

scheduling Dict[InstanceTemplateScheduling]

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

self_link str

The URI of the created resource.

service_account Dict[InstanceTemplateServiceAccount]

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

shielded_instance_config Dict[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[str]

Tags to attach to the instance.

tags_fingerprint str

The unique fingerprint of the tags.

Supporting Types

InstanceTemplateDisk

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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 InstanceTemplateDiskDiskEncryptionKeyArgs

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

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. Can be either "pd-ssd", "local-ssd", or "pd-standard".

Interface string

Specifies the disk interface to use for attaching this disk.

Labels Dictionary<string, string>

A set of key/value label pairs to assign to instances 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.

Source string

The name (not self_link) of the disk (such as those managed by gcp.compute.Disk) to attach. > Note: Either source or source_image is required when creating a new instance except for when creating a 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 or source_image is required when creating a new instance except for when creating a local SSD. Check the API docs for details.

Type string

The accelerator type resource to expose to this instance. E.g. nvidia-tesla-k80.

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.

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. Can be either "pd-ssd", "local-ssd", or "pd-standard".

Interface string

Specifies the disk interface to use for attaching this disk.

Labels map[string]string

A set of key/value label pairs to assign to instances 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.

Source string

The name (not self_link) of the disk (such as those managed by gcp.compute.Disk) to attach. > Note: Either source or source_image is required when creating a new instance except for when creating a 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 or source_image is required when creating a new instance except for when creating a local SSD. Check the API docs for details.

Type string

The accelerator type resource to expose to this instance. E.g. nvidia-tesla-k80.

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.

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. Can be either "pd-ssd", "local-ssd", or "pd-standard".

interface string

Specifies the disk interface to use for attaching this disk.

labels {[key: string]: string}

A set of key/value label pairs to assign to instances 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.

source string

The name (not self_link) of the disk (such as those managed by gcp.compute.Disk) to attach. > Note: Either source or source_image is required when creating a new instance except for when creating a 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 or source_image is required when creating a new instance except for when creating a local SSD. Check the API docs for details.

type string

The accelerator type resource to expose to this instance. E.g. nvidia-tesla-k80.

autoDelete 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.

diskName str

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

diskType str

The GCE disk type. Can be either "pd-ssd", "local-ssd", or "pd-standard".

disk_encryption_key Dict[InstanceTemplateDiskDiskEncryptionKey]

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

disk_size_gb float

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.

interface str

Specifies the disk interface to use for attaching this disk.

labels Dict[str, str]

A set of key/value label pairs to assign to instances 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.

source str

The name (not self_link) of the disk (such as those managed by gcp.compute.Disk) to attach. > Note: Either source or source_image is required when creating a new instance except for when creating a local SSD. Check the API docs for details.

sourceImage 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 or source_image is required when creating a new instance except for when creating a local SSD. Check the API docs for details.

type str

The accelerator type resource to expose to this instance. E.g. nvidia-tesla-k80.

InstanceTemplateDiskDiskEncryptionKey

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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 str

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

InstanceTemplateGuestAccelerator

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

Count int

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

Type string

The accelerator type resource to expose to this instance. E.g. nvidia-tesla-k80.

Count int

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

Type string

The accelerator type resource to expose to this instance. E.g. nvidia-tesla-k80.

count number

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

type string

The accelerator type resource to expose to this instance. E.g. nvidia-tesla-k80.

count float

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

type str

The accelerator type resource to expose to this instance. E.g. nvidia-tesla-k80.

InstanceTemplateNetworkInterface

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

AccessConfigs List<InstanceTemplateNetworkInterfaceAccessConfigArgs>

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<InstanceTemplateNetworkInterfaceAliasIpRangeArgs>

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

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.

NetworkIp string

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

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.

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.

NetworkIp string

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

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.

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.

networkIp string

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

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.

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.

networkIp str

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

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.

subnetworkProject str

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

InstanceTemplateNetworkInterfaceAccessConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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 [networking tier][network-tier] used for configuring this instance template. This field can take the following values: PREMIUM or STANDARD. If this field is not specified, it is assumed to be PREMIUM.

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 [networking tier][network-tier] used for configuring this instance template. This field can take the following values: PREMIUM or STANDARD. If this field is not specified, it is assumed to be PREMIUM.

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 [networking tier][network-tier] used for configuring this instance template. This field can take the following values: PREMIUM or STANDARD. If this field is not specified, it is assumed to be PREMIUM.

publicPtrDomainName string
natIp 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 [networking tier][network-tier] used for configuring this instance template. This field can take the following values: PREMIUM or STANDARD. If this field is not specified, it is assumed to be PREMIUM.

publicPtrDomainName str

InstanceTemplateNetworkInterfaceAliasIpRange

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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.

subnetworkRangeName 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.

InstanceTemplateScheduling

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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.

MinNodeCpus int
NodeAffinities List<InstanceTemplateSchedulingNodeAffinityArgs>

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.

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.

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.

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.

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.

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.

minNodeCpus float
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 str

Defines the maintenance behavior for this instance.

preemptible bool

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

InstanceTemplateSchedulingNodeAffinity

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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>
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
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[]
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 List[str]

InstanceTemplateServiceAccount

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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.

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.

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.

email string

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

scopes List[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.

email str

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

InstanceTemplateShieldedInstanceConfig

See the input and output API doc for this type.

See the input and output API doc for this type.

See the input and output API doc for this type.

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 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.

Package Details

Repository
https://github.com/pulumi/pulumi-gcp
License
Apache-2.0
Notes
This Pulumi package is based on the google-beta Terraform Provider.