Closed Phil1602 closed 2 years ago
Hello! Thanks for reporting this.
We removed the Swift backend in Terraform v1.3 because it hasn't had a dedicated maintainer for a few versions now and so it was becoming problematic to keep working in newer Terraform versions. Since that backend is no longer present in the Terraform codebase, I'm going to close this issue.
If you're currently using this backend with an older version of Terraform, see Removal of Deprecated State Storage Backends in the Terraform v1.3 upgrade guide for some information on the available options for migration.
Thanks again!
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Terraform Version
Terraform Configuration Files
This is only a snippet added to kubespray, see below.
backend.tf:
Debug Output
Expected Behavior
According to the documentation:
The OS_CLOUD environment variable should (if the documentation states correctly) not have precedence over the attribute of the backend configuration block, because the variable is not omitted.
Actual Behavior
OS_CLOUD environment variable overrides the cloud attribute of the swift backend.
Workaround
Not using the OS_CLOUD env variable at all, but setting both attributes explicitly for provider and backend works fine.
terraform apply -var-file=cluster.tfvars ../../contrib/terraform/openstack/
Please note that the "workarkound" is fine, but it would be nice to have the documentation adjusted to make the priority OS_CLOUD > value in terraform (more) clear.
Steps to Reproduce
I encountered this issue while using kubespray. However kubespray needs many configuration parameters. I can provide a minimal and more detailed example if wanted.
Prerequisites:
Steps:
cat .terraform/terraform.tfstate | grep cloud
that the correct cloud has been set.The error occurs, because OS_CLOUD seems to override the cloud value of the backend and tries to retrieve the data from
os-two
instead ofos-one
Thanks in advance!