khuedoan-homelab/external/Makefile
Khue Doan 910321b0d5 build(external): auto approve Terraform apply
Use plan if you just want to plan
2022-03-15 21:40:28 +07:00

27 lines
513 B
Makefile

.POSIX:
.EXPORT_ALL_VARIABLES:
KUBECONFIG = ../metal/kubeconfig.yaml
KUBE_CONFIG_PATH = $(KUBECONFIG)
default: apply
~/.terraform.d/credentials.tfrc.json:
terraform login
terraform.tfvars:
ansible-playbook tfvars.yml
.terraform.lock.hcl: ~/.terraform.d/credentials.tfrc.json versions.tf terraform.tfvars
terraform init
touch .terraform.lock.hcl
namespaces:
ansible-playbook namespaces.yml
plan: .terraform.lock.hcl
terraform plan
apply: .terraform.lock.hcl namespaces
terraform apply -auto-approve