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]: aws_instance resource documentation should mention the option to use "resolve:ssm:/aws/service/ami-amazon-linux-latest/" as ami parameter #39592

Open
timecast opened this issue Oct 4, 2024 · 1 comment
Labels
documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service.

Comments

@timecast
Copy link

timecast commented Oct 4, 2024

Description

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html
describes that this works too:

resource "aws_instance" "example" {
ami = "resolve:ssm:/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2"
instance_type = "t2.micro"
subnet_id = aws_subnet.example.id
}

it's probably the most easy way to use a "latest" image

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

resource aws_instance

Potential Terraform Configuration

resource "aws_instance" "example" {
  ami           = "resolve:ssm:/aws/service/ami-amazon-linux-latest/amzn2-ami-hvm-x86_64-gp2"
  instance_type = "t2.micro"
  subnet_id     = aws_subnet.example.id
}

References

https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/finding-an-ami.html

Would you like to implement a fix?

None

@timecast timecast added the enhancement Requests to existing resources that expand the functionality or scope. label Oct 4, 2024
@github-actions github-actions bot added the service/ec2 Issues and PRs that pertain to the ec2 service. label Oct 4, 2024
Copy link

github-actions bot commented Oct 4, 2024

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 needs-triage Waiting for first response or review from a maintainer. label Oct 4, 2024
@justinretzolk justinretzolk added documentation Introduces or discusses updates to documentation. and removed enhancement Requests to existing resources that expand the functionality or scope. needs-triage Waiting for first response or review from a maintainer. labels Oct 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Introduces or discusses updates to documentation. service/ec2 Issues and PRs that pertain to the ec2 service.
Projects
None yet
Development

No branches or pull requests

2 participants