Hi
I’m new on Terraform but few experience in coding so I’m always looking to keep my code DRY.
I searched solution but not found solution (maybe not using right keyword as I’m new on Terraform)
I’m deploying several ressources on Azure and several policies are running to check and change a list specific tags. So I used lifecycle / ignore_changes
It’s work perfectly but i have to copy and paste a lot of time the same block of code for each ressources
lifecycle {
ignore_changes = [
tags["Tag_1"],
tags["Tag_2"],
tags["Tag_3"],
tags["Tag_4"],
tags["Tag_5"],
tags["Tag_6"],
tags["Tag_6"]
]
}
I was looking for an elegant way to define once this list of tags and reduce the size of ignore_change block for each ressources.
My constraint is to be able for few ressources to add others ignore_change (certainly with a merge ?)
Thanks in advance for your advice