From 94fb40aea7a6b0f73fdd99fb491c76f0a7e2bdd0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kre=C5=A1imir=20=C5=A0utalo?= Date: Thu, 10 Oct 2024 10:57:45 +0200 Subject: [PATCH] fix: pipeline (#21) --- .github/workflows/terraform.yml | 9 +++++++-- docs/README-terraform.md | 2 +- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.github/workflows/terraform.yml b/.github/workflows/terraform.yml index 44cd34f..f802601 100644 --- a/.github/workflows/terraform.yml +++ b/.github/workflows/terraform.yml @@ -40,6 +40,8 @@ on: - runner - network - acg + - firewall + - github_output default: '' @@ -67,7 +69,7 @@ jobs: ls -lah venv/bin source venv/bin/activate pip install -r requirements.txt - working-directory: ${{ github.event.inputs.directory }} + working-directory: terraform - name: 'Terraform Init' if: github.event.inputs.directory != '' @@ -89,8 +91,11 @@ jobs: export STORAGE_ACCOUNT_NAME=$(extract_value "storage_account_name" config.azurerm.tfbackend) export ARM_ACCESS_KEY=$(az storage account keys list --resource-group $RESOURCE_GROUP_NAME --account-name $STORAGE_ACCOUNT_NAME --query '[0].value' -o tsv) terraform init --backend-config=config.azurerm.tfbackend + else + terraform init fi + terraform workspace list terraform workspace select --or-create ${{github.event.inputs.workspace}} terraform workspace list @@ -140,4 +145,4 @@ jobs: GITHUB_TOKEN: ${{ secrets.GH_PAT_TOKEN }} GITHUB_OWNER: ${{ vars.GH_OWNER }} run: | - terraform destroy -target=module.${{ github.event.inputs.module }} -auto-approve \ No newline at end of file + terraform destroy -auto-approve \ No newline at end of file diff --git a/docs/README-terraform.md b/docs/README-terraform.md index dc6fd03..5cf76fc 100644 --- a/docs/README-terraform.md +++ b/docs/README-terraform.md @@ -1,7 +1,7 @@ # Terraform documentation This repository contains terraform code that deploys following platform on Azure: -![Diagam](wp10-diagram.drawio.png) +![Diagam](./wp10-diagram.drawio.png) ## Requirements