From ab4eab5d366a1f67e1aa71e6b7174d9d224ac080 Mon Sep 17 00:00:00 2001 From: DeveloperDurp Date: Sun, 6 Aug 2023 21:50:01 +0000 Subject: [PATCH] Update file terraform.yml --- pipelines/terraform.yml | 43 ++++++++++++++++++++++++++++++++++++----- 1 file changed, 38 insertions(+), 5 deletions(-) diff --git a/pipelines/terraform.yml b/pipelines/terraform.yml index e8a9804..228a15d 100644 --- a/pipelines/terraform.yml +++ b/pipelines/terraform.yml @@ -19,29 +19,62 @@ validate: allow_failure: false extends: .terraform_validate -plan: +plan-development: stage: plan variables: ARGUMENTS: -var-file=terraform.tfvars + ENVIRONMENT_NAME: development allow_failure: false extends: .terraform_plan needs: ["validate","format"] -apply: +plan-production: + stage: plan + variables: + ARGUMENTS: -var-file=terraform.tfvars + ENVIRONMENT_NAME: production + allow_failure: false + extends: .terraform_plan + needs: ["validate","format"] + +apply-development: stage: apply variables: ARGUMENTS: -var-file=terraform.tfvars + ENVIRONMENT_NAME: development allow_failure: false extends: .terraform_apply rules: - - when: manual + - when: manual -destroy: +apply-production: + stage: apply + variables: + ARGUMENTS: -var-file=terraform.tfvars + ENVIRONMENT_NAME: production + allow_failure: false + extends: .terraform_apply + rules: + - when: manual + +destroy-development: stage: destroy variables: ARGUMENTS: -var-file=terraform.tfvars + ENVIRONMENT_NAME: development allow_failure: false extends: .terraform_destroy needs: ["apply"] rules: - - when: manual \ No newline at end of file + - when: manual + +destroy-production: + stage: destroy + variables: + ARGUMENTS: -var-file=terraform.tfvars + ENVIRONMENT_NAME: production + allow_failure: false + extends: .terraform_destroy + needs: ["apply"] + rules: + - when: manual \ No newline at end of file