Created
February 6, 2021 18:32
-
-
Save MarcusFelling/de04b04ab801b3fb22f0992a3ab79533 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Terraform Plan" | |
on: pull_request | |
jobs: | |
terraform: | |
name: "Run Terraform Plan" | |
runs-on: ubuntu-latest | |
# Add env variables for service principal | |
env: | |
ARM_CLIENT_ID: ${{ secrets.TF_VAR_ARM_CLIENT_ID }} | |
ARM_CLIENT_SECRET: ${{ secrets.TF_VAR_ARM_CLIENT_SECRET }} | |
ARM_SUBSCRIPTION_ID: ${{ secrets.TF_VAR_ARM_SUBSCRIPTION_ID }} | |
ARM_TENANT_ID: ${{ secrets.TF_VAR_ARM_TENANT_ID }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Terraform | |
uses: hashicorp/setup-terraform@v1 | |
with: | |
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }} | |
- name: Terraform Format | |
id: fmt | |
run: terraform fmt -check | |
- name: Terraform Init | |
id: init | |
run: terraform init | |
- name: Terraform Plan | |
id: plan | |
run: terraform plan |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment