Expand description
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.
§Example Usage
resources:
tpl:
type: gcp:compute:InstanceTemplate
properties:
name: template
machineType: e2-medium
disks:
- sourceImage: debian-cloud/debian-11
autoDelete: true
diskSizeGb: 100
boot: true
networkInterfaces:
- network: default
metadata:
foo: bar
canIpForward: true
tplInstanceFromTemplate:
type: gcp:compute:InstanceFromTemplate
name: tpl
properties:
name: instance-from-template
zone: us-central1-a
sourceInstanceTemplate: ${tpl.selfLinkUnique}
canIpForward: false
labels:
my_key: my_value
§Import
This resource does not support import.
Structs§
- Use builder syntax to set the inputs and finish with
build_struct()
.
Functions§
- Registers a new resource with the given unique name and arguments