Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Terraform plan and apply failing with authentication error inside docker using latest aws provider version 4.0.0 #23150

Closed
srinivasakuruganti opened this issue Feb 12, 2022 · 2 comments
Labels
authentication Pertains to authentication; to the provider itself of otherwise. bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS.

Comments

@srinivasakuruganti
Copy link

srinivasakuruganti commented Feb 12, 2022

Hi,
I am running terraform using docker. However, with latest aws provider version 4.0.0 is throwing the below error

Error: error configuring Terraform AWS Provider: no valid credential sources for Terraform AWS Provider found.

Please see https://registry.terraform.io/providers/hashicorp/aws
for more information about providing credentials.

Error: no EC2 IMDS role found, operation error ec2imds: GetMetadata, canceled, context deadline exceeded

Steps to reproduce:

  1. Attach IAM role to an ec2 instance
  2. Run terraform plan or apply using docker container by downloading latest version 4.0.0

No issue found when using previous version 3.74.2. Also the same behaviour is not observed when running the terraform outside the docker.

@github-actions github-actions bot added the needs-triage Waiting for first response or review from a maintainer. label Feb 12, 2022
@ewbankkit ewbankkit added authentication Pertains to authentication; to the provider itself of otherwise. bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS. and removed needs-triage Waiting for first response or review from a maintainer. labels Feb 12, 2022
@ewbankkit
Copy link
Contributor

@srinivasakuruganti Thanks for raising this issue.
It has already been noticed in #23110. I'm going to close this one as a duplicate so that we can concentrate discussion in the linked issue.
Please add any additional comments there.

@github-actions
Copy link

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 13, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
authentication Pertains to authentication; to the provider itself of otherwise. bug Addresses a defect in current functionality. provider Pertains to the provider itself, rather than any interaction with AWS.
Projects
None yet
Development

No branches or pull requests

2 participants