You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The first example initialises fine, the second fails with:
│ Error: Error loading state:
│ Unable to access object "redacted.tfstate" in S3 bucket "redacted": operation error S3: HeadObject, https response error StatusCode: 403, RequestID: redacted, HostID: redacted, api error Forbidden: Forbidden
│
│ Terraform failed to load the default state from the "s3" backend.
│ State migration cannot occur unless the state can be loaded. Backend
│ modification and state migration has been aborted. The state in both the
│ source and the destination remain unmodified. Please resolve the
│ above error and try again.
Expected Behavior
The request should work with chained role assumptions.
Actual Behavior
It fails with a role inbetween.
Steps to Reproduce
terraform init
Additional Context
I have manually verified that
The role has access (by assuming it directly)
The chain is intact (assuming works on the CLI and the final role has access to S3 if role-chained)
I am also suspect that the roles are actually chained. The following configuration:
This looks like an error in the configuration, you can't assign different things to the same attribute and the above configuration returns an Attribute redefined error during decoding so you shouldn't be able to get past initialization. Can you show how you are getting to the point of receiving a response from AWS with the given configuration?
The attribute explicitly is supposed to allow for multiple values to allow for AWS role chaining.
This is supposed to provide parity with the AWS provider, which supports this feature here.
#36454 also talks about this feature, where they were able to get it running somehow. Which is confusing to me because:
The feature was implemented in #35720 but was reverted in #35827.
Yeah, I also don't understand what was going on in #36454, but you're correct about the configuration, the schema is explicitly a single attribute. I suspect it's a discrepancy in the documentation, but I'll wait for the AWS developers to chime in on the actual intent here.
Terraform Version
Terraform Configuration Files
This works:
This fails:
Debug Output
The first example initialises fine, the second fails with:
Expected Behavior
The request should work with chained role assumptions.
Actual Behavior
It fails with a role inbetween.
Steps to Reproduce
terraform init
Additional Context
I have manually verified that
I am also suspect that the roles are actually chained. The following configuration:
Still yields the "403" error, instead of a "invalid ARN" error, as I would have expected.
The documentation is a bit iffy as well. It just says "multiple values can be specified", but isn't clear about whether that means
I tried all of these and more, but looking at the source code I believe my above code is what would be intended.
References
Generative AI / LLM assisted development?
No response
The text was updated successfully, but these errors were encountered: