Skip to content

Commit

Permalink
[EC-68] Replace terraform.sh with tf commands (#823)
Browse files Browse the repository at this point in the history
  • Loading branch information
Krusty93 authored Jan 9, 2024
1 parent 5fca76d commit 636a53e
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 10 deletions.
24 changes: 20 additions & 4 deletions .github/workflows/ioweb_prod_cd.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,15 +121,32 @@ jobs:
terraform_version: ${{ needs.terraform_plan_job.outputs.terraform_version }}
terraform_wrapper: true

- name: Terraform init common
id: terraform_init_common
shell: bash
working-directory: ${{ env.DIR }}-common
env:
AZURE_ENVIRONMENT: prod
run: |
bash ./terraform.sh init ${{ env.AZURE_ENVIRONMENT }}
- name: Terraform apply common
id: terraform_apply_common
shell: bash
working-directory: ${{ env.DIR }}-common
env:
AZURE_ENVIRONMENT: prod
run: |
bash ./terraform.sh apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
rm -rf tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
terraform apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
- name: Terraform init weu-prod01
id: terraform_init_weu-prod01
shell: bash
working-directory: ${{ env.DIR }}-app
env:
AZURE_ENVIRONMENT: weu-prod01
run: |
bash ./terraform.sh init ${{ env.AZURE_ENVIRONMENT }}
- name: Terraform apply weu-prod01
id: terraform_apply_weu-prod01
Expand All @@ -138,5 +155,4 @@ jobs:
env:
AZURE_ENVIRONMENT: weu-prod01
run: |
bash ./terraform.sh apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
rm -rf tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
terraform apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
36 changes: 30 additions & 6 deletions .github/workflows/prod_cd_citizen-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,15 +137,32 @@ jobs:
terraform_version: ${{ needs.terraform_plan_job.outputs.terraform_version }}
terraform_wrapper: true

- name: Terraform init common
id: terraform_init_common
shell: bash
working-directory: ${{ env.DIR }}-common
env:
AZURE_ENVIRONMENT: prod
run: |
bash ./terraform.sh init ${{ env.AZURE_ENVIRONMENT }}
- name: Terraform apply common
id: terraform_apply_common
shell: bash
working-directory: ${{ env.DIR }}-common
env:
AZURE_ENVIRONMENT: prod
run: |
bash ./terraform.sh apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
rm -rf tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
terraform apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
- name: Terraform init weu-beta
id: terraform_init_weu-beta
shell: bash
working-directory: ${{ env.DIR }}-app
env:
AZURE_ENVIRONMENT: weu-beta
run: |
bash ./terraform.sh init ${{ env.AZURE_ENVIRONMENT }}
- name: Terraform apply weu-beta
id: terraform_apply_weu-beta
Expand All @@ -154,8 +171,16 @@ jobs:
env:
AZURE_ENVIRONMENT: weu-beta
run: |
bash ./terraform.sh apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
rm -rf tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
terraform apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
- name: Terraform init weu-prod01
id: terraform_init_weu-prod01
shell: bash
working-directory: ${{ env.DIR }}-app
env:
AZURE_ENVIRONMENT: weu-prod01
run: |
bash ./terraform.sh init ${{ env.AZURE_ENVIRONMENT }}
- name: Terraform apply weu-prod01
id: terraform_apply_weu-prod01
Expand All @@ -164,5 +189,4 @@ jobs:
env:
AZURE_ENVIRONMENT: weu-prod01
run: |
bash ./terraform.sh apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
rm -rf tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}
terraform apply -lock-timeout=3000s -auto-approve -input=false tfplan-${{ env.AZURE_ENVIRONMENT }}-${{ github.sha }}

0 comments on commit 636a53e

Please sign in to comment.