Created
May 3, 2022 01:51
-
-
Save devenes/0f6fee44701cf50621b9438f518a779a to your computer and use it in GitHub Desktop.
Terraform Infrastructure Plan
This file contains 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 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