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

Ensure we validate credentials correctly #2004

Merged
merged 1 commit into from
Jun 15, 2022
Merged

Ensure we validate credentials correctly #2004

merged 1 commit into from
Jun 15, 2022

Conversation

stack72
Copy link
Contributor

@stack72 stack72 commented Jun 10, 2022

Fixes: #1995

Currently the creds validation is broken:
asciicast

New code:

With AWS_PROFILE:
asciicast

With default creds:
asciicast

With Environment Vars for AWS_ACCESS_KEY_ID && AWS_SECRET_ACCESS_KEY
asciicast

Using an AWS AssumeRole:
asciicast

@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@stack72 stack72 requested review from jaxxstorm and jkodroff June 10, 2022 12:13
@stack72 stack72 force-pushed the creds-validation branch 2 times, most recently from fe3ad62 to 59f20cf Compare June 14, 2022 10:05
@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@stack72 stack72 force-pushed the creds-validation branch from 59f20cf to 8d6e63b Compare June 14, 2022 10:55
@github-actions
Copy link

Does the PR have any schema changes?

Looking good! No breaking changes found.
No new resources/functions.

@michaeldop
Copy link
Contributor

How do I run pulumi with the aws provider from an ec2 instance using an instance role? This no longer works now

@stack72
Copy link
Contributor Author

stack72 commented Jun 23, 2022

Hi @mdop-wh

Please can you tell me a few things here:

  1. What was the version you upgraded from?
  2. Do you have a config value for aws:skipMetadataApiCheck false - as per https://github.com/pulumi/pulumi-aws#authenticating-pulumi-aws-via-ec2-instance-metadata

Thanks! I want to ensure there is no regression here

Paul

@michaeldop
Copy link
Contributor

Hi @stack72

  1. We upgraded from 5.4.0 -> 5.9.1
    5.8.0 also worked on a different project
  2. Yes we have had the skipMetadataApiCheck set to false for a while now

I just found out that 5.9.1 does work when I set aws:skipCredentialsValidation: true. So maybe this is required now?

@christophermaier
Copy link

We're hitting the exact same thing as @mdop-wh is (literally word-for-word 😅)

Reading the code in this PR, I'm surprised to see that the default value of aws:skipCredentialsValidation before was true... I'm not clear why having this value set to false is failing in AWS, particularly since we use the STS service to get credentials to use in the first place. Is there some specific IAM permission (or some other configuration) that is needed for validation to occur that I'm missing?

christophermaier added a commit to grapl-security/pulumi-buildkite-plugin that referenced this pull request Jun 30, 2022
This is in response to changes that entered into the [5.9.0 release of
`pulumi-aws`](https://github.com/pulumi/pulumi-aws/releases/tag/v5.9.0),
specifically in [this PR](pulumi/pulumi-aws#2004).

Signed-off-by: Christopher Maier <[email protected]>
christophermaier added a commit to grapl-security/pulumi-buildkite-plugin that referenced this pull request Jun 30, 2022
This is in response to changes that entered into the [5.9.0 release of
`pulumi-aws`](https://github.com/pulumi/pulumi-aws/releases/tag/v5.9.0),
specifically in [this PR](pulumi/pulumi-aws#2004).

Signed-off-by: Christopher Maier <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

pulumi-aws 5.7.0 seems unable to validate AWS credentials for AWS Profile only
4 participants