File tree Expand file tree Collapse file tree 1 file changed +13
-10
lines changed
Expand file tree Collapse file tree 1 file changed +13
-10
lines changed Original file line number Diff line number Diff line change @@ -82,16 +82,19 @@ Typical use cases:
8282 return root .ErrAlreadyPrinted
8383 }
8484
85- bundle .ApplySeqContext (ctx , b ,
86- // We need to resolve artifact variable (how we do it in build phase)
87- // because some of the to-be-destroyed resource might use this variable.
88- // Not resolving might lead to terraform "Reference to undeclared resource" error
89- mutator .ResolveVariableReferencesWithoutResources ("artifacts" ),
90- mutator .ResolveVariableReferencesOnlyResources ("artifacts" ),
91- )
92-
93- if logdiag .HasError (ctx ) {
94- return root .ErrAlreadyPrinted
85+ // not applicable to direct deployment, we don't need resource configuration there
86+ if ! b .DirectDeployment {
87+ bundle .ApplySeqContext (ctx , b ,
88+ // We need to resolve artifact variable (how we do it in build phase)
89+ // because some of the to-be-destroyed resource might use this variable.
90+ // Not resolving might lead to terraform "Reference to undeclared resource" error
91+ mutator .ResolveVariableReferencesWithoutResources ("artifacts" ),
92+ mutator .ResolveVariableReferencesOnlyResources ("artifacts" ),
93+ )
94+
95+ if logdiag .HasError (ctx ) {
96+ return root .ErrAlreadyPrinted
97+ }
9598 }
9699
97100 phases .Destroy (ctx , b )
You can’t perform that action at this time.
0 commit comments