After a team moves CI from Terraform 1.14 to 1.15, terraform validate starts failing on a backend "s3" block whose required bucket argument was misspelled as buckets. The same file validated cleanly on 1.14. What is the right response?
Select an answer to reveal the explanation.
Short Explanation
Version 1.15 gave validate a new pair of glasses, and now it can see the typo that was always there. You fix the typo, not the glasses. The trap is pulling a variable into the backend block, which Terraform doesn't allow anyway.
Full Explanation
Terraform 1.15 extended terraform validate to check the backend block: it confirms that the backend type exists, that required attributes are present and that the backend's own validation logic passes. A misspelled argument means the required bucket attribute is missing and an unknown argument is present, so the new failure is a correct finding of a latent defect that earlier versions only surfaced later, typically during init. The fix is to correct the argument name and keep the stricter check in CI. Pinning CI to the older version permanently gives up the upgrade and leaves the defect in place, and the failure is a real validation error, not an advisory warning. Backend blocks cannot reference input variables, because the backend is configured before variables are evaluated, so replacing the value with a variable is invalid configuration. Removing the backend block entirely does not move configuration into -backend-config; without a backend block the configuration uses the local backend, and partial configuration requires at least an empty backend block to receive -backend-config values. Exam caveat: this is a good example of why upgrade notes and changelogs for each skipped release should be read before a core upgrade. Operational check: fix the argument, run terraform init and terraform validate with 1.15 in a branch, and confirm both succeed before merging.