From 7bd0021cb9930155ec57f4eca901dea3c515e53b Mon Sep 17 00:00:00 2001 From: Mickael Stanislas Date: Mon, 2 Oct 2023 09:35:13 +0200 Subject: [PATCH] fix: add custom requireReplace in doc generated (#54) --- schema.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/schema.go b/schema.go index bc85365..f092db7 100644 --- a/schema.go +++ b/schema.go @@ -219,6 +219,11 @@ func updatePlanModifierDescription[D planmodifier.Describer](ctx context.Context case requireReplace: description = addToDescription(forceNewDesc, description) + // Require replace with custom description + if !strings.Contains(toAdd, "Terraform will destroy and recreate the resource") { + description = addToDescription(description, toAdd) + } + case useStateForUnknown: continue