diff --git a/bundle/deploy/terraform/apply.go b/bundle/deploy/terraform/apply.go index 329f129ef..194c13e8b 100644 --- a/bundle/deploy/terraform/apply.go +++ b/bundle/deploy/terraform/apply.go @@ -72,9 +72,14 @@ func (w *apply) Apply(ctx context.Context, b *bundle.Bundle) ([]bundle.Mutator, return nil, fmt.Errorf("no plan found") } - cmdio.LogString(ctx, "\nStarting resource deployment") + if w.goal == ApplyDeploy { + cmdio.LogString(ctx, "\nStarting resource deployment") + } + if w.goal == ApplyDestroy { + cmdio.LogString(ctx, "\nStarting resource destruction") + } - // Apply terraform according to the computed destroy plan + // Apply terraform according to the computed plan err = tf.Apply(ctx, tfexec.DirOrPlan(b.Plan.Path)) if err != nil { return nil, fmt.Errorf("terraform apply: %w", err) diff --git a/cmd/bundle/destroy.go b/cmd/bundle/destroy.go index 606c8762b..d7e8bc355 100644 --- a/cmd/bundle/destroy.go +++ b/cmd/bundle/destroy.go @@ -13,8 +13,6 @@ import ( "golang.org/x/term" ) -// TODO: note possibility of aliases - var destroyCmd = &cobra.Command{ Use: "destroy", Short: "Destroy deployed bundle resources",