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

[Enhancement]: Support enabling IMDSv2 by default for AMIs #27083

Closed
christophetd opened this issue Oct 4, 2022 · 4 comments · Fixed by #27084
Closed

[Enhancement]: Support enabling IMDSv2 by default for AMIs #27083

christophetd opened this issue Oct 4, 2022 · 4 comments · Fixed by #27084
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Milestone

Comments

@christophetd
Copy link
Contributor

Description

AWS Just introduced the capability to enable IMDSv2 when an EC2 instance is created from specific AMIs:
https://aws.amazon.com/about-aws/whats-new/2022/10/amazon-machine-images-support-instance-metadata-service-version-2-default/

Affected Resource(s) and/or Data Source(s)

Potential Terraform Configuration

resource "aws_ami" "example" {
  name                = "terraform-example"
  virtualization_type = "hvm"
  root_device_name    = "/dev/xvda"
  imds_support        = "v2.0"

  ebs_block_device {
    device_name = "/dev/xvda"
    snapshot_id = "snap-xxxxxxxx"
    volume_size = 8
  }
}

References

https://docs.aws.amazon.com/AWSEC2/latest/APIReference/API_RegisterImage.html#API_RegisterImage_RequestParameters (see parameter ImdsSupport)

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/configuring-IMDS-new-instances.html#configure-IMDS-new-instances-ami-configuration

Would you like to implement a fix?

Yes

@christophetd christophetd added enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. labels Oct 4, 2022
@github-actions
Copy link

github-actions bot commented Oct 4, 2022

Community Note

Voting for Prioritization

  • Please vote on this issue by adding a 👍 reaction to the original post to help the community and maintainers prioritize this request.
  • Please see our prioritization guide for information on how we prioritize.
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request.

Volunteering to Work on This Issue

  • If you are interested in working on this issue, please leave a comment.
  • If this would be your first contribution, please review the contribution guide.

@github-actions github-actions bot added the service/ec2 Issues and PRs that pertain to the ec2 service. label Oct 4, 2022
@ewbankkit ewbankkit removed the needs-triage Waiting for first response or review from a maintainer. label Oct 4, 2022
@ewbankkit
Copy link
Contributor

Requires AWS SDK for Go v1.44.110: #27080.

christophetd added a commit to christophetd/terraform-provider-aws that referenced this issue Oct 4, 2022
@github-actions github-actions bot added this to the v4.34.0 milestone Oct 4, 2022
@github-actions
Copy link

github-actions bot commented Oct 6, 2022

This functionality has been released in v4.34.0 of the Terraform AWS Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement Requests to existing resources that expand the functionality or scope. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
2 participants