From ac8e98dc39482f32e8de4c19811a0ce622e75fc6 Mon Sep 17 00:00:00 2001 From: Espen Albert Date: Fri, 7 Feb 2025 07:16:57 +0000 Subject: [PATCH] fix: Adds "state_name" to keepUnknown list to prevent copying volatile attributes from state --- internal/service/advancedclustertpf/plan_modifier.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/service/advancedclustertpf/plan_modifier.go b/internal/service/advancedclustertpf/plan_modifier.go index 771befc0eb..a0caa70f21 100644 --- a/internal/service/advancedclustertpf/plan_modifier.go +++ b/internal/service/advancedclustertpf/plan_modifier.go @@ -22,7 +22,7 @@ func useStateForUnknowns(ctx context.Context, diags *diag.Diagnostics, plan, sta } func determineKeepUnknowns(upgradeRequest *admin.LegacyAtlasTenantClusterUpgradeRequest, patchReq *admin.ClusterDescription20240805) []string { - keepUnknown := []string{"connection_strings"} // ConnectionStrings is volatile and should not be copied from state + keepUnknown := []string{"connection_strings", "state_name"} // Volatile attributes, should not be copied from state if upgradeRequest != nil { // TenantUpgrade changes a few root level fields that are normally ok to use state values for keepUnknown = append(keepUnknown, "disk_size_gb", "cluster_id", "replication_specs", "backup_enabled", "create_date")