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
289 stars 553 forks source link

Terminating LifeCycle Hook Script Execution #224

Closed vesubramanian closed 1 year ago

vesubramanian commented 1 year ago

This may not qualify as a bug. I have an Auto Scaling Group which has 2 or 3 EC2 instances. This setup is provisioned using Terraform.

When one or more instances become unhealthy & get terminated, new instances are provisioned in their place. However, these instances get new EBS Volumes. But I want to reuse / attach the EBS volumes attached earlier to the terminated or unhealthy EC2 instances.

I am not sure how to achieve this using Lifecycle Hooks (Terminating & Launching) in Terraform. I don't want to create additional Lambda or something for achieving this. I couldn't find any documentation or links or blogs or articles/forums/posts to achieve this using Terraform. Please help. The notification metadata is not very clear. Will it work only with SNS & Lambda?

github-actions[bot] commented 1 year ago

This issue has been automatically marked as stale because it has been open 30 days with no activity. Remove stale label or comment or this issue will be closed in 10 days

github-actions[bot] commented 1 year ago

This issue was automatically closed because of stale in 10 days

github-actions[bot] commented 1 year ago

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.