Hello,
what is the right way to ignore changes in the dynamic block?
A simplified code:
resource "aws_instance" "this" {
lifecycle {
ignore_changes = [ **instance_market_options[0].**spot_options.max_price ]
}
....
dynamic instance_market_options {
for_each = [ ... ]
content {
market_type = "spot"
spot_options {
...
max_price = instance_market_options.value
}
}
}
tags = {}
...
}
In this particular case, there is only one list member, and as such, i can hard code instance_market_options[0] . But how should i apply “ignore” to all members of the list with multiple members in it?
Thank you.
AZ
P.S. I found a similar question, but not sure if it was answered.