Skip to content

Commit

Permalink
Create CI-Terraform.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Tommi-Sensa authored Jun 28, 2024
1 parent 8e48567 commit 74263cc
Showing 1 changed file with 55 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/CI-Terraform.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: 'Terraform'
on:
pull_request:
branches:
- "*"
paths-ignore:
- ".devcontainer/**"
- ".github/**"
- ".gitignore"
- ".terraform.lock.hcl"
- "README.md"
push:
branches-ignore:
- "main"
branches:
- "*"
paths-ignore:
- ".devcontainer/**"
- ".github/**"
- ".gitignore"
- ".terraform.lock.hcl"
- "README.md"


permissions:
contents: read

jobs:
terraform:
name: 'Terraform'
env:
ARM_CLIENT_ID: ${{ secrets.AZURE_AD_CLIENT_ID }}
ARM_CLIENT_SECRET: ${{ secrets.AZURE_AD_CLIENT_SECRET }}
ARM_SUBSCRIPTION_ID: ${{ secrets.AZURE_SUBSCRIPTION_ID }}
ARM_TENANT_ID: ${{ secrets.AZURE_AD_TENANT_ID }}
runs-on: ubuntu-latest
environment: production

# Use the Bash shell regardless whether the GitHub Actions runner is ubuntu-latest, macos-latest, or windows-latest
steps:
# Checkout the repository to the GitHub Actions runner
- name: Checkout
uses: actions/checkout@v4

# Install the latest version of Terraform CLI and configure the Terraform CLI configuration file with a Terraform Cloud user API token
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1

# Initialize a new or existing Terraform working directory by creating initial files, loading any remote state, downloading modules, etc.
- name: Terraform Init
run: terraform init

# Generates an execution plan for Terraform
- name: Terraform Plan
run: terraform plan -input=false

0 comments on commit 74263cc

Please sign in to comment.