Commit Graph

2 Commits

Author SHA1 Message Date
Martin Atkins
6707ef6ca3
Fix regression of backend reinit detection when backend schema has required arguments (#2119)
Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2024-11-04 14:23:32 -05:00
Martin Atkins
8b0b5b271b command/init: Support static eval for backend config migration check
The "backendConfigNeedsMigration" helper evaluates the backend
configuration inline to compare it with the object previously saved in the
.terraform/terraform.tfstate file.

However, this wasn't updated to use the new "static eval" functionality
and so was treating any references to variables or function calls as
invalid, causing a spurious "backend configuration changed" error when
re-initializing the working directory with identical backend configuration
settings.

Signed-off-by: Martin Atkins <mart@degeneration.co.uk>
2024-10-09 09:27:11 -07:00