From 609b722680ded49882756ed642b7506c79582884 Mon Sep 17 00:00:00 2001 From: Sam Tholiya Date: Fri, 14 Feb 2025 21:58:21 +0100 Subject: [PATCH 01/13] fix exit code for each exec command --- pkg/utils/markdown_utils.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/pkg/utils/markdown_utils.go b/pkg/utils/markdown_utils.go index 8b55807a5..ee0ecae1e 100644 --- a/pkg/utils/markdown_utils.go +++ b/pkg/utils/markdown_utils.go @@ -3,8 +3,10 @@ package utils import ( + "errors" "fmt" "os" + "os/exec" "runtime/debug" "github.com/cloudposse/atmos/pkg/schema" @@ -66,6 +68,13 @@ func PrintfErrorMarkdown(format string, a ...interface{}) { func PrintErrorMarkdownAndExit(title string, err error, suggestion string) { PrintErrorMarkdown(title, err, suggestion) + + // Find the executed command's exit code from the error + var exitError *exec.ExitError + if errors.As(err, &exitError) { + os.Exit(exitError.ExitCode()) + } + os.Exit(1) } From a72b78c20011d8d17954ffb6236d98a98f669cc9 Mon Sep 17 00:00:00 2001 From: Sam Tholiya Date: Fri, 14 Feb 2025 22:53:57 +0100 Subject: [PATCH 02/13] add tests --- tests/fixtures/scenarios/exitCode/atmos.yaml | 21 +++++++++++++++++++ .../components/terraform/empty/main.tf | 10 +++++++++ .../components/terraform/empty/variables.tf | 10 +++++++++ .../exitCode/stacks/catalog/station.yaml | 7 +++++++ .../scenarios/exitCode/stacks/deploy/dev.yaml | 11 ++++++++++ tests/test-cases/exec-command.yaml | 16 ++++++++++++++ 6 files changed, 75 insertions(+) create mode 100644 tests/fixtures/scenarios/exitCode/atmos.yaml create mode 100644 tests/fixtures/scenarios/exitCode/components/terraform/empty/main.tf create mode 100644 tests/fixtures/scenarios/exitCode/components/terraform/empty/variables.tf create mode 100644 tests/fixtures/scenarios/exitCode/stacks/catalog/station.yaml create mode 100644 tests/fixtures/scenarios/exitCode/stacks/deploy/dev.yaml create mode 100644 tests/test-cases/exec-command.yaml diff --git a/tests/fixtures/scenarios/exitCode/atmos.yaml b/tests/fixtures/scenarios/exitCode/atmos.yaml new file mode 100644 index 000000000..5456297a0 --- /dev/null +++ b/tests/fixtures/scenarios/exitCode/atmos.yaml @@ -0,0 +1,21 @@ +base_path: "./" + +components: + terraform: + base_path: "components/terraform" + apply_auto_approve: false + deploy_run_init: true + init_run_reconfigure: true + auto_generate_backend_file: false + +stacks: + base_path: "stacks" + included_paths: + - "deploy/**/*" + excluded_paths: + - "**/_defaults.yaml" + name_pattern: "{stage}" + +logs: + level: Info + file: "/dev/stderr" diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/empty/main.tf b/tests/fixtures/scenarios/exitCode/components/terraform/empty/main.tf new file mode 100644 index 000000000..697673354 --- /dev/null +++ b/tests/fixtures/scenarios/exitCode/components/terraform/empty/main.tf @@ -0,0 +1,10 @@ +terraform { + required_version = ">= 0.12" +} + +# Invalid resource block with a missing argument to cause terraform plan to fail +resource "null_resource" "example" { + provisioner "local-exec" { + command = "echo ${var.my_param}" + } +} diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/empty/variables.tf b/tests/fixtures/scenarios/exitCode/components/terraform/empty/variables.tf new file mode 100644 index 000000000..c4d798e2a --- /dev/null +++ b/tests/fixtures/scenarios/exitCode/components/terraform/empty/variables.tf @@ -0,0 +1,10 @@ +variable "my_param" { + description = "A test parameter for the null resource" + type = string + default = "default_value" +} +variable "stage" { + description = "A test parameter for the null resource" + type = string + default = "dev" +} diff --git a/tests/fixtures/scenarios/exitCode/stacks/catalog/station.yaml b/tests/fixtures/scenarios/exitCode/stacks/catalog/station.yaml new file mode 100644 index 000000000..cae6193a6 --- /dev/null +++ b/tests/fixtures/scenarios/exitCode/stacks/catalog/station.yaml @@ -0,0 +1,7 @@ +# yaml-language-server: $schema=https://atmos.tools/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json + +components: + terraform: + station: + metadata: + component: empty diff --git a/tests/fixtures/scenarios/exitCode/stacks/deploy/dev.yaml b/tests/fixtures/scenarios/exitCode/stacks/deploy/dev.yaml new file mode 100644 index 000000000..84cff9d13 --- /dev/null +++ b/tests/fixtures/scenarios/exitCode/stacks/deploy/dev.yaml @@ -0,0 +1,11 @@ +vars: + stage: dev + +import: + - catalog/station + +components: + terraform: + station: + vars: + my_param: "fail" diff --git a/tests/test-cases/exec-command.yaml b/tests/test-cases/exec-command.yaml new file mode 100644 index 000000000..58ac1f685 --- /dev/null +++ b/tests/test-cases/exec-command.yaml @@ -0,0 +1,16 @@ +tests: + - name: atmos exit code should be same as command exit code + enabled: true + description: "Ensure the exit code equals the command exit code" + workdir: "fixtures/scenarios/exitCode" + command: "atmos" + args: + - terraform + - plan + - station + - "-s" + - dev + - "--" + - "-detailed-exitcode" + expect: + exit_code: 2 From a97c72fc3a23e8301df8f8e492197fbc07599a41 Mon Sep 17 00:00:00 2001 From: Sam Tholiya Date: Sat, 15 Feb 2025 12:29:00 +0100 Subject: [PATCH 03/13] updated test cases --- tests/fixtures/scenarios/exitCode/atmos.yaml | 8 ++++---- .../exitCode/components/terraform/empty/variables.tf | 10 ---------- .../terraform/{empty => hook-and-store}/main.tf | 7 ++++++- .../scenarios/exitCode/stacks/catalog/station.yaml | 7 ------- .../scenarios/exitCode/stacks/deploy/dev.yaml | 11 ----------- tests/fixtures/scenarios/exitCode/stacks/stack.yaml | 7 +++++++ tests/test-cases/exec-command.yaml | 4 ++-- 7 files changed, 19 insertions(+), 35 deletions(-) delete mode 100644 tests/fixtures/scenarios/exitCode/components/terraform/empty/variables.tf rename tests/fixtures/scenarios/exitCode/components/terraform/{empty => hook-and-store}/main.tf (60%) delete mode 100644 tests/fixtures/scenarios/exitCode/stacks/catalog/station.yaml delete mode 100644 tests/fixtures/scenarios/exitCode/stacks/deploy/dev.yaml create mode 100644 tests/fixtures/scenarios/exitCode/stacks/stack.yaml diff --git a/tests/fixtures/scenarios/exitCode/atmos.yaml b/tests/fixtures/scenarios/exitCode/atmos.yaml index 5456297a0..bc547b097 100644 --- a/tests/fixtures/scenarios/exitCode/atmos.yaml +++ b/tests/fixtures/scenarios/exitCode/atmos.yaml @@ -7,15 +7,15 @@ components: deploy_run_init: true init_run_reconfigure: true auto_generate_backend_file: false - + stacks: - base_path: "stacks" + base_path: "." included_paths: - - "deploy/**/*" + - "stacks/**/*" excluded_paths: - "**/_defaults.yaml" name_pattern: "{stage}" logs: - level: Info file: "/dev/stderr" + level: Info diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/empty/variables.tf b/tests/fixtures/scenarios/exitCode/components/terraform/empty/variables.tf deleted file mode 100644 index c4d798e2a..000000000 --- a/tests/fixtures/scenarios/exitCode/components/terraform/empty/variables.tf +++ /dev/null @@ -1,10 +0,0 @@ -variable "my_param" { - description = "A test parameter for the null resource" - type = string - default = "default_value" -} -variable "stage" { - description = "A test parameter for the null resource" - type = string - default = "dev" -} diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/empty/main.tf b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf similarity index 60% rename from tests/fixtures/scenarios/exitCode/components/terraform/empty/main.tf rename to tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf index 697673354..dafc6d717 100644 --- a/tests/fixtures/scenarios/exitCode/components/terraform/empty/main.tf +++ b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf @@ -1,3 +1,8 @@ +variable "stage" { + description = "Stage where it will be deployed" + type = string +} + terraform { required_version = ">= 0.12" } @@ -5,6 +10,6 @@ terraform { # Invalid resource block with a missing argument to cause terraform plan to fail resource "null_resource" "example" { provisioner "local-exec" { - command = "echo ${var.my_param}" + command = "echo ${var.stage}" } } diff --git a/tests/fixtures/scenarios/exitCode/stacks/catalog/station.yaml b/tests/fixtures/scenarios/exitCode/stacks/catalog/station.yaml deleted file mode 100644 index cae6193a6..000000000 --- a/tests/fixtures/scenarios/exitCode/stacks/catalog/station.yaml +++ /dev/null @@ -1,7 +0,0 @@ -# yaml-language-server: $schema=https://atmos.tools/schemas/atmos/atmos-manifest/1.0/atmos-manifest.json - -components: - terraform: - station: - metadata: - component: empty diff --git a/tests/fixtures/scenarios/exitCode/stacks/deploy/dev.yaml b/tests/fixtures/scenarios/exitCode/stacks/deploy/dev.yaml deleted file mode 100644 index 84cff9d13..000000000 --- a/tests/fixtures/scenarios/exitCode/stacks/deploy/dev.yaml +++ /dev/null @@ -1,11 +0,0 @@ -vars: - stage: dev - -import: - - catalog/station - -components: - terraform: - station: - vars: - my_param: "fail" diff --git a/tests/fixtures/scenarios/exitCode/stacks/stack.yaml b/tests/fixtures/scenarios/exitCode/stacks/stack.yaml new file mode 100644 index 000000000..66ad4f42b --- /dev/null +++ b/tests/fixtures/scenarios/exitCode/stacks/stack.yaml @@ -0,0 +1,7 @@ +components: + terraform: + component1: + metadata: + component: hook-and-store + vars: + stage: test diff --git a/tests/test-cases/exec-command.yaml b/tests/test-cases/exec-command.yaml index 58ac1f685..cbdf4bfbe 100644 --- a/tests/test-cases/exec-command.yaml +++ b/tests/test-cases/exec-command.yaml @@ -7,9 +7,9 @@ tests: args: - terraform - plan - - station + - component1 - "-s" - - dev + - test - "--" - "-detailed-exitcode" expect: From 34d9a7306588a3c1633007c5b3df615a9f7fab00 Mon Sep 17 00:00:00 2001 From: Sam Tholiya Date: Sat, 15 Feb 2025 21:17:39 +0100 Subject: [PATCH 04/13] add more test cases for exit codes --- .../terraform/hook-and-store/main.tf | 33 +++++++++++++++---- tests/test-cases/exec-command.yaml | 32 +++++++++++++++++- 2 files changed, 57 insertions(+), 8 deletions(-) diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf index dafc6d717..1545088da 100644 --- a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf +++ b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf @@ -1,15 +1,34 @@ +terraform { + required_providers { + null = { + source = "hashicorp/null" + version = "~> 3.0" + } + } +} + variable "stage" { - description = "Stage where it will be deployed" + description = "The file used as a flag to indicate that Terraform has already been applied." type = string + default = "/tmp/terraform_once" } -terraform { - required_version = ">= 0.12" -} +resource "null_resource" "run_once" { + # Use a changing trigger to force the provisioner to run every time. + triggers = { + always_run = timestamp() + } -# Invalid resource block with a missing argument to cause terraform plan to fail -resource "null_resource" "example" { provisioner "local-exec" { - command = "echo ${var.stage}" + interpreter = ["/bin/bash", "-c"] + command = <<-EOT + if [ -f "${var.stage}" ]; then + echo "Flag file exists. Exiting with error as intended." + exit 1 + else + echo "Flag file not found. Creating flag file." + touch "${var.stage}" + fi + EOT } } diff --git a/tests/test-cases/exec-command.yaml b/tests/test-cases/exec-command.yaml index cbdf4bfbe..4ff377089 100644 --- a/tests/test-cases/exec-command.yaml +++ b/tests/test-cases/exec-command.yaml @@ -1,5 +1,5 @@ tests: - - name: atmos exit code should be same as command exit code + - name: atmos exit code should be same as command exit code (2) enabled: true description: "Ensure the exit code equals the command exit code" workdir: "fixtures/scenarios/exitCode" @@ -14,3 +14,33 @@ tests: - "-detailed-exitcode" expect: exit_code: 2 + - name: atmos exit code should be same as command exit code (0) + enabled: true + description: "Ensure the exit code equals the command exit code should be 0 for terraform apply" + workdir: "fixtures/scenarios/exitCode" + command: "atmos" + args: + - terraform + - apply + - component1 + - "-s" + - test + - "--" + - "-auto-approve" + expect: + exit_code: 0 + - name: atmos exit code should be same as command exit code (1) + enabled: true + description: "Ensure the exit code equals the command exit code should be 0 for terraform apply" + workdir: "fixtures/scenarios/exitCode" + command: "atmos" + args: + - terraform + - apply + - component1 + - "-s" + - test + - "--" + - "-auto-approve" + expect: + exit_code: 1 From 2b0354d9624da7b8449539936809ab13fdb51cb1 Mon Sep 17 00:00:00 2001 From: Sam Tholiya Date: Sat, 15 Feb 2025 21:21:15 +0100 Subject: [PATCH 05/13] Update tests/test-cases/exec-command.yaml Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- tests/test-cases/exec-command.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test-cases/exec-command.yaml b/tests/test-cases/exec-command.yaml index 4ff377089..0c1872663 100644 --- a/tests/test-cases/exec-command.yaml +++ b/tests/test-cases/exec-command.yaml @@ -31,7 +31,7 @@ tests: exit_code: 0 - name: atmos exit code should be same as command exit code (1) enabled: true - description: "Ensure the exit code equals the command exit code should be 0 for terraform apply" + description: "Ensure the exit code equals the command exit code for a failing terraform apply (expected to be 1)" workdir: "fixtures/scenarios/exitCode" command: "atmos" args: From 4296c2b84dcb23a9778e0b0dc475e57bf4249c7d Mon Sep 17 00:00:00 2001 From: Sam Tholiya Date: Sat, 15 Feb 2025 21:57:13 +0100 Subject: [PATCH 06/13] Update tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf Co-authored-by: Andriy Knysh --- .../exitCode/components/terraform/hook-and-store/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf index 1545088da..88251b4f9 100644 --- a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf +++ b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf @@ -8,7 +8,7 @@ terraform { } variable "stage" { - description = "The file used as a flag to indicate that Terraform has already been applied." + description = "Stage. Used to define an Atmos stack." type = string default = "/tmp/terraform_once" } From a8977496686c45f8c549dda77db96f488c0ed5cc Mon Sep 17 00:00:00 2001 From: Sam Tholiya Date: Sat, 15 Feb 2025 21:57:27 +0100 Subject: [PATCH 07/13] Update tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf Co-authored-by: Andriy Knysh --- .../exitCode/components/terraform/hook-and-store/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf index 88251b4f9..7ec374906 100644 --- a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf +++ b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf @@ -10,7 +10,7 @@ terraform { variable "stage" { description = "Stage. Used to define an Atmos stack." type = string - default = "/tmp/terraform_once" + default = "test" } resource "null_resource" "run_once" { From a10719aea0798b10b67048ba14a0015fb5872b34 Mon Sep 17 00:00:00 2001 From: Sam Tholiya Date: Sun, 16 Feb 2025 14:06:46 +0100 Subject: [PATCH 08/13] updated test cases --- .../components/terraform/hook-and-store/main.tf | 15 ++++----------- tests/test-cases/exec-command.yaml | 9 +++++++-- 2 files changed, 11 insertions(+), 13 deletions(-) diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf index 7ec374906..723aa896e 100644 --- a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf +++ b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf @@ -14,21 +14,14 @@ variable "stage" { } resource "null_resource" "run_once" { - # Use a changing trigger to force the provisioner to run every time. + # Force the provisioner to run on every apply. triggers = { always_run = timestamp() } provisioner "local-exec" { - interpreter = ["/bin/bash", "-c"] - command = <<-EOT - if [ -f "${var.stage}" ]; then - echo "Flag file exists. Exiting with error as intended." - exit 1 - else - echo "Flag file not found. Creating flag file." - touch "${var.stage}" - fi - EOT + command = < Date: Mon, 17 Feb 2025 21:04:49 +0100 Subject: [PATCH 09/13] update test --- .../components/terraform/hook-and-store/main.tf | 14 +++++++++----- .../fixtures/scenarios/exitCode/stacks/stack.yaml | 6 ++++++ tests/test-cases/exec-command.yaml | 2 +- 3 files changed, 16 insertions(+), 6 deletions(-) diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf index 723aa896e..bec4c3d0a 100644 --- a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf +++ b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf @@ -13,15 +13,19 @@ variable "stage" { default = "test" } -resource "null_resource" "run_once" { - # Force the provisioner to run on every apply. +variable "exit_code" { + description = "Stage. Used to define an Atmos stack." + type = number + default = 0 +} + + +resource "null_resource" "fail_on_second_apply" { triggers = { always_run = timestamp() } provisioner "local-exec" { - command = < Date: Mon, 17 Feb 2025 21:09:48 +0100 Subject: [PATCH 10/13] Update tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf Co-authored-by: coderabbitai[bot] <136622811+coderabbitai[bot]@users.noreply.github.com> --- .../exitCode/components/terraform/hook-and-store/main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf index bec4c3d0a..e279f9e9e 100644 --- a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf +++ b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf @@ -14,7 +14,7 @@ variable "stage" { } variable "exit_code" { - description = "Stage. Used to define an Atmos stack." + description = "Exit code used to simulate the command's exit status." type = number default = 0 } From 6f6b2369467bcd6df79e8c0733f36702b933cee8 Mon Sep 17 00:00:00 2001 From: Sam Tholiya Date: Mon, 17 Feb 2025 21:04:49 +0100 Subject: [PATCH 11/13] update test --- .../components/terraform/hook-and-store/main.tf | 14 +++++++++----- .../fixtures/scenarios/exitCode/stacks/stack.yaml | 6 ++++++ tests/test-cases/exec-command.yaml | 12 ++++++------ 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf index 723aa896e..bec4c3d0a 100644 --- a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf +++ b/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf @@ -13,15 +13,19 @@ variable "stage" { default = "test" } -resource "null_resource" "run_once" { - # Force the provisioner to run on every apply. +variable "exit_code" { + description = "Stage. Used to define an Atmos stack." + type = number + default = 0 +} + + +resource "null_resource" "fail_on_second_apply" { triggers = { always_run = timestamp() } provisioner "local-exec" { - command = < Date: Wed, 19 Feb 2025 07:01:56 +0100 Subject: [PATCH 12/13] update the folder structure --- .../terraform/{hook-and-store => exit-code}/main.tf | 0 tests/fixtures/scenarios/exitCode/stacks/stack.yaml | 4 ++-- 2 files changed, 2 insertions(+), 2 deletions(-) rename tests/fixtures/scenarios/exitCode/components/terraform/{hook-and-store => exit-code}/main.tf (100%) diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf b/tests/fixtures/scenarios/exitCode/components/terraform/exit-code/main.tf similarity index 100% rename from tests/fixtures/scenarios/exitCode/components/terraform/hook-and-store/main.tf rename to tests/fixtures/scenarios/exitCode/components/terraform/exit-code/main.tf diff --git a/tests/fixtures/scenarios/exitCode/stacks/stack.yaml b/tests/fixtures/scenarios/exitCode/stacks/stack.yaml index 158f96fce..7ac2434e6 100644 --- a/tests/fixtures/scenarios/exitCode/stacks/stack.yaml +++ b/tests/fixtures/scenarios/exitCode/stacks/stack.yaml @@ -2,12 +2,12 @@ components: terraform: component1: metadata: - component: hook-and-store + component: exit-code vars: stage: test component2: metadata: - component: hook-and-store + component: exit-code vars: stage: test exit_code: 1 \ No newline at end of file From 8f9d431236253ffdf2c3c57e53bf9af13a695d64 Mon Sep 17 00:00:00 2001 From: Sam Tholiya Date: Wed, 19 Feb 2025 21:12:35 +0100 Subject: [PATCH 13/13] Move to exit-code --- .../exitCode => }/components/terraform/exit-code/main.tf | 0 tests/fixtures/scenarios/exitCode/atmos.yaml | 2 +- 2 files changed, 1 insertion(+), 1 deletion(-) rename tests/fixtures/{scenarios/exitCode => }/components/terraform/exit-code/main.tf (100%) diff --git a/tests/fixtures/scenarios/exitCode/components/terraform/exit-code/main.tf b/tests/fixtures/components/terraform/exit-code/main.tf similarity index 100% rename from tests/fixtures/scenarios/exitCode/components/terraform/exit-code/main.tf rename to tests/fixtures/components/terraform/exit-code/main.tf diff --git a/tests/fixtures/scenarios/exitCode/atmos.yaml b/tests/fixtures/scenarios/exitCode/atmos.yaml index bc547b097..3cc0786c0 100644 --- a/tests/fixtures/scenarios/exitCode/atmos.yaml +++ b/tests/fixtures/scenarios/exitCode/atmos.yaml @@ -2,7 +2,7 @@ base_path: "./" components: terraform: - base_path: "components/terraform" + base_path: "../../components/terraform" apply_auto_approve: false deploy_run_init: true init_run_reconfigure: true