Prevent recreation for key_revocation_action in compute-vm module (#3620)

* fix(compute-vm): prevent instance recreation for key_revocation_action_type

The `key_revocation_action_type` attribute in the `google_compute_instance`
resource defaults to `NONE` on the provider side.

When this optional attribute was not explicitly set in the module's
`options` variable, it resolved to `null` in the Terraform configuration.
This caused Terraform to detect a change from `null` to `NONE` on every
plan, leading to unnecessary instance recreation.

This change applies `coalesce` to
`var.options.key_revocation_action_type` in the resource definition so
that it defaults to `NONE` when unset, aligning the configuration with
provider behavior and preventing a permadiff.

* updated the regional compute template too with the key_revocation_action_type

* fixed the formatting
This commit is contained in:
Suryansh Singhal
2026-01-05 16:23:47 +05:30
committed by GitHub
parent d0d7c64670
commit ba304518f1
13 changed files with 144 additions and 131 deletions

View File

@@ -72,7 +72,7 @@ values:
enable_display: null
guest_accelerator: []
instance_description: null
key_revocation_action_type: null
key_revocation_action_type: NONE
labels: null
machine_type: f1-micro
metadata: