This submodule allows you to create a google_compute_instance_template
resource, which is used as the basis for the other instance, managed, and
unmanaged instance groups submodules.
See the simple for a usage example.
Name | Description | Type | Default | Required |
---|---|---|---|---|
access_config | Access configurations, i.e. IPs via which the VM instance can be accessed via the Internet. | list(object({ |
[] |
no |
additional_disks | List of maps of additional disks. See https://www.terraform.io/docs/providers/google/r/compute_instance_template.html#disk_name | list(object({ |
[] |
no |
auto_delete | Whether or not the boot disk should be auto-deleted | string |
"true" |
no |
can_ip_forward | Enable IP forwarding, for NAT instances for example | string |
"false" |
no |
disk_size_gb | Boot disk size in GB | string |
"100" |
no |
disk_type | Boot disk type, can be either pd-ssd, local-ssd, or pd-standard | string |
"pd-standard" |
no |
enable_shielded_vm | Whether to enable the Shielded VM configuration on the instance. Note that the instance image must support Shielded VMs. See https://cloud.google.com/compute/docs/images | bool |
false |
no |
labels | Labels, provided as a map | map(string) |
{} |
no |
machine_type | Machine type to create, e.g. n1-standard-1 | string |
"n1-standard-1" |
no |
metadata | Metadata, provided as a map | map(string) |
{} |
no |
name_prefix | Name prefix for the instance template | string |
"default-instance-template" |
no |
network | The name or self_link of the network to attach this interface to. Use network attribute for Legacy or Auto subnetted networks and subnetwork for custom subnetted networks. | string |
"" |
no |
preemptible | Allow the instance to be preempted | bool |
false |
no |
project_id | The GCP project ID | string |
null |
no |
region | Region where the instance template should be created. | string |
null |
no |
service_account | Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template.html#service_account. | object({ |
n/a | yes |
shielded_instance_config | Not used unless enable_shielded_vm is true. Shielded VM configuration for the instance. | object({ |
{ |
no |
source_image | Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image. | string |
"" |
no |
source_image_family | Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image. | string |
"centos-7" |
no |
source_image_project | Project where the source image comes from. The default project contains images that support Shielded VMs if desired | string |
"gce-uefi-images" |
no |
startup_script | User startup script to run when instances spin up | string |
"" |
no |
subnetwork | The name of the subnetwork to attach this interface to. The subnetwork must exist in the same region this instance will be created in. Either network or subnetwork must be provided. | string |
"" |
no |
subnetwork_project | The ID of the project in which the subnetwork belongs. If it is not provided, the provider project is used. | string |
"" |
no |
tags | Network tags, provided as a list | list(string) |
[] |
no |
Name | Description |
---|---|
name | Name of instance template |
self_link | Self-link of instance template |
tags | Tags that will be associated with instance(s) |