From 170553edf38b2bf0e9e1ecaf947345bc64838589 Mon Sep 17 00:00:00 2001 From: ramu-reddy Date: Thu, 9 Apr 2020 19:51:22 -0700 Subject: [PATCH] add github actions for terraform --- .github/workflows/terraform.yaml | 38 ++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 .github/workflows/terraform.yaml diff --git a/.github/workflows/terraform.yaml b/.github/workflows/terraform.yaml new file mode 100644 index 0000000..cf039ff --- /dev/null +++ b/.github/workflows/terraform.yaml @@ -0,0 +1,38 @@ +name: 'Terraform GitHub Actions' +on: + - pull_request +jobs: + terraform: + name: 'Terraform' + runs-on: ubuntu-latest + steps: + - name: 'Checkout' + uses: actions/checkout@master + - name: 'Terraform Format' + uses: hashicorp/terraform-github-actions@master + with: + tf_actions_version: 0.12.13 + tf_actions_subcommand: 'fmt' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: 'Terraform Init' + uses: hashicorp/terraform-github-actions@master + with: + tf_actions_version: 0.12.13 + tf_actions_subcommand: 'init' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: 'Terraform Validate' + uses: hashicorp/terraform-github-actions@master + with: + tf_actions_version: 0.12.13 + tf_actions_subcommand: 'validate' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: 'Terraform Plan' + uses: hashicorp/terraform-github-actions@master + with: + tf_actions_version: 0.12.13 + tf_actions_subcommand: 'plan' + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}