Skip to content

Update 01-budgets.tf #12

Update 01-budgets.tf

Update 01-budgets.tf #12

Workflow file for this run

name: Terraform Lifecycle
on:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
terraform:
name: Terraform
runs-on: ubuntu-latest
# Environment variables can be set here
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: ${{ secrets.REGION }}
TF_VERSION: "1.2.0" # Set this to your required Terraform version
TF_VAR_region: ${{ secrets.REGION }}
TF_VAR_terraform_state_bucket_name: ${{ secrets.TERRAFORM_STATE_BUCKET_NAME }}
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: ${{ env.TF_VERSION }}
- name: Terraform Init
id: init
run: terraform init
- name: Terraform Plan
id: plan
run: terraform plan -out=tfplan
- name: Terraform Apply
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
run: terraform apply -auto-approve tfplan