Open womblep opened 1 year ago
Voting for Prioritization
Volunteering to Work on This Issue
Any work around on this?
Would also be interested in a workaround or fix. This happend for me on CodeCatalyst when using the workers Role to execute Terraform with named profiles in the shared profile config file. While I can run aws cli commands with the named profiles without problems, with Terraform this fails.
I'm facing the same issue when working on EKS Pod Identity with terraform running from within.
Terraform Core Version
1.4.4
AWS Provider Version
4.61.0
Affected Resource(s)
Any resource. The credentials available as a Task role on ECS FARGATE are not being detected by terraform. I have tried with environment variables as well as shared config file. AWS_CONTAINER_CREDENTIALS_RELATIVE_URI is not being detected
Expected Behavior
terraform should run using the AWS_CONTAINER_CREDENTIALS_RELATIVE_URI to determine the task role
Actual Behavior
Planning failed. Terraform encountered an error while generating this plan.
Relevant Error/Panic Output Snippet
No response
Terraform Configuration Files
Anything in <> is removed for security
test.tf
~/.aws/config
environment
Steps to Reproduce
terraform plan
output is:
But AWS_CONTAINER_CREDENTIALS_RELATIVE_URI is set
Debug Output
https://gist.github.com/womblep/37e1d8a576157079cbd98752653c219d
Panic Output
No response
Important Factoids
It also doesnt pick up AWS_CONTAINER_CREDENTIALS_RELATIVE_URI natively without the ~/.aws/config file which the documentation suggests it should. Instead it fails by not finding the EC2 profile suggesting that it skipped AWS_CONTAINER_CREDENTIALS_RELATIVE_URI completely
References
No response
Would you like to implement a fix?
None