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 4, 2024
1 parent 0ba2451 commit 3a29592
Showing 1 changed file with 13 additions and 8 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/pipeline.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,21 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: 'Log in to Azure'
uses: azure/login@v1
with:
creds: ${{ secrets.AZURE_CREDENTIALS }}
- name: Log in to Azure
run: |
az login --service-principal -u ${{ secrets.ARM_CLIENT_ID }} -p ${{ secrets.ARM_CLIENT_SECRET }} --tenant ${{ secrets.ARM_TENANT_ID }}
az account set --subscription ${{ secrets.ARM_SUBSCRIPTION_ID }}
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1

- name: Initialize Terraform
working-directory: components
env:
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
run: |
terraform init \
-backend-config="resource_group_name=rule-set-rg" \
Expand All @@ -40,10 +45,10 @@ jobs:
- name: Plan and Apply 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 }}
ARM_CLIENT_ID: ${{ secrets.ARM_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.ARM_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ secrets.ARM_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.ARM_TENANT_ID }}
GITHUB_TOKEN: ${{ secrets.PAT_TOKEN }}
run: |
terraform plan -out=tfplan -var-file="terraform.tfvars"
Expand Down

0 comments on commit 3a29592

Please sign in to comment.