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

Do not skip metadata API check by default #3960

Merged
merged 14 commits into from
May 22, 2024
Merged

Conversation

t0yv0
Copy link
Member

@t0yv0 t0yv0 commented May 17, 2024

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:

Copy link

Does the PR have any schema changes?

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

Maintainer note: consult the runbook for dealing with any breaking changes.

@t0yv0
Copy link
Member Author

t0yv0 commented May 17, 2024

I've got the newly written test pass locally but it unfortunately is tripping up some other tests in the suite, will need another pass. Also as a side note in my VA -> us-east-1 setup I'm only getting 2MB/s from CopyFile and only slightly more up to 2.5MB/s from uploading to S3, this is a bit disappointing to upload the 700MB aws provider (yes we need to slim this down):

  helper-bucket:
    type: aws:s3:Bucket

  provider-obj:
    type: aws:s3:BucketObjectv2
    properties:
      bucket: ${helper-bucket.bucket}
      source:
        fn::fileAsset: ./pulumi-resource-aws
      etag:
        fn::invoke:
          function: std:filemd5
          arguments:
            input: ./pulumi-resource-aws
          return: result

@t0yv0
Copy link
Member Author

t0yv0 commented May 20, 2024

Disregard the above comment, had to troubleshoot and fix local home network

@t0yv0 t0yv0 marked this pull request as ready for review May 21, 2024 21:37
@t0yv0
Copy link
Member Author

t0yv0 commented May 21, 2024

I've only tested IMDS(v2) not IMDS(v1) but I have no reasons to believe that reverting to defaults wouldn't fix that as well.

@t0yv0 t0yv0 merged commit 5a342a1 into master May 22, 2024
23 checks passed
@t0yv0 t0yv0 deleted the t0yv0/skip-metadata-api-check branch May 22, 2024 18:17
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.

Reconsider the default aws:skipMetadataCheck setting
2 participants