sparse-state-34229
11/07/2021, 12:21 AMaws-sdk-go
where when running Pulumi in a container on an EC2 instance, it’s unable to use the instance profile attached to the instance. this is the error I get:
Exception: invoke of aws:index/getCallerIdentity:getCallerIdentity failed: invocation of aws:index/getCallerIdentity:getCallerIdentity returned an error: 1 error occurred:
* 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: NoCredentialProviders: no valid providers in chain
caused by: EnvAccessKeyNotFound: failed to find credentials in the environment.
SharedCredsLoad: failed to load profile, .
EC2RoleRequestError: no EC2 instance role found
caused by: RequestCanceled: EC2 IMDS access disabled via AWS_EC2_METADATA_DISABLED env var
error: an unhandled error occurred: Program exited with non-zero exit code: 1
• I can curl the IMDSv1 endpoint within the container
• the container does not have any AWS_*
env vars set
• the container does not mount ~/.aws
• there is a valid IAM role attached to the instance that is in use with Terraform runs
anyone know what’s up here?billowy-army-68599
11/07/2021, 5:03 AMaws-sdk-go
inside the program?sparse-state-34229
11/07/2021, 5:49 AMpdm run pulumi preview -C <project_dir> -s <stack> --diff
in github actionsbillowy-army-68599
11/07/2021, 6:09 AMpulumi config set aws:skipMetadataApiCheck false
in your pulumi programsparse-state-34229
11/07/2021, 6:11 AMbillowy-army-68599
11/07/2021, 6:12 AMAWS_EC2_METADATA_DISABLED=false
sparse-state-34229
11/07/2021, 6:14 AMbillowy-army-68599
11/07/2021, 3:19 PMsparse-state-34229
11/07/2021, 4:23 PMpreview
run in this output just linked[urn=urn:pulumi:main::account::pulumi:pulumi:Stack::account-main]
EC2RoleRequestError: no EC2 instance role found