Skip to content

adding config + pipeline #1

adding config + pipeline

adding config + pipeline #1

Workflow file for this run

name: Rule Sets Pipeline
on:
pull_request:
branches:
- rule-sets-DTSPO-17918
push:
branches:
- rule-sets-DTSPO-17918
permissions:
id-token: write
contents: read
jobs:
precheck-sbox:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- name: Checkout code
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 }}
- name: Use Terraform
uses: hashicorp/setup-terraform@v1
- name: Change directory to Terraform config
run: cd components/lab
- name: Precheck Terraform
working-directory: components/lab
env:
AZURE_SUBSCRIPTION_ID: ${{ secrets.DCD_CFT_SANDBOX_SUBSCRIPTION }}
run: |
terraform init \
-backend-config="subscription_id=${{ secrets.DCD_CFT_SANDBOX_SUBSCRIPTION }}"
terraform plan \
-var="location=UK South" \
-var="override_action=plan"