diff --git a/modules/instance_template/README.md b/modules/instance_template/README.md index 0127382c..5d3dd7a9 100644 --- a/modules/instance_template/README.md +++ b/modules/instance_template/README.md @@ -44,8 +44,8 @@ See the [simple](../../examples/instance_template/simple) for a usage example. | nic\_type | Valid values are "VIRTIO\_NET", "GVNIC" or set to null to accept API default behavior. | `string` | `null` | no | | on\_host\_maintenance | Instance availability Policy | `string` | `"MIGRATE"` | 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 | +| project\_id | The GCP project ID | `string` | n/a | yes | +| region | Region where the instance template should be created. | `string` | n/a | yes | | resource\_policies | A list of 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. | `list(string)` | `[]` | no | | service\_account | Service account to attach to the instance. See https://www.terraform.io/docs/providers/google/r/compute_instance_template#service_account. |
object({
email = string
scopes = optional(set(string), ["cloud-platform"])
})
| n/a | yes | | shielded\_instance\_config | Not used unless enable\_shielded\_vm is true. Shielded VM configuration for the instance. |
object({
enable_secure_boot = bool
enable_vtpm = bool
enable_integrity_monitoring = bool
})
|
{
"enable_integrity_monitoring": true,
"enable_secure_boot": true,
"enable_vtpm": true
}
| no | diff --git a/modules/instance_template/metadata.yaml b/modules/instance_template/metadata.yaml index 4064f403..ba72ce94 100644 --- a/modules/instance_template/metadata.yaml +++ b/modules/instance_template/metadata.yaml @@ -83,9 +83,11 @@ spec: - name: project_id description: The GCP project ID varType: string + required: true - name: region description: Region where the instance template should be created. varType: string + required: true - name: name_prefix description: Name prefix for the instance template varType: string diff --git a/modules/instance_template/variables.tf b/modules/instance_template/variables.tf index a7162fcb..f15468df 100644 --- a/modules/instance_template/variables.tf +++ b/modules/instance_template/variables.tf @@ -17,13 +17,11 @@ variable "project_id" { type = string description = "The GCP project ID" - default = null } variable "region" { type = string description = "Region where the instance template should be created." - default = null } variable "name_prefix" {