mirror of
https://github.com/khuedoan/homelab.git
synced 2025-02-25 14:07:56 +07:00

The previous setup using Ansible is kinda unessesary since it just edit the same tfvars file.
24 lines
419 B
Makefile
24 lines
419 B
Makefile
.POSIX:
|
|
|
|
default: apply
|
|
|
|
~/.terraform.d/credentials.tfrc.json:
|
|
terraform login
|
|
|
|
terraform.tfvars:
|
|
cp terraform.tfvars.example ${@}
|
|
nvim ${@}
|
|
|
|
.terraform.lock.hcl: ~/.terraform.d/credentials.tfrc.json versions.tf terraform.tfvars
|
|
terraform init
|
|
touch ${@}
|
|
|
|
namespaces:
|
|
ansible-playbook namespaces.yml
|
|
|
|
plan: .terraform.lock.hcl
|
|
terraform plan
|
|
|
|
apply: .terraform.lock.hcl namespaces
|
|
terraform apply -auto-approve
|