Skip to content

Instantly share code, notes, and snippets.

@devenes
Created May 3, 2022 01:51
Show Gist options
  • Save devenes/0f6fee44701cf50621b9438f518a779a to your computer and use it in GitHub Desktop.
Save devenes/0f6fee44701cf50621b9438f518a779a to your computer and use it in GitHub Desktop.
Terraform Infrastructure Plan
name: "Terraform Infrastructure Plan"
on:
push:
branches:
- "*"
jobs:
terraform:
name: "Terraform Plan"
runs-on: ubuntu-latest
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: "us-east-1"
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 Init
id: init
run: terraform init
- name: Terraform Plan
id: plan
if: github.event_name == 'push'
run: terraform plan -no-color
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment