Skip to content

Commit

Permalink
fix: make project_id and region as required input for instance_template
Browse files Browse the repository at this point in the history
  • Loading branch information
q2w committed Dec 13, 2024
1 parent 0c9d75b commit 1c4576d
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/instance_template/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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. | <pre>object({<br> email = string<br> scopes = optional(set(string), ["cloud-platform"])<br> })</pre> | n/a | yes |
| shielded\_instance\_config | Not used unless enable\_shielded\_vm is true. Shielded VM configuration for the instance. | <pre>object({<br> enable_secure_boot = bool<br> enable_vtpm = bool<br> enable_integrity_monitoring = bool<br> })</pre> | <pre>{<br> "enable_integrity_monitoring": true,<br> "enable_secure_boot": true,<br> "enable_vtpm": true<br>}</pre> | no |
Expand Down
2 changes: 2 additions & 0 deletions modules/instance_template/metadata.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 0 additions & 2 deletions modules/instance_template/variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -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" {
Expand Down

0 comments on commit 1c4576d

Please sign in to comment.