mirror of
https://github.com/khuedoan/homelab.git
synced 2024-12-23 01:04:32 +07:00
5915ebb9d1
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
|