Terraform not using ECS Task IAM Role when retrieving modules from S3 #5365
Labels
bug
Addresses a defect in current functionality.
provider
Pertains to the provider itself, rather than any interaction with AWS.
upstream-terraform
Addresses functionality related to the Terraform core binary.
Community Note
Terraform Version
0.11.7
Affected Resource(s)
Terraform Configuration Files
The failure occurs regardless of the bucket address syntax used:
Debug Output
https://gist.github.com/tomgoren/3025fddff5e79574c92dc6ff1a9221db
Expected Behavior
Load the modules
Actual Behavior
Steps to Reproduce
terraform get
(orinit
, orplan
, or anything that requires pulling the modules from S3)Important Factoids
We experience the problem when running in ECS in the context of a container that should use the IAM role associated with the Task, which has permissions to pull the file from the bucket.
Using
awscli
there are no issues doing theAssumeRole
operation, that is:No issue.
Running
terraform get
will produce the error posted above (see attached Gist for full details).However, if I manually retrieve the temporary IAM credentials produced by ECS, a la:
Now
terraform get
works as expected.Thanks! I hope that this is enough information, please let me know if it's just me or if this is an actual bug!
The text was updated successfully, but these errors were encountered: