From 21d543c96aa97faa9f5d59d97fa2eb505540aa4c Mon Sep 17 00:00:00 2001 From: mtweeman Date: Tue, 1 Oct 2024 12:10:56 +0200 Subject: [PATCH] Revert "fix: add Atmos commands to Spacelift custom workflow tool (#158)" (#159) This reverts commit 93f52342165c28fec497caf7349d8d29b4781535. --- .spacelift/workflow.yml | 18 +++++++++--------- stacks/catalog/spacelift/admin-stack.yaml | 16 ++++++++-------- stacks/orgs/hs/_defaults.yaml | 18 ++++++++---------- 3 files changed, 25 insertions(+), 27 deletions(-) diff --git a/.spacelift/workflow.yml b/.spacelift/workflow.yml index 60011808..b18b09b5 100644 --- a/.spacelift/workflow.yml +++ b/.spacelift/workflow.yml @@ -1,20 +1,20 @@ # Source: https://docs.spacelift.io/vendors/terraform/workflow-tool # Used to initialize your root module. -init: atmos terraform init -input=false +init: terraform init -input=false # Used to select the correct workspace. Only used for Stacks that are using a custom state # backend, and which have the Workspace setting configured. # # Available template parameters: # - .WorkspaceName - contains the name of the workspace to select. -workspaceSelect: atmos terraform workspace select "{{ .WorkspaceName }}" +workspaceSelect: terraform workspace select "{{ .WorkspaceName }}" # Used to create a new workspace if none with the required name exists. Only used for Stacks # that are using a custom state backend, and which have the Workspace setting configured. # # Available template parameters: # - .WorkspaceName - contains the name of the workspace to select. -workspaceNew: atmos terraform workspace new "{{ .WorkspaceName }}" +workspaceNew: terraform workspace new "{{ .WorkspaceName }}" # Used to generate a plan of the infrastructure changes that will be applied. # @@ -23,25 +23,25 @@ workspaceNew: atmos terraform workspace new "{{ .WorkspaceName }}" # - .Refresh - whether state resources should be refreshed. # - .PlanFileName - the name of the file to store the plan in. # - .Targets - the list of targets to plan. Used during targeted replans. -plan: atmos terraform plan -input=false -lock={{ .Lock }} {{ if not .Refresh }}-refresh=false {{ end }}-out={{ .PlanFileName }} {{ range .Targets }}-target='{{ . }}' {{ end }} +plan: terraform plan -input=false -lock={{ .Lock }} {{ if not .Refresh }}-refresh=false {{ end }}-out={{ .PlanFileName }} {{ range .Targets }}-target='{{ . }}' {{ end }} # Outputs the current state information as JSON. -showState: atmos terraform show -json +showState: terraform show -json # Used to convert a plan file to its JSON representation. # # Available template parameters: # - .PlanFileName - the name of the file containing the plan. -showPlan: atmos terraform show -json "{{ .PlanFileName }}" +showPlan: terraform show -json "{{ .PlanFileName }}" # Used to get the current outputs from the state. -getOutputs: atmos terraform output -json +getOutputs: terraform output -json # Used to apply any changes contained in the specified plan. # # Available template parameters: # - .PlanFileName - the name of the file containing the plan. -apply: atmos terraform apply -auto-approve -input=false "{{ .PlanFileName }}" +apply: terraform apply -auto-approve -input=false "{{ .PlanFileName }}" # Used to tear down any resources as part of deleting a stack. -destroy: atmos terraform destroy -auto-approve -input=false +destroy: terraform destroy -auto-approve -input=false diff --git a/stacks/catalog/spacelift/admin-stack.yaml b/stacks/catalog/spacelift/admin-stack.yaml index 02c9e9ac..933a9c75 100644 --- a/stacks/catalog/spacelift/admin-stack.yaml +++ b/stacks/catalog/spacelift/admin-stack.yaml @@ -8,14 +8,14 @@ components: spacelift: administrative: true autodeploy: true -# before_apply: -# - spacelift-configure-paths -# before_init: -# - spacelift-configure-paths -# - spacelift-write-vars -# - spacelift-tf-workspace -# before_plan: -# - spacelift-configure-paths + before_apply: + - spacelift-configure-paths + before_init: + - spacelift-configure-paths + - spacelift-write-vars + - spacelift-tf-workspace + before_plan: + - spacelift-configure-paths drift_detection_enabled: true drift_detection_reconcile: true drift_detection_schedule: diff --git a/stacks/orgs/hs/_defaults.yaml b/stacks/orgs/hs/_defaults.yaml index 9a9ed38b..1c3d9d72 100644 --- a/stacks/orgs/hs/_defaults.yaml +++ b/stacks/orgs/hs/_defaults.yaml @@ -21,18 +21,16 @@ terraform: settings: spacelift: workspace_enabled: true # enable spacelift by default -# before_apply: -# - spacelift-configure-paths -# before_init: -# - spacelift-configure-paths -# - spacelift-write-varsclear - -# - spacelift-tf-workspace -# before_plan: -# - spacelift-configure-paths + before_apply: + - spacelift-configure-paths + before_init: + - spacelift-configure-paths + - spacelift-write-vars + - spacelift-tf-workspace + before_plan: + - spacelift-configure-paths labels: - pr-comment-triggered -# - nobackend vars: namespace: hs