-
Notifications
You must be signed in to change notification settings - Fork 10.3k
Terraform assuming EC2 role instead of ECS role #24253
Copy link
Copy link
Closed
Description
I can confirm that ECS container which is running the terraform has the environmental variable AWS_CONTAINER_CREDENTIALS_RELATIVE_URI
Terraform Version
v0.12.21
Terraform Configuration Files
dev-backend-config
bucket=""
key=""
region=""
command - terraform init -backend-config="dev-backend-config"
Debug Output
2020/03/03 11:46:52 [INFO] ECS container credentials detected, RemoteCredProvider added to auth chain
2020/03/03 11:46:52 [INFO] AWS EC2 instance detected via default metadata API endpoint, EC2RoleProvider added to the auth chain
2020/03/03 11:46:53 [INFO] AWS Auth provider used: "EC2RoleProvider
Crash Output
Expected Behavior
Terraform should assume role assigned to ECS task
Actual Behavior
Terraform is assuming EC2 role
Steps to Reproduce
Additional Context
References
Reactions are currently unavailable