khuedoan-homelab/external/Makefile
Khue Doan 21fac43e57 refactor: replace Terraform binary with OpenTofu
OpenTofu is a drop-in replacement for Terraform, so aside from changing
the binary, it only needs some minor adjustments.
2024-11-24 00:09:15 +07:00

24 lines
399 B
Makefile

.POSIX:
default: apply
~/.terraform.d/credentials.tfrc.json:
tofu login
terraform.tfvars:
cp terraform.tfvars.example ${@}
nvim ${@}
.terraform.lock.hcl: ~/.terraform.d/credentials.tfrc.json versions.tf terraform.tfvars
tofu init
touch ${@}
namespaces:
ansible-playbook namespaces.yml
plan: .terraform.lock.hcl
tofu plan
apply: .terraform.lock.hcl namespaces
tofu apply -auto-approve