2021-12-11 12:12:18 +07:00
|
|
|
.POSIX:
|
2021-12-25 02:34:49 +07:00
|
|
|
.EXPORT_ALL_VARIABLES:
|
|
|
|
|
2021-12-26 10:49:50 +07:00
|
|
|
KUBECONFIG = ../metal/kubeconfig.yaml
|
|
|
|
KUBE_CONFIG_PATH = $(KUBECONFIG)
|
2021-12-11 12:12:18 +07:00
|
|
|
|
2021-12-25 10:52:07 +07:00
|
|
|
default: apply terraform-secrets
|
2021-12-11 12:12:18 +07:00
|
|
|
|
|
|
|
~/.terraform.d/credentials.tfrc.json:
|
|
|
|
terraform login
|
|
|
|
|
2021-12-25 02:34:49 +07:00
|
|
|
terraform.tfvars:
|
2021-12-25 10:52:07 +07:00
|
|
|
ansible-playbook tfvars.yml
|
2021-12-25 02:34:49 +07:00
|
|
|
|
|
|
|
.terraform.lock.hcl: ~/.terraform.d/credentials.tfrc.json versions.tf terraform.tfvars
|
2021-12-11 12:12:18 +07:00
|
|
|
terraform init
|
2021-12-11 23:48:26 +07:00
|
|
|
touch .terraform.lock.hcl
|
2021-12-11 12:12:18 +07:00
|
|
|
|
2021-12-25 10:52:07 +07:00
|
|
|
namespaces:
|
|
|
|
ansible-playbook namespaces.yml
|
|
|
|
|
2021-12-23 00:18:09 +07:00
|
|
|
plan: .terraform.lock.hcl
|
|
|
|
terraform plan
|
|
|
|
|
2021-12-25 10:52:07 +07:00
|
|
|
apply: .terraform.lock.hcl namespaces
|
|
|
|
terraform apply
|
|
|
|
|
|
|
|
terraform-secrets:
|
|
|
|
ansible-playbook terraform-secrets.yml
|