You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The end goal is to allow us to programmatically override a list of attributes that should be ignored.
For instance, an AutoScaling Group is defined with a Launch Configuration that ignores changes to the image_id attribute. Later, during a proper maintenance window, we want to tell the aws_launch_configuration resource that the ignore_changes list should be empty (so it picks up the image_id change).
Attempted Solutions
variable"ignore_ami_changes" {
description="If AMI changes should be ignored"type=booldefault=true
}
resource"aws_launch_configuration""default" {
lifecycle {
ignore_changes=var.ignore_ami_changes? [image_id] : []
}
}
The error:
Error: Invalid expression
on main.tf line 14, in resource "aws_launch_configuration" "default":
14: ignore_changes = local.ignore_ami_changes
A static list expression is required.
Proposal
Allow lifecycle attributes to accept variables (interpolation)
As you saw, this use-case is already covered by #3116, so we're going to close this one. As noted in the other one, it was locked because all of the required information about the problem to be solved has already been gathered and so no further discussion is necessary.
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.
ghost
locked and limited conversation to collaborators
Sep 21, 2019
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Use-cases
The end goal is to allow us to programmatically override a list of attributes that should be ignored.
For instance, an AutoScaling Group is defined with a Launch Configuration that ignores changes to the image_id attribute. Later, during a proper maintenance window, we want to tell the aws_launch_configuration resource that the ignore_changes list should be empty (so it picks up the image_id change).
Attempted Solutions
The error:
Proposal
Allow lifecycle attributes to accept variables (interpolation)
References
The text was updated successfully, but these errors were encountered: