-
Notifications
You must be signed in to change notification settings - Fork 159
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
Reconsider the default aws:skipMetadataCheck setting #1692
Comments
ATM is not possible to override through ENV VAR, for some reason setting We had to change all our Providers and add |
Hi @SharpEdgeMarshall - I'm running into this issue as I'm trying to implement Pulumi Automation API. Is the only solution then to create an explicit AWS provider with { skipMetadataApiCheck: false } in the CustomResourcesOptions? Or is there a simpler solution? |
@seunggs there are no simpler solutions that i know atm sorry. |
No worries - I just misunderstood the solution. I didn't know you meant adding skipMetadataApiCheck: false as Pulumi config. That's a simple solution! :) Thanks for sharing this. |
Pay attention that if you put it in the config it works only for the
default provider.
|
Oh didn't know that - thanks for pointing that out. |
This is still a problem. It would be great if we can get the default changed back, or at least fix the fact that the environment variable isn't being picked up properly by the TF provider at the bottom of the chain. |
This will at least make it more visible from the AWS Classic registry page: pulumi/registry#1313 |
for the record, I also got hit with needing to set |
AFAICT this problem manifests with the unhelpful error message
Dropping this here to help lost people like previous-me looking for an answer. The answer is:
|
After some testing this is happening only for stack 'dev' I get this error
After i add this still the same error
I try this
but i get this error
|
I'm also having this issue, trying to use Github Actions to deploy a pulumi stack. I've committed my
then in my github actions workflow I'm using these steps
I've confirmed that my AWS role and credentials are working as I'm able to list the kms keys and s3 bucket.
Any ideas where to go from here? |
@Masonjrc Can you create another stack and test it again ? I was having the same issue only with the dev stack. |
@r00t9 Wow that worked, thanks so much! I guess my pulumi state files must somehow be misconfigured in s3? I might try and purge my dev stack and start again. Were you able to get your dev going again? |
Purging my dev stack and restarting worked... So just for anyone else who comes across this, my issue was that when I created the stack I followed the callout instruction given here and gave the secrets provider with a profile specified.
Removing the profile argument in the query string fixed it, you can check your |
Wanna enforce this, its still an issue even with |
This PR explores reverting the default `aws:skipMetadataApiCheck=false` setting to enable the provider to be able to seamlessly authenticate against an IMDS(v2) endpoints in the AWS environment. It appears that doing so no longer slows down the provider startup time perceptibly. The way I tested the speed delta was by measuring local empty preview of an AWS s3 Bucket using AWS_PROFILE authentication with local <-> us-east-1 there is no perceptible difference. Fixes: #1692 An integration test is added that exercises `pulumi preview` on an EC2 instance with IMDSv2 and asserts that the provider can authenticate successfully. Background: - #873 - #1288
Since #1692 the provider no longer treats skipMetadataApiCheck specially but matches the behavior from Terraform upstream where this check is enabled unless the configuration value is explicitly set.
In #1288 we disabled the metadata check in order to speed Pulumi up.
Unfortunately, this breaks Pulumi when running with an EC2 instance role, meaning lots of scenarios like self hosted CI/CD runners will not work.
It's possible of course to fix this by setting the environment variable
AWS_EC2_METADATA_DISABLED=false
orpulumi config set aws:skipMetadataApiCheck false
, but the it's extremely difficult to figure that out unless you inherently know about this setting. This default setting seems to be violating the principal of least surprise and is causing a headache for those users who are setting Pulumi up in CI/CD.To rectify this, we need to either:
false
it might be possible to intercept the error message, which currently looks a bit like this:
But this comes from the AWS SDK, so we'd need to trap the error
The text was updated successfully, but these errors were encountered: