Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[EC-68] Replace terraform.sh with tf commands #823

Merged
merged 1 commit into from
Jan 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 }}