terraform-aws-modules / terraform-aws-autoscaling

Terraform module to create AWS Auto Scaling resources πŸ‡ΊπŸ‡¦
https://registry.terraform.io/modules/terraform-aws-modules/autoscaling/aws
Apache License 2.0
292 stars 558 forks source link

Support to load AMI from SSM public parameter #259

Closed Baachi closed 6 months ago

Baachi commented 6 months ago

Description

This MR introduces a new variable ami_ssm_parameter, so an image_id can be used from the AWS SSM parameter.

Motivation and Context

Hardcode an AMI ID is really pain to maintain, since you first need to find the AMI id and you'll need to keep them up to date. The only way to do avoid this, is to filter the latest AMI id through an data resource.

Breaking Changes

N/A

How Has This Been Tested?

bryantbiggs commented 6 months ago

thank you but this is already supported without any code changes 😬 https://docs.aws.amazon.com/autoscaling/ec2/userguide/using-systems-manager-parameters.html

Baachi commented 6 months ago

Uh didn't know that! Thanks for the fast feedback.

bryantbiggs commented 6 months ago

here is what it looks like in use https://github.com/clowdhaus/eks-reference-architecture/blob/f8e64f2aeebd1ade57c8655baebe0edfadc6fee6/does-not-work/eks-mng-ssm-param/eks.tf#L29

Note: it does not work on EKS currently (managed nodegroup - it does work for self-managed nodegroup)

github-actions[bot] commented 5 months ago

I'm going to lock this pull request 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 related to this change, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.