Skip to content

Conversation

@sachin-kumar10
Copy link

@sachin-kumar10 sachin-kumar10 commented Jul 17, 2025

Description

Motivation and Context

Many users wish to prevent accidental destruction of their Application Load Balancers, especially when load balancers are shared or provisioned for longer-lived environments (e.g., shared Route53 records or multi-app balancers). I found this useful when creating feature branch environment where environments are short lived and often destroyed using terraform destroy but we don't want to destroy the ALBs as they are shared across applications and feature branches. There is an option to prevent deletion of ALB by setting enable_deletion_protection = true but that fails the terraform destroy command.

Terraform’s lifecycle block supports prevent_destroy, but the current module does not expose this as an option.

Breaking Changes

No

How Has This Been Tested?

  • I have updated at least one of the examples/* to demonstrate and validate my change(s)
  • [ - ] I have tested and validated these changes using one or more of the provided examples/* projects
  • I have executed pre-commit run -a on my pull request

@bryantbiggs
Copy link
Member

you cannot use variables within a lifecycle block, and this change is the opposite of what most users expect. therefore we cannot support this change

@github-actions
Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 17, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants