Files
terraform/apply/action.yml
lucasdpt 0d3c12d8b4
All checks were successful
semantic-release / release (push) Successful in 28s
chore: remove download/upload
2026-04-05 00:31:08 +02:00

32 lines
963 B
YAML

name: Terraform Apply
description: Download the "terraform-plan" artifact and apply it
inputs:
working-directory:
description: Directory containing the Terraform configuration
required: false
default: "."
runs:
using: composite
steps:
- name: Setup Terraform
uses: hashicorp/setup-terraform@5e8dbf3c6d9deaf4193ca7a8fb23f2ac83bb6c85 # v4.0.0
- name: Cache Terraform providers
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: ${{ inputs.working-directory }}/.terraform
key: terraform-${{ hashFiles(format('{0}/.terraform.lock.hcl', inputs.working-directory)) }}
restore-keys: terraform-
- name: Terraform Init
shell: bash
working-directory: ${{ inputs.working-directory }}
run: terraform init
- name: Terraform Apply
shell: bash
working-directory: ${{ inputs.working-directory }}
run: terraform apply -auto-approve