Skip to content

Commit

Permalink
adding config + pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
ConnorOKane-Kainos committed Jul 3, 2024
1 parent dd625db commit 51c52ce
Showing 1 changed file with 6 additions and 25 deletions.
31 changes: 6 additions & 25 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ jobs:
uses: actions/checkout@v2

- name: Log in to Azure
run: |
az login --service-principal -u ${{ secrets.AZURE_CLIENT_ID }} -p ${{ secrets.AZURE_CLIENT_SECRET }} --tenant ${{ secrets.AZURE_TENANT_ID }}
az account set --subscription ${{ secrets.DCD_CFT_SANDBOX_SUBSCRIPTION }}
uses: azure/login@v2
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}

- name: Use Terraform
uses: hashicorp/setup-terraform@v1
Expand All @@ -34,27 +34,8 @@ jobs:
- name: Precheck Terraform
working-directory: components
env:
AZURE_SUBSCRIPTION_ID: ${{ secrets.DCD_CFT_SANDBOX_SUBSCRIPTION }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
terraform init \
-backend-config="subscription_id=${{ secrets.DCD_CFT_SANDBOX_SUBSCRIPTION }}"
terraform plan \
-var="location=UK South" \
-var="override_action=plan" \
-var="github_token=${{ secrets.PAT_TOKEN }}"
- name: Plan Terraform
working-directory: components
env:
ARM_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ secrets.DCD_CFT_SANDBOX_SUBSCRIPTION }}
ARM_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }}
AZURE_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
terraform plan \
-var="location=UK South" \
-var="override_action=plan" \
-var="github_token=${{ secrets.PAT_TOKEN }}"
terraform init -backend-config="subscription_id=${{ secrets.DCD_CFT_SANDBOX_SUBSCRIPTION }}"
terraform plan -var="location=UK South" -var="override_action=plan" -var="github_token=${{ secrets.PAT_TOKEN }}"

0 comments on commit 51c52ce

Please sign in to comment.