You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: modules/instance_template/README.md
+4-2Lines changed: 4 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,6 +20,7 @@ See the [simple](../../examples/instance_template/simple) for a usage example.
20
20
| can\_ip\_forward | Enable IP forwarding, for NAT instances for example | string |`"false"`| no |
21
21
| disk\_size\_gb | Boot disk size in GB | string |`"100"`| no |
22
22
| disk\_type | Boot disk type, can be either pd-ssd, local-ssd, or pd-standard | string |`"pd-standard"`| no |
23
+
| 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| string |`"false"`| no |
23
24
| labels | Labels, provided as a map | map(string) |`<map>`| no |
24
25
| machine\_type | Machine type to create, e.g. n1-standard-1 | string |`"n1-standard-1"`| no |
25
26
| metadata | Metadata, provided as a map | map(string) |`<map>`| no |
@@ -28,9 +29,10 @@ See the [simple](../../examples/instance_template/simple) for a usage example.
28
29
| preemptible | Allow the instance to be preempted | bool |`"false"`| no |
29
30
| project\_id | The GCP project ID | string |`"null"`| no |
30
31
| 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 |
32
+
| shielded\_instance\_config | Not used unless enable_shielded_vm is true. Shielded VM configuration for the instance. | object |`<map>`| no |
31
33
| source\_image | Source disk image. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image. | string |`""`| no |
32
-
| source\_image\_family | Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image. | string |`""`| no |
33
-
| source\_image\_project | Project where the source image comes from| string |`""`| no |
34
+
| 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 |
35
+
| 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 |
34
36
| startup\_script | User startup script to run when instances spin up | string |`""`| no |
35
37
| 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 |
36
38
| subnetwork\_project | The ID of the project in which the subnetwork belongs. If it is not provided, the provider project is used. | string |`""`| no |
Copy file name to clipboardExpand all lines: modules/instance_template/variables.tf
+26-3Lines changed: 26 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -63,12 +63,12 @@ variable "source_image" {
63
63
64
64
variable"source_image_family" {
65
65
description="Source image family. If neither source_image nor source_image_family is specified, defaults to the latest public CentOS image."
66
-
default=""
66
+
default="centos-7"
67
67
}
68
68
69
69
variable"source_image_project" {
70
-
description="Project where the source image comes from"
71
-
default=""
70
+
description="Project where the source image comes from. The default project contains images that support Shielded VMs if desired"
71
+
default="gce-uefi-images"
72
72
}
73
73
74
74
variable"disk_size_gb" {
@@ -141,3 +141,26 @@ variable "service_account" {
141
141
})
142
142
description="Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template.html#service_account."
143
143
}
144
+
145
+
###########################
146
+
# Shielded VMs
147
+
###########################
148
+
variable"enable_shielded_vm" {
149
+
default=false
150
+
description="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"
151
+
}
152
+
153
+
variable"shielded_instance_config" {
154
+
description="Not used unless enable_shielded_vm is true. Shielded VM configuration for the instance."
0 commit comments