InstanceFromTemplate

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

This resource is specifically to create a compute instance from a given source_instance_template. To create an instance without a template, use the gcp.compute.Instance resource.

Create a InstanceFromTemplate Resource

def InstanceFromTemplate(resource_name, opts=None, allow_stopping_for_update=None, attached_disks=None, boot_disk=None, can_ip_forward=None, deletion_protection=None, description=None, desired_status=None, enable_display=None, guest_accelerators=None, hostname=None, labels=None, machine_type=None, metadata=None, metadata_startup_script=None, min_cpu_platform=None, name=None, network_interfaces=None, project=None, resource_policies=None, scheduling=None, scratch_disks=None, service_account=None, shielded_instance_config=None, source_instance_template=None, tags=None, zone=None, __props__=None);
name string
The unique name of the resource.
args InstanceFromTemplateArgs
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 InstanceFromTemplateArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args InstanceFromTemplateArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.

InstanceFromTemplate Resource Properties

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

Inputs

The InstanceFromTemplate resource accepts the following input properties:

SourceInstanceTemplate string

Name or self link of an instance template to create the instance based on.

AllowStoppingForUpdate bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

AttachedDisks List<InstanceFromTemplateAttachedDiskArgs>

List of disks attached to the instance

BootDisk InstanceFromTemplateBootDiskArgs

The boot disk for the instance.

CanIpForward bool

Whether sending and receiving of packets with non-matching source or destination IPs is allowed.

DeletionProtection bool

Whether deletion protection is enabled on this instance.

Description string

A brief description of the resource.

DesiredStatus string

Desired status of the instance. Either “RUNNING” or “TERMINATED”.

EnableDisplay bool

Whether the instance has virtual displays enabled.

GuestAccelerators List<InstanceFromTemplateGuestAcceleratorArgs>

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

Hostname string

A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

Labels Dictionary<string, string>

A set of key/value label pairs assigned to the instance.

MachineType string

The machine type to create.

Metadata Dictionary<string, string>

Metadata key/value pairs made available within the instance.

MetadataStartupScript string

Metadata startup scripts made available within the instance.

MinCpuPlatform string

The minimum CPU platform specified for the VM instance.

Name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

NetworkInterfaces List<InstanceFromTemplateNetworkInterfaceArgs>

The networks attached to the instance.

Project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

ResourcePolicies string

A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.

Scheduling InstanceFromTemplateSchedulingArgs

The scheduling strategy being used by the instance.

ScratchDisks List<InstanceFromTemplateScratchDiskArgs>

The scratch disks attached to the instance.

ServiceAccount InstanceFromTemplateServiceAccountArgs

The service account to attach to the instance.

ShieldedInstanceConfig InstanceFromTemplateShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

Tags List<string>

The list of tags attached to the instance.

Zone string

The zone that the machine should be created in. If not set, the provider zone is used.

SourceInstanceTemplate string

Name or self link of an instance template to create the instance based on.

AllowStoppingForUpdate bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

AttachedDisks []InstanceFromTemplateAttachedDisk

List of disks attached to the instance

BootDisk InstanceFromTemplateBootDisk

The boot disk for the instance.

CanIpForward bool

Whether sending and receiving of packets with non-matching source or destination IPs is allowed.

DeletionProtection bool

Whether deletion protection is enabled on this instance.

Description string

A brief description of the resource.

DesiredStatus string

Desired status of the instance. Either “RUNNING” or “TERMINATED”.

EnableDisplay bool

Whether the instance has virtual displays enabled.

GuestAccelerators []InstanceFromTemplateGuestAccelerator

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

Hostname string

A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

Labels map[string]string

A set of key/value label pairs assigned to the instance.

MachineType string

The machine type to create.

Metadata map[string]string

Metadata key/value pairs made available within the instance.

MetadataStartupScript string

Metadata startup scripts made available within the instance.

MinCpuPlatform string

The minimum CPU platform specified for the VM instance.

Name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

NetworkInterfaces []InstanceFromTemplateNetworkInterface

The networks attached to the instance.

Project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

ResourcePolicies string

A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.

Scheduling InstanceFromTemplateScheduling

The scheduling strategy being used by the instance.

ScratchDisks []InstanceFromTemplateScratchDisk

The scratch disks attached to the instance.

ServiceAccount InstanceFromTemplateServiceAccount

The service account to attach to the instance.

ShieldedInstanceConfig InstanceFromTemplateShieldedInstanceConfig

The shielded vm config being used by the instance.

Tags []string

The list of tags attached to the instance.

Zone string

The zone that the machine should be created in. If not set, the provider zone is used.

sourceInstanceTemplate string

Name or self link of an instance template to create the instance based on.

allowStoppingForUpdate boolean

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

attachedDisks InstanceFromTemplateAttachedDisk[]

List of disks attached to the instance

bootDisk InstanceFromTemplateBootDisk

The boot disk for the instance.

canIpForward boolean

Whether sending and receiving of packets with non-matching source or destination IPs is allowed.

deletionProtection boolean

Whether deletion protection is enabled on this instance.

description string

A brief description of the resource.

desiredStatus string

Desired status of the instance. Either “RUNNING” or “TERMINATED”.

enableDisplay boolean

Whether the instance has virtual displays enabled.

guestAccelerators InstanceFromTemplateGuestAccelerator[]

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

hostname string

A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

labels {[key: string]: string}

A set of key/value label pairs assigned to the instance.

machineType string

The machine type to create.

metadata {[key: string]: string}

Metadata key/value pairs made available within the instance.

metadataStartupScript string

Metadata startup scripts made available within the instance.

minCpuPlatform string

The minimum CPU platform specified for the VM instance.

name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

networkInterfaces InstanceFromTemplateNetworkInterface[]

The networks attached to the instance.

project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

resourcePolicies string

A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.

scheduling InstanceFromTemplateScheduling

The scheduling strategy being used by the instance.

scratchDisks InstanceFromTemplateScratchDisk[]

The scratch disks attached to the instance.

serviceAccount InstanceFromTemplateServiceAccount

The service account to attach to the instance.

shieldedInstanceConfig InstanceFromTemplateShieldedInstanceConfig

The shielded vm config being used by the instance.

tags string[]

The list of tags attached to the instance.

zone string

The zone that the machine should be created in. If not set, the provider zone is used.

source_instance_template str

Name or self link of an instance template to create the instance based on.

allow_stopping_for_update bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

attached_disks List[InstanceFromTemplateAttachedDisk]

List of disks attached to the instance

boot_disk Dict[InstanceFromTemplateBootDisk]

The boot disk for the instance.

can_ip_forward bool

Whether sending and receiving of packets with non-matching source or destination IPs is allowed.

deletion_protection bool

Whether deletion protection is enabled on this instance.

description str

A brief description of the resource.

desired_status str

Desired status of the instance. Either “RUNNING” or “TERMINATED”.

enable_display bool

Whether the instance has virtual displays enabled.

guest_accelerators List[InstanceFromTemplateGuestAccelerator]

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

hostname str

A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

labels Dict[str, str]

A set of key/value label pairs assigned to the instance.

machine_type str

The machine type to create.

metadata Dict[str, str]

Metadata key/value pairs made available within the instance.

metadata_startup_script str

Metadata startup scripts made available within the instance.

min_cpu_platform str

The minimum CPU platform specified for the VM instance.

name str

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

network_interfaces List[InstanceFromTemplateNetworkInterface]

The networks attached to the instance.

project str

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

resource_policies str

A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.

scheduling Dict[InstanceFromTemplateScheduling]

The scheduling strategy being used by the instance.

scratch_disks List[InstanceFromTemplateScratchDisk]

The scratch disks attached to the instance.

service_account Dict[InstanceFromTemplateServiceAccount]

The service account to attach to the instance.

shielded_instance_config Dict[InstanceFromTemplateShieldedInstanceConfig]

The shielded vm config being used by the instance.

tags List[str]

The list of tags attached to the instance.

zone str

The zone that the machine should be created in. If not set, the provider zone is used.

Outputs

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

CpuPlatform string

The CPU platform used by this instance.

CurrentStatus string

Current status of the instance.

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

The server-assigned unique identifier of this instance.

LabelFingerprint string

The unique fingerprint of the labels.

MetadataFingerprint string

The unique fingerprint of the metadata.

SelfLink string

The URI of the created resource.

TagsFingerprint string

The unique fingerprint of the tags.

CpuPlatform string

The CPU platform used by this instance.

CurrentStatus string

Current status of the instance.

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

The server-assigned unique identifier of this instance.

LabelFingerprint string

The unique fingerprint of the labels.

MetadataFingerprint string

The unique fingerprint of the metadata.

SelfLink string

The URI of the created resource.

TagsFingerprint string

The unique fingerprint of the tags.

cpuPlatform string

The CPU platform used by this instance.

currentStatus string

Current status of the instance.

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

The server-assigned unique identifier of this instance.

labelFingerprint string

The unique fingerprint of the labels.

metadataFingerprint string

The unique fingerprint of the metadata.

selfLink string

The URI of the created resource.

tagsFingerprint string

The unique fingerprint of the tags.

cpu_platform str

The CPU platform used by this instance.

current_status str

Current status of the instance.

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

The server-assigned unique identifier of this instance.

label_fingerprint str

The unique fingerprint of the labels.

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 InstanceFromTemplate Resource

Get an existing InstanceFromTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

static get(resource_name, id, opts=None, allow_stopping_for_update=None, attached_disks=None, boot_disk=None, can_ip_forward=None, cpu_platform=None, current_status=None, deletion_protection=None, description=None, desired_status=None, enable_display=None, guest_accelerators=None, hostname=None, instance_id=None, label_fingerprint=None, labels=None, machine_type=None, metadata=None, metadata_fingerprint=None, metadata_startup_script=None, min_cpu_platform=None, name=None, network_interfaces=None, project=None, resource_policies=None, scheduling=None, scratch_disks=None, self_link=None, service_account=None, shielded_instance_config=None, source_instance_template=None, tags=None, tags_fingerprint=None, zone=None, __props__=None);
func GetInstanceFromTemplate(ctx *Context, name string, id IDInput, state *InstanceFromTemplateState, opts ...ResourceOption) (*InstanceFromTemplate, error)
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:

AllowStoppingForUpdate bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

AttachedDisks List<InstanceFromTemplateAttachedDiskArgs>

List of disks attached to the instance

BootDisk InstanceFromTemplateBootDiskArgs

The boot disk for the instance.

CanIpForward bool

Whether sending and receiving of packets with non-matching source or destination IPs is allowed.

CpuPlatform string

The CPU platform used by this instance.

CurrentStatus string

Current status of the instance.

DeletionProtection bool

Whether deletion protection is enabled on this instance.

Description string

A brief description of the resource.

DesiredStatus string

Desired status of the instance. Either “RUNNING” or “TERMINATED”.

EnableDisplay bool

Whether the instance has virtual displays enabled.

GuestAccelerators List<InstanceFromTemplateGuestAcceleratorArgs>

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

Hostname string

A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

InstanceId string

The server-assigned unique identifier of this instance.

LabelFingerprint string

The unique fingerprint of the labels.

Labels Dictionary<string, string>

A set of key/value label pairs assigned to the instance.

MachineType string

The machine type to create.

Metadata Dictionary<string, string>

Metadata key/value pairs made available within the instance.

MetadataFingerprint string

The unique fingerprint of the metadata.

MetadataStartupScript string

Metadata startup scripts made available within the instance.

MinCpuPlatform string

The minimum CPU platform specified for the VM instance.

Name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

NetworkInterfaces List<InstanceFromTemplateNetworkInterfaceArgs>

The networks attached to the instance.

Project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

ResourcePolicies string

A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.

Scheduling InstanceFromTemplateSchedulingArgs

The scheduling strategy being used by the instance.

ScratchDisks List<InstanceFromTemplateScratchDiskArgs>

The scratch disks attached to the instance.

SelfLink string

The URI of the created resource.

ServiceAccount InstanceFromTemplateServiceAccountArgs

The service account to attach to the instance.

ShieldedInstanceConfig InstanceFromTemplateShieldedInstanceConfigArgs

The shielded vm config being used by the instance.

SourceInstanceTemplate string

Name or self link of an instance template to create the instance based on.

Tags List<string>

The list of tags attached to the instance.

TagsFingerprint string

The unique fingerprint of the tags.

Zone string

The zone that the machine should be created in. If not set, the provider zone is used.

AllowStoppingForUpdate bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

AttachedDisks []InstanceFromTemplateAttachedDisk

List of disks attached to the instance

BootDisk InstanceFromTemplateBootDisk

The boot disk for the instance.

CanIpForward bool

Whether sending and receiving of packets with non-matching source or destination IPs is allowed.

CpuPlatform string

The CPU platform used by this instance.

CurrentStatus string

Current status of the instance.

DeletionProtection bool

Whether deletion protection is enabled on this instance.

Description string

A brief description of the resource.

DesiredStatus string

Desired status of the instance. Either “RUNNING” or “TERMINATED”.

EnableDisplay bool

Whether the instance has virtual displays enabled.

GuestAccelerators []InstanceFromTemplateGuestAccelerator

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

Hostname string

A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

InstanceId string

The server-assigned unique identifier of this instance.

LabelFingerprint string

The unique fingerprint of the labels.

Labels map[string]string

A set of key/value label pairs assigned to the instance.

MachineType string

The machine type to create.

Metadata map[string]string

Metadata key/value pairs made available within the instance.

MetadataFingerprint string

The unique fingerprint of the metadata.

MetadataStartupScript string

Metadata startup scripts made available within the instance.

MinCpuPlatform string

The minimum CPU platform specified for the VM instance.

Name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

NetworkInterfaces []InstanceFromTemplateNetworkInterface

The networks attached to the instance.

Project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

ResourcePolicies string

A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.

Scheduling InstanceFromTemplateScheduling

The scheduling strategy being used by the instance.

ScratchDisks []InstanceFromTemplateScratchDisk

The scratch disks attached to the instance.

SelfLink string

The URI of the created resource.

ServiceAccount InstanceFromTemplateServiceAccount

The service account to attach to the instance.

ShieldedInstanceConfig InstanceFromTemplateShieldedInstanceConfig

The shielded vm config being used by the instance.

SourceInstanceTemplate string

Name or self link of an instance template to create the instance based on.

Tags []string

The list of tags attached to the instance.

TagsFingerprint string

The unique fingerprint of the tags.

Zone string

The zone that the machine should be created in. If not set, the provider zone is used.

allowStoppingForUpdate boolean

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

attachedDisks InstanceFromTemplateAttachedDisk[]

List of disks attached to the instance

bootDisk InstanceFromTemplateBootDisk

The boot disk for the instance.

canIpForward boolean

Whether sending and receiving of packets with non-matching source or destination IPs is allowed.

cpuPlatform string

The CPU platform used by this instance.

currentStatus string

Current status of the instance.

deletionProtection boolean

Whether deletion protection is enabled on this instance.

description string

A brief description of the resource.

desiredStatus string

Desired status of the instance. Either “RUNNING” or “TERMINATED”.

enableDisplay boolean

Whether the instance has virtual displays enabled.

guestAccelerators InstanceFromTemplateGuestAccelerator[]

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

hostname string

A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

instanceId string

The server-assigned unique identifier of this instance.

labelFingerprint string

The unique fingerprint of the labels.

labels {[key: string]: string}

A set of key/value label pairs assigned to the instance.

machineType string

The machine type to create.

metadata {[key: string]: string}

Metadata key/value pairs made available within the instance.

metadataFingerprint string

The unique fingerprint of the metadata.

metadataStartupScript string

Metadata startup scripts made available within the instance.

minCpuPlatform string

The minimum CPU platform specified for the VM instance.

name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

networkInterfaces InstanceFromTemplateNetworkInterface[]

The networks attached to the instance.

project string

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

resourcePolicies string

A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.

scheduling InstanceFromTemplateScheduling

The scheduling strategy being used by the instance.

scratchDisks InstanceFromTemplateScratchDisk[]

The scratch disks attached to the instance.

selfLink string

The URI of the created resource.

serviceAccount InstanceFromTemplateServiceAccount

The service account to attach to the instance.

shieldedInstanceConfig InstanceFromTemplateShieldedInstanceConfig

The shielded vm config being used by the instance.

sourceInstanceTemplate string

Name or self link of an instance template to create the instance based on.

tags string[]

The list of tags attached to the instance.

tagsFingerprint string

The unique fingerprint of the tags.

zone string

The zone that the machine should be created in. If not set, the provider zone is used.

allow_stopping_for_update bool

If true, allows Terraform to stop the instance to update its properties. If you try to update a property that requires stopping the instance without setting this field, the update will fail.

attached_disks List[InstanceFromTemplateAttachedDisk]

List of disks attached to the instance

boot_disk Dict[InstanceFromTemplateBootDisk]

The boot disk for the instance.

can_ip_forward bool

Whether sending and receiving of packets with non-matching source or destination IPs is allowed.

cpu_platform str

The CPU platform used by this instance.

current_status str

Current status of the instance.

deletion_protection bool

Whether deletion protection is enabled on this instance.

description str

A brief description of the resource.

desired_status str

Desired status of the instance. Either “RUNNING” or “TERMINATED”.

enable_display bool

Whether the instance has virtual displays enabled.

guest_accelerators List[InstanceFromTemplateGuestAccelerator]

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

hostname str

A custom hostname for the instance. Must be a fully qualified DNS name and RFC-1035-valid. Valid format is a series of labels 1-63 characters long matching the regular expression a-z, concatenated with periods. The entire hostname must not exceed 253 characters. Changing this forces a new resource to be created.

instance_id str

The server-assigned unique identifier of this instance.

label_fingerprint str

The unique fingerprint of the labels.

labels Dict[str, str]

A set of key/value label pairs assigned to the instance.

machine_type str

The machine type to create.

metadata Dict[str, str]

Metadata key/value pairs made available within the instance.

metadata_fingerprint str

The unique fingerprint of the metadata.

metadata_startup_script str

Metadata startup scripts made available within the instance.

min_cpu_platform str

The minimum CPU platform specified for the VM instance.

name str

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

network_interfaces List[InstanceFromTemplateNetworkInterface]

The networks attached to the instance.

project str

The ID of the project in which the resource belongs. If self_link is provided, this value is ignored. If neither self_link nor project are provided, the provider project is used.

resource_policies str

A list of short names or self_links of resource policies to attach to the instance. Modifying this list will cause the instance to recreate. Currently a max of 1 resource policy is supported.

scheduling Dict[InstanceFromTemplateScheduling]

The scheduling strategy being used by the instance.

scratch_disks List[InstanceFromTemplateScratchDisk]

The scratch disks attached to the instance.

self_link str

The URI of the created resource.

service_account Dict[InstanceFromTemplateServiceAccount]

The service account to attach to the instance.

shielded_instance_config Dict[InstanceFromTemplateShieldedInstanceConfig]

The shielded vm config being used by the instance.

source_instance_template str

Name or self link of an instance template to create the instance based on.

tags List[str]

The list of tags attached to the instance.

tags_fingerprint str

The unique fingerprint of the tags.

zone str

The zone that the machine should be created in. If not set, the provider zone is used.

Supporting Types

InstanceFromTemplateAttachedDisk

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.

Source string
DeviceName string
DiskEncryptionKeyRaw string
DiskEncryptionKeySha256 string
KmsKeySelfLink string
Mode string
Source string
DeviceName string
DiskEncryptionKeyRaw string
DiskEncryptionKeySha256 string
KmsKeySelfLink string
Mode string
source string
deviceName string
diskEncryptionKeyRaw string
diskEncryptionKeySha256 string
kmsKeySelfLink string
mode string
source str
device_name str
diskEncryptionKeyRaw str
diskEncryptionKeySha256 str
kmsKeySelfLink str
mode str

InstanceFromTemplateBootDisk

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
DeviceName string
DiskEncryptionKeyRaw string
DiskEncryptionKeySha256 string
InitializeParams InstanceFromTemplateBootDiskInitializeParamsArgs
KmsKeySelfLink string
Mode string
Source string
AutoDelete bool
DeviceName string
DiskEncryptionKeyRaw string
DiskEncryptionKeySha256 string
InitializeParams InstanceFromTemplateBootDiskInitializeParams
KmsKeySelfLink string
Mode string
Source string
autoDelete boolean
deviceName string
diskEncryptionKeyRaw string
diskEncryptionKeySha256 string
initializeParams InstanceFromTemplateBootDiskInitializeParams
kmsKeySelfLink string
mode string
source string
autoDelete bool
device_name str
diskEncryptionKeyRaw str
diskEncryptionKeySha256 str
initializeParams Dict[InstanceFromTemplateBootDiskInitializeParams]
kmsKeySelfLink str
mode str
source str

InstanceFromTemplateBootDiskInitializeParams

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.

Image string
Labels Dictionary<string, object>
Size int
Type string
Image string
Labels map[string]interface{}
Size int
Type string
image string
labels {[key: string]: any}
size number
type string
image str
labels Dict[str, Any]
size float
type str

InstanceFromTemplateGuestAccelerator

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
Type string
Count int
Type string
count number
type string
count float
type str

InstanceFromTemplateNetworkInterface

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<InstanceFromTemplateNetworkInterfaceAccessConfigArgs>
AliasIpRanges List<InstanceFromTemplateNetworkInterfaceAliasIpRangeArgs>
Name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

Network string
NetworkIp string
Subnetwork string
SubnetworkProject string
AccessConfigs []InstanceFromTemplateNetworkInterfaceAccessConfig
AliasIpRanges []InstanceFromTemplateNetworkInterfaceAliasIpRange
Name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

Network string
NetworkIp string
Subnetwork string
SubnetworkProject string
accessConfigs InstanceFromTemplateNetworkInterfaceAccessConfig[]
aliasIpRanges InstanceFromTemplateNetworkInterfaceAliasIpRange[]
name string

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

network string
networkIp string
subnetwork string
subnetworkProject string
accessConfigs List[InstanceFromTemplateNetworkInterfaceAccessConfig]
aliasIpRanges List[InstanceFromTemplateNetworkInterfaceAliasIpRange]
name str

A unique name for the resource, required by GCE. Changing this forces a new resource to be created.

network str
networkIp str
subnetwork str
subnetworkProject str

InstanceFromTemplateNetworkInterfaceAccessConfig

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
NetworkTier string
PublicPtrDomainName string
NatIp string
NetworkTier string
PublicPtrDomainName string
natIp string
networkTier string
publicPtrDomainName string
natIp str
network_tier str
publicPtrDomainName str

InstanceFromTemplateNetworkInterfaceAliasIpRange

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
SubnetworkRangeName string
IpCidrRange string
SubnetworkRangeName string
ipCidrRange string
subnetworkRangeName string
ip_cidr_range str
subnetworkRangeName str

InstanceFromTemplateScheduling

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
MinNodeCpus int
NodeAffinities List<InstanceFromTemplateSchedulingNodeAffinityArgs>
OnHostMaintenance string
Preemptible bool
AutomaticRestart bool
MinNodeCpus int
NodeAffinities []InstanceFromTemplateSchedulingNodeAffinity
OnHostMaintenance string
Preemptible bool
automaticRestart boolean
minNodeCpus number
nodeAffinities InstanceFromTemplateSchedulingNodeAffinity[]
onHostMaintenance string
preemptible boolean
automaticRestart bool
minNodeCpus float
nodeAffinities List[InstanceFromTemplateSchedulingNodeAffinity]
onHostMaintenance str
preemptible bool

InstanceFromTemplateSchedulingNodeAffinity

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
Operator string
Values List<string>
Key string
Operator string
Values []string
key string
operator string
values string[]
key str
operator str
values List[str]

InstanceFromTemplateScratchDisk

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.

Interface string
Interface string
interface string
interface str

InstanceFromTemplateServiceAccount

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>
Email string
Scopes []string
Email string
scopes string[]
email string
scopes List[str]
email str

InstanceFromTemplateShieldedInstanceConfig

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
EnableSecureBoot bool
EnableVtpm bool
EnableIntegrityMonitoring bool
EnableSecureBoot bool
EnableVtpm bool
enableIntegrityMonitoring boolean
enableSecureBoot boolean
enableVtpm boolean
enableIntegrityMonitoring bool
enableSecureBoot bool
enableVtpm bool

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.