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

Terraform Destroy : Dependency between ASG-->CWEvent-->Lambda #913

Closed
hashibot opened this issue Jun 19, 2017 · 2 comments
Closed

Terraform Destroy : Dependency between ASG-->CWEvent-->Lambda #913

hashibot opened this issue Jun 19, 2017 · 2 comments
Labels
question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. service/autoscaling Issues and PRs that pertain to the autoscaling service. service/lambda Issues and PRs that pertain to the lambda service.

Comments

@hashibot
Copy link

This issue was originally opened by @rashcuva as hashicorp/terraform#15320. It was migrated here as part of the provider split. The original body of the issue is below.


Team,

I have created a Lambda function to perform insert and delete whenever ASG scales out or scales-in.
The Lambda updates the tags so that all instances are unique and also adds a unique entry in the route 53 table.
ASG events triggers CW Event(s) which in turn triggers Lambda.

When I destroy my environment using "Terraform Destroy", my CW event rule gets deleted much faster than ASG group. Even if ASG alerts Cloudwatch, the event rule is already deleted by then. Hence my Lambda to delete Route53 never gets triggered.

How do I add some kind of dependency here to let Lambda trigger before "destroy is complete"?
I have tried my bits with hooks and some adhoc scripting but cant make it work.

Could you please guide in the right direction.

PS : I know it is not an issue but am not able to get much help on this otherwise.

@hashibot hashibot added the question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. label Jun 19, 2017
@bflad bflad added service/lambda Issues and PRs that pertain to the lambda service. service/cloudwatchevents service/autoscaling Issues and PRs that pertain to the autoscaling service. labels Jan 28, 2018
@tracypholmes
Copy link
Contributor

Thank you for using Terraform and for opening up this question! Issues on GitHub are intended to be related to bugs or feature requests with the provider codebase. Please use https://discuss.hashicorp.com/c/terraform-core for community discussions, and questions around Terraform.

If you believe that your issue was miscategorized as a question or closed in error, please create a new issue using one of the following provided templates: bug report or feature request. Please make sure to provide us with the appropriate information so we can best determine how to assist with the given issue.

@ghost
Copy link

ghost commented Nov 3, 2019

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 feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 3, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
question A question about existing functionality; most questions are re-routed to discuss.hashicorp.com. service/autoscaling Issues and PRs that pertain to the autoscaling service. service/lambda Issues and PRs that pertain to the lambda service.
Projects
None yet
Development

No branches or pull requests

3 participants