Closed olfway closed 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
Transferring to Terraform Core repository, since this relates to the S3 backend/terraform_remote_state
.
anyone working on this issue??
Ok so I have spent some time to trace the issue and it seems to be due to this dependency:
https://github.com/hashicorp/terraform/blob/main/go.mod#L31C1-L32C1
--> this is pinned to an old version v0.7.1
where it is reading regions from aws/aws-sdk-go
which is further pinned to an older version where the region is not updated. https://github.com/hashicorp/aws-sdk-go-base/blob/v0.7.1/go.mod#L4
https://github.com/aws/aws-sdk-go/blob/v1.31.9/aws/endpoints/defaults.go#L19
The latest stable version seems to be v1.1.0 but it is still pointing to v1.31.9 which would still have the same issues (https://github.com/hashicorp/aws-sdk-go-base/blob/v1.1.0/go.mod)
v2 is still in beta -- theoretically upgrading the go.mod to v2 beta this should be fixed but I'm not too sure what the impact is at the moment
It looks only this module is ONLY used by the s3 backend component -- I am compelled to bump up the version of the module
In the interim, the workaround is to set the backend config parameter skip_region_validation
to true
.
This will be addressed in Terraform v1.6. If you still see this error when v1.6 is released (or you try any of the v1.6 beta releases), please open a new issue
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 Core Version
1.4.6
AWS Provider Version
5.0.1
Affected Resource(s)
Expected Behavior
Terraform should be able to read s3 based remote state in ap-south-2 region
Actual Behavior
Terraform plan return invalid region error
Relevant Error/Panic Output Snippet
Terraform Configuration Files
Steps to Reproduce
Run terraform plan with config above
It working if I add
Debug Output
No response
Panic Output
No response
Important Factoids
No response
References
No response
Would you like to implement a fix?
None