awsdocs / elastic-beanstalk-samples

This repository contains code and configuration samples (e.g. .ebextensions) for AWS Elastic Beanstalk.
Apache License 2.0
1.22k stars 889 forks source link

Support IMDSv2 in tag-volume.config #167

Closed hayd closed 3 months ago

hayd commented 1 year ago

Issue #, if available:

AWS is moving towards a preference of IMDSv2. I suspect it's easy to check that box, and not support IMDSv1, and get a cryptic/deployment failure without an output reason.

Description of changes:

This passes a token inline to each metadata curl call so as to support IMDSv2.

Obviously this could be written with a single token, but putting it inline is a straightforward and testable single-line way...

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Note: I am the original author of tag-volume.config. https://github.com/awsdocs/elastic-beanstalk-samples/pull/152