From 44bd5f6e7426a67960845ec42ab8db76301e35bd Mon Sep 17 00:00:00 2001 From: Veronika Gnilitska Date: Tue, 5 Mar 2024 21:50:02 +0200 Subject: [PATCH] chore: add back name to ignore_changes rule --- main.tf | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/main.tf b/main.tf index 9b8d26e..fd57d60 100644 --- a/main.tf +++ b/main.tf @@ -14,4 +14,10 @@ resource "datadog_user" "users" { name = each.value.name roles = [for role in each.value.roles : local.roles[role]] send_user_invitation = each.value.send_user_invitation + + # Avoids unnecessary resource recreation/drift when users alter their names. + # Such changes are non-critical and can be safely ignored by Terraform. + lifecycle { + ignore_changes = [name] + } }