From 99874a2b8ff5541d2813116c84dc58eadb39e8c0 Mon Sep 17 00:00:00 2001 From: Andrew Nester Date: Tue, 5 Nov 2024 21:13:28 +0100 Subject: [PATCH] add a comment --- cmd/bundle/destroy.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/bundle/destroy.go b/cmd/bundle/destroy.go index f0b75f97c..711abbcd7 100644 --- a/cmd/bundle/destroy.go +++ b/cmd/bundle/destroy.go @@ -63,6 +63,9 @@ func newDestroyCommand() *cobra.Command { diags = bundle.Apply(ctx, b, bundle.Seq( phases.Initialize(), + // We need to resolve artifact variable (how we do it in build phase) + // because some of the to-be-destroyed resource might use this variable. + // Not resolving might lead to terraform "Reference to undeclared resource" error mutator.ResolveVariableReferences( "artifacts", ),