amazon-ec2-metadata-mock icon indicating copy to clipboard operation
amazon-ec2-metadata-mock copied to clipboard

Optionally support the removal of instances tags within returned metadata

Open purpleclay opened this issue 1 year ago • 2 comments

Describe the feature It would be great if the mock could simulate the optional inclusion of instances tags within the returned metadata. To ensure backwards compatibility, the proposal would be to include a flag for omitting the inclusion of instance tags, --exclude-instance-tags. In doing so, the mock would need to respond in the same way as the real IMDS service by returning a 404 upon any request to the /tags instance category.

Bizarrely if you curl IMDS using the /tags/instance path, you get a 200 and a blank response. So I guess this behaviour will need to be also mimicked.

Is the feature request related to a problem? It is an enhancement to better align the mock with the real IMDS service. It also expands the possible testing use cases

Describe alternatives you've considered Alternative solutions for me would be to use a hybrid approach in my testing, which is cumbersome.

purpleclay avatar Aug 07 '22 09:08 purpleclay

Thanks for bringing this to our attention! We definitely want AEMM to align with IMDS tags behavior.

Would you be open to submitting the PR? I'd be happy to help review and get it merged in a timely manner.

brycahta avatar Aug 11 '22 20:08 brycahta

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. If you want this issue to never become stale, please ask a maintainer to apply the "stalebot-ignore" label.

github-actions[bot] avatar Sep 11 '22 17:09 github-actions[bot]