Skip to content

add actions

add actions #1

Workflow file for this run

name: 'Terraform Automation'
on:
push:
branches:
- main
pull_request:
jobs:
terraform:
name: 'Build Azure Infra'
runs-on: ubuntu-latest
permissions:
pull-requests: write
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Terraform Setup
uses: hashicorp/setup-terraform@v2
with:
cli_config_credentials_token: ${{ secrets.TF_API_TOKEN }}
- name: Select Azure
id: SA
run: cd azure
- name: Terraform Format
id: fmt
run: terraform fmt
- name: Terraform init
id: init
run: terraform init
- name: Terraform validate
id: validate
run: terraform validate
- name: plan
run: terraform plan -input=false
continue-on-error: true
- name: Terraform Plan Status
if: steps.plan.outcome == 'failure'
run: exit 1
- name: Terraform Apply
if: step.plan.outcome == 'success'

Check failure on line 49 in .github/workflows/terraform.yaml

View workflow run for this annotation

GitHub Actions / Terraform Automation

Invalid workflow file

The workflow is not valid. .github/workflows/terraform.yaml (Line: 49, Col: 13): Unrecognized named-value: 'step'. Located at position 1 within expression: step.plan.outcome == 'success'
run: terraform apply -auto-approve -input=false