instance_termination_action must be set for compute-vm spot instances (#778)

* Bumped providers version
* Adds ability to control instance_termination_action for SpotVMs
This commit is contained in:
Simone Ruffilli
2022-08-20 18:37:17 +02:00
committed by GitHub
parent ec88fa9f25
commit a29faa7f8c
92 changed files with 222 additions and 198 deletions

View File

@@ -190,11 +190,19 @@ variable "options" {
allow_stopping_for_update = bool
deletion_protection = bool
spot = bool
termination_action = string
})
default = {
allow_stopping_for_update = true
deletion_protection = false
spot = false
termination_action = null
}
validation {
condition = (var.options.termination_action == null
||
contains(["STOP", "DELETE"], coalesce(var.options.termination_action, "1")))
error_message = "Allowed values for options.termination_action are 'STOP', 'DELETE' and null."
}
}