Files
home-ops/.taskfiles/TerraformTasks.yml
2022-07-17 03:18:22 -05:00

24 lines
609 B
YAML

---
version: "3"
tasks:
init:
desc: Initialize terraform dependencies
dir: terraform
cmds:
- find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}' && terraform init {{.CLI_ARGS}}" \;
plan:
desc: Show the terraform plan
dir: terraform
cmds:
- find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}' && terraform plan {{.CLI_ARGS}}" \;
apply:
desc: Apply the terraform changes
dir: terraform
interactive: true
cmds:
- find . -maxdepth 1 -type d \( ! -name . \) -exec bash -c "cd '{}' && terraform apply {{.CLI_ARGS}}" \;