InstanceTemplate
Manages a VM instance template resource within GCE. For more information see the official documentation and API.
Create a InstanceTemplate Resource
new InstanceTemplate(name: string, args: InstanceTemplateArgs, opts?: CustomResourceOptions);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);func NewInstanceTemplate(ctx *Context, name string, args InstanceTemplateArgs, opts ...ResourceOption) (*InstanceTemplate, error)public InstanceTemplate(string name, InstanceTemplateArgs args, CustomResourceOptions? opts = null)- 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<Instance
Template Disk Args> Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.
- Machine
Type string The machine type to create.
- Can
Ip boolForward 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.
- Enable
Display bool Enable Virtual Displays on this instance. Note:
allow_stopping_for_updatemust be set to true in order to update this field.- Guest
Accelerators List<InstanceTemplate Guest Accelerator Args> List of the type and count of accelerator cards attached to the instance. Structure documented below.
- Instance
Description 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.
- Metadata
Startup stringScript 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 stringPlatform Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Network
Interfaces List<InstanceTemplate Network Interface Args> 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
subnetworkresource is tied to a specific region. Defaults to the region of the Provider if no value is given.- Scheduling
Instance
Template Scheduling Args The scheduling strategy to use. More details about this configuration option are detailed below.
- Service
Account InstanceTemplate Service Account Args Service account to attach to the instance. Structure is documented below.
- Shielded
Instance InstanceConfig Template Shielded Instance Config Args 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_configcan only be used with boot images with shielded vm support. See the complete list here.- List<string>
Tags to attach to the instance.
- Disks
[]Instance
Template Disk Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.
- Machine
Type string The machine type to create.
- Can
Ip boolForward 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.
- Enable
Display bool Enable Virtual Displays on this instance. Note:
allow_stopping_for_updatemust be set to true in order to update this field.- Guest
Accelerators []InstanceTemplate Guest Accelerator List of the type and count of accelerator cards attached to the instance. Structure documented below.
- Instance
Description 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.
- Metadata
Startup stringScript 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 stringPlatform Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Network
Interfaces []InstanceTemplate Network Interface 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
subnetworkresource is tied to a specific region. Defaults to the region of the Provider if no value is given.- Scheduling
Instance
Template Scheduling The scheduling strategy to use. More details about this configuration option are detailed below.
- Service
Account InstanceTemplate Service Account Service account to attach to the instance. Structure is documented below.
- Shielded
Instance InstanceConfig Template Shielded Instance Config 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_configcan only be used with boot images with shielded vm support. See the complete list here.- []string
Tags to attach to the instance.
- disks
Instance
Template Disk[] Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.
- machine
Type string The machine type to create.
- can
Ip booleanForward 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.
- enable
Display boolean Enable Virtual Displays on this instance. Note:
allow_stopping_for_updatemust be set to true in order to update this field.- guest
Accelerators InstanceTemplate Guest Accelerator[] List of the type and count of accelerator cards attached to the instance. Structure documented below.
- instance
Description 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.
- metadata
Startup stringScript 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 stringPlatform Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel 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.
- name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- network
Interfaces InstanceTemplate Network Interface[] 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
subnetworkresource is tied to a specific region. Defaults to the region of the Provider if no value is given.- scheduling
Instance
Template Scheduling The scheduling strategy to use. More details about this configuration option are detailed below.
- service
Account InstanceTemplate Service Account Service account to attach to the instance. Structure is documented below.
- shielded
Instance InstanceConfig Template Shielded Instance Config 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_configcan only be used with boot images with shielded vm support. See the complete list here.- string[]
Tags to attach to the instance.
- disks
List[Instance
Template Disk] 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_ boolforward 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_updatemust be set to true in order to update this field.- guest_
accelerators List[InstanceTemplate Guest Accelerator] 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_ strscript 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_ strplatform Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel 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[InstanceTemplate Network Interface] 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
subnetworkresource is tied to a specific region. Defaults to the region of the Provider if no value is given.- scheduling
Dict[Instance
Template Scheduling] The scheduling strategy to use. More details about this configuration option are detailed below.
- service_
account Dict[InstanceTemplate Service Account] Service account to attach to the instance. Structure is documented below.
- shielded_
instance_ Dict[Instanceconfig Template Shielded Instance Config] 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_configcan only be used with boot images with shielded vm support. See the complete list here.- 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:
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): InstanceTemplatestatic 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:
- Can
Ip boolForward 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<Instance
Template Disk Args> 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_updatemust be set to true in order to update this field.- Guest
Accelerators List<InstanceTemplate Guest Accelerator Args> List of the type and count of accelerator cards attached to the instance. Structure documented below.
- Instance
Description 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,
- Machine
Type string The machine type to create.
- Metadata Dictionary<string, object>
Metadata key/value pairs to make available from within instances created from this template.
- Metadata
Fingerprint string The unique fingerprint of the metadata.
- Metadata
Startup stringScript 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 stringPlatform Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Network
Interfaces List<InstanceTemplate Network Interface Args> 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
subnetworkresource is tied to a specific region. Defaults to the region of the Provider if no value is given.- Scheduling
Instance
Template Scheduling Args The scheduling strategy to use. More details about this configuration option are detailed below.
- Self
Link string The URI of the created resource.
- Service
Account InstanceTemplate Service Account Args Service account to attach to the instance. Structure is documented below.
- Shielded
Instance InstanceConfig Template Shielded Instance Config Args 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_configcan only be used with boot images with shielded vm support. See the complete list here.- List<string>
Tags to attach to the instance.
- string
The unique fingerprint of the tags.
- Can
Ip boolForward 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
[]Instance
Template Disk 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_updatemust be set to true in order to update this field.- Guest
Accelerators []InstanceTemplate Guest Accelerator List of the type and count of accelerator cards attached to the instance. Structure documented below.
- Instance
Description 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,
- Machine
Type string The machine type to create.
- Metadata map[string]interface{}
Metadata key/value pairs to make available from within instances created from this template.
- Metadata
Fingerprint string The unique fingerprint of the metadata.
- Metadata
Startup stringScript 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 stringPlatform Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel 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.
- Name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- Network
Interfaces []InstanceTemplate Network Interface 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
subnetworkresource is tied to a specific region. Defaults to the region of the Provider if no value is given.- Scheduling
Instance
Template Scheduling The scheduling strategy to use. More details about this configuration option are detailed below.
- Self
Link string The URI of the created resource.
- Service
Account InstanceTemplate Service Account Service account to attach to the instance. Structure is documented below.
- Shielded
Instance InstanceConfig Template Shielded Instance Config 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_configcan only be used with boot images with shielded vm support. See the complete list here.- []string
Tags to attach to the instance.
- string
The unique fingerprint of the tags.
- can
Ip booleanForward 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
Instance
Template Disk[] Disks to attach to instances created from this template. This can be specified multiple times for multiple disks. Structure is documented below.
- enable
Display boolean Enable Virtual Displays on this instance. Note:
allow_stopping_for_updatemust be set to true in order to update this field.- guest
Accelerators InstanceTemplate Guest Accelerator[] List of the type and count of accelerator cards attached to the instance. Structure documented below.
- instance
Description 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,
- machine
Type string The machine type to create.
- metadata {[key: string]: any}
Metadata key/value pairs to make available from within instances created from this template.
- metadata
Fingerprint string The unique fingerprint of the metadata.
- metadata
Startup stringScript 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 stringPlatform Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel 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.
- name
Prefix string Creates a unique name beginning with the specified prefix. Conflicts with
name.- network
Interfaces InstanceTemplate Network Interface[] 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
subnetworkresource is tied to a specific region. Defaults to the region of the Provider if no value is given.- scheduling
Instance
Template Scheduling The scheduling strategy to use. More details about this configuration option are detailed below.
- self
Link string The URI of the created resource.
- service
Account InstanceTemplate Service Account Service account to attach to the instance. Structure is documented below.
- shielded
Instance InstanceConfig Template Shielded Instance Config 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_configcan only be used with boot images with shielded vm support. See the complete list here.- string[]
Tags to attach to the instance.
- string
The unique fingerprint of the tags.
- can_
ip_ boolforward 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[Instance
Template Disk] 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_updatemust be set to true in order to update this field.- guest_
accelerators List[InstanceTemplate Guest Accelerator] 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_ strscript 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_ strplatform Specifies a minimum CPU platform. Applicable values are the friendly names of CPU platforms, such as
Intel HaswellorIntel 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[InstanceTemplate Network Interface] 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
subnetworkresource is tied to a specific region. Defaults to the region of the Provider if no value is given.- scheduling
Dict[Instance
Template Scheduling] 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[InstanceTemplate Service Account] Service account to attach to the instance. Structure is documented below.
- shielded_
instance_ Dict[Instanceconfig Template Shielded Instance Config] 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_configcan only be used with boot images with shielded vm support. See the complete list here.- List[str]
Tags to attach to the instance.
- str
The unique fingerprint of the tags.
Supporting Types
InstanceTemplateDisk
- 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 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.
- Disk
Encryption InstanceKey Template Disk Disk Encryption Key Args Encrypts or decrypts a disk using a customer-supplied encryption key.
- Disk
Name string Name of the disk. When not provided, this defaults to the name of the instance.
- Disk
Size intGb 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 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: Eithersourceorsource_imageis required when creating a new instance except for when creating a local SSD. Check the API docs for details.- Source
Image 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: Eithersourceorsource_imageis 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.
- 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 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.
- Disk
Encryption InstanceKey Template Disk Disk Encryption Key Encrypts or decrypts a disk using a customer-supplied encryption key.
- Disk
Name string Name of the disk. When not provided, this defaults to the name of the instance.
- Disk
Size intGb 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 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: Eithersourceorsource_imageis required when creating a new instance except for when creating a local SSD. Check the API docs for details.- Source
Image 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: Eithersourceorsource_imageis 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.
- auto
Delete boolean Whether or not the disk should be auto-deleted. This defaults to true.
- boot boolean
Indicates that this is a boot disk.
- device
Name 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.
- disk
Encryption InstanceKey Template Disk Disk Encryption Key Encrypts or decrypts a disk using a customer-supplied encryption key.
- disk
Name string Name of the disk. When not provided, this defaults to the name of the instance.
- disk
Size numberGb 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 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: Eithersourceorsource_imageis required when creating a new instance except for when creating a local SSD. Check the API docs for details.- source
Image 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: Eithersourceorsource_imageis 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.
- 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
Name str Name of the disk. When not provided, this defaults to the name of the instance.
- disk
Type str The GCE disk type. Can be either
"pd-ssd","local-ssd", or"pd-standard".- disk_
encryption_ Dict[Instancekey Template Disk Disk Encryption Key] Encrypts or decrypts a disk using a customer-supplied encryption key.
- disk_
size_ floatgb 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: Eithersourceorsource_imageis required when creating a new instance except for when creating a 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: Eithersourceorsource_imageis 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
- Kms
Key stringSelf Link The self link of the encryption key that is stored in Google Cloud KMS
- Kms
Key stringSelf Link The self link of the encryption key that is stored in Google Cloud KMS
- kms
Key stringSelf Link The self link of the encryption key that is stored in Google Cloud KMS
- kms
Key strSelf Link The self link of the encryption key that is stored in Google Cloud KMS
InstanceTemplateGuestAccelerator
InstanceTemplateNetworkInterface
- Access
Configs List<InstanceTemplate Network Interface Access Config Args> 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 List<InstanceRanges Template Network Interface Alias Ip Range Args> 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
networkattribute for Legacy or Auto subnetted networks andsubnetworkfor custom subnetted networks.- Network
Ip 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
regionthis instance will be created in. Eithernetworkorsubnetworkmust be provided.- Subnetwork
Project string The ID of the project in which the subnetwork belongs. If it is not provided, the provider project is used.
- Access
Configs []InstanceTemplate Network Interface Access Config 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 []InstanceRanges Template Network Interface Alias Ip Range 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
networkattribute for Legacy or Auto subnetted networks andsubnetworkfor custom subnetted networks.- Network
Ip 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
regionthis instance will be created in. Eithernetworkorsubnetworkmust be provided.- Subnetwork
Project string The ID of the project in which the subnetwork belongs. If it is not provided, the provider project is used.
- access
Configs InstanceTemplate Network Interface Access Config[] 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 InstanceRanges Template Network Interface Alias Ip Range[] 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
networkattribute for Legacy or Auto subnetted networks andsubnetworkfor custom subnetted networks.- network
Ip 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
regionthis instance will be created in. Eithernetworkorsubnetworkmust be provided.- subnetwork
Project string The ID of the project in which the subnetwork belongs. If it is not provided, the provider project is used.
- access
Configs List[InstanceTemplate Network Interface Access Config] 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 List[InstanceRanges Template Network Interface Alias Ip Range] 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
networkattribute for Legacy or Auto subnetted networks andsubnetworkfor custom subnetted networks.- network
Ip 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
regionthis instance will be created in. Eithernetworkorsubnetworkmust 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.
InstanceTemplateNetworkInterfaceAccessConfig
- Nat
Ip string The IP address that will be 1:1 mapped to the instance’s network ip. If not given, one will be generated.
- Network
Tier 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.
- Public
Ptr stringDomain Name
- Nat
Ip string The IP address that will be 1:1 mapped to the instance’s network ip. If not given, one will be generated.
- Network
Tier 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.
- Public
Ptr stringDomain Name
- nat
Ip string The IP address that will be 1:1 mapped to the instance’s network ip. If not given, one will be generated.
- network
Tier 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.
- public
Ptr stringDomain Name
- 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 [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.
- public
Ptr strDomain Name
InstanceTemplateNetworkInterfaceAliasIpRange
- Ip
Cidr stringRange 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 stringName 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 stringRange 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 stringName 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 stringRange 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 stringName 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_ strrange 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 strName 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
- 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.
- Min
Node intCpus - Node
Affinities List<InstanceTemplate Scheduling Node Affinity Args> 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 stringMaintenance Defines the maintenance behavior for this instance.
- Preemptible bool
Allows instance to be preempted. This defaults to false. Read more on this 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.
- Min
Node intCpus - Node
Affinities []InstanceTemplate Scheduling Node Affinity 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 stringMaintenance Defines the maintenance behavior for this instance.
- Preemptible bool
Allows instance to be preempted. This defaults to false. Read more on this here.
- automatic
Restart 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.
- min
Node numberCpus - node
Affinities InstanceTemplate Scheduling Node Affinity[] 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 stringMaintenance Defines the maintenance behavior for this instance.
- preemptible boolean
Allows instance to be preempted. This defaults to false. Read more on this 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.
- min
Node floatCpus - node
Affinities List[InstanceTemplate Scheduling Node Affinity] 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 strMaintenance Defines the maintenance behavior for this instance.
- preemptible bool
Allows instance to be preempted. This defaults to false. Read more on this here.
InstanceTemplateSchedulingNodeAffinity
InstanceTemplateServiceAccount
- 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-platformscope. 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-platformscope. 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-platformscope. 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-platformscope. 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
- Enable
Integrity boolMonitoring – 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 boolBoot – 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.
- Enable
Integrity boolMonitoring – 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 boolBoot – 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.
- enable
Integrity booleanMonitoring – 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 booleanBoot – Verify the digital signature of all boot components, and halt the boot process if signature verification fails. Defaults to false.
- enable
Vtpm 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 boolMonitoring – 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 boolBoot – 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.
Package Details
- Repository
- https://github.com/pulumi/pulumi-gcp
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
google-betaTerraform Provider.