S3 Remote State and Credentials in non-default profiles
Problem
Terraform Version 0.9.2 Affected Resource(s) terraform s3 remote state backend Terraform Configuration Files ~/.aws/credentials - This would be the entire file, no other entries [code block] MAIN.TF [code block] Debug Output NA Panic Output NA Expected Behavior What should have happened? The expectation is that I should be able to use a non-default profile credential to complete the backend init (`terraform init`) call. Actual Behavior What actually happened? command fails with the following error: [code block] if i simply move the same credentials under the default profile in the standard shared credentials file it works without issue. Steps to Reproduce `terraform init` Important Factoids none References not that i was able to find for 0.9.2
Error Output
Error inspecting state in "s3": AccessDenied: Access Denied
Unverified for your environment
Select your OS to check compatibility.
1 Fix
Solution: S3 Remote State and Credentials in non-default profiles
Ok, so after deleting state (local .terraform folder and state file in S3) and re-running `terraform init` it worked with custom credentials, and no default credential set. Not sure how someone with this issue in production would handle it, obviously deleting state isn't a possibility
Trust Score
3 verifications
- 1
Ok, so after deleting state (local .terraform folder and state file in S3) and r
Ok, so after deleting state (local .terraform folder and state file in S3) and re-running `terraform init` it worked with custom credentials, and no default credential set. Not sure how someone with this issue in production would handle it, obviously deleting state isn't a possibility
Validation
Resolved in hashicorp/terraform GitHub issue #13589. Community reactions: 3 upvotes.
Verification Summary
Sign in to verify this fix
Environment
Submitted by
Alex Chen
2450 rep