Skip to content

Commit

Permalink
fix: pipeline (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
shejri authored Oct 10, 2024
1 parent 17ff8d7 commit 94fb40a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
9 changes: 7 additions & 2 deletions .github/workflows/terraform.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ on:
- runner
- network
- acg
- firewall
- github_output
default: ''


Expand Down Expand Up @@ -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 != ''
Expand All @@ -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
Expand Down Expand Up @@ -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
terraform destroy -auto-approve
2 changes: 1 addition & 1 deletion docs/README-terraform.md
Original file line number Diff line number Diff line change
@@ -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

Expand Down

0 comments on commit 94fb40a

Please sign in to comment.