I've encountered errors like reproduced below while testing the state migration for #60.
│ on .terraform/modules/cluster/variables.tf line 164, in variable "additional_worker_groups":
│ 164: (v.state == null || lower(v.state) == "running" || lower(v.state) == "stopped")
│ ├────────────────
│ │ v.state is null
│
│ Invalid value for "str" parameter: argument must not be null.
Since Terraform boolean operators don't short-circuit, we should use the ternary operator form to perform the validation anyway (we already do this for the disk size parameter). Currently the old approach works because apparently you can compare a string to null.
Checklist
[x] Keep pull requests small so they can be easily reviewed.
[x] Categorize the PR by setting a good title and adding one of the labels:
bug, enhancement, documentation, change, breaking, dependency
as they show up in the changelog
I've encountered errors like reproduced below while testing the state migration for #60.
Since Terraform boolean operators don't short-circuit, we should use the ternary operator form to perform the validation anyway (we already do this for the disk size parameter). Currently the old approach works because apparently you can compare a string to
null
.Checklist
bug
,enhancement
,documentation
,change
,breaking
,dependency
as they show up in the changelog