ToFu_Gitea/Makefile

35 lines
1.3 KiB
Makefile
Raw Permalink Normal View History

2023-12-21 11:20:47 +00:00
#!make
include .env
export
init:
tofu init \
-backend-config="bucket=${TF_BKEND_bucket}" \
-backend-config="key=${TF_BKEND_key}" \
-backend-config="region=${TF_BKEND_region}" \
-backend-config="access_key=${TF_BKEND_access_key}" \
-backend-config="secret_key=${TF_BKEND_secret_key}" \
-backend-config="endpoint=${TF_BKEND_endpoint}" \
-backend-config="skip_credentials_validation=${TF_BKEND_skip_credentials_validation}" \
-backend-config="force_path_style=${TF_BKEND_force_path_style}"
init_reconfig:
printenv
tofu init -reconfigure \
-backend-config="bucket=${TF_BKEND_bucket}" \
-backend-config="key=${TF_BKEND_key}" \
-backend-config="region=${TF_BKEND_region}" \
-backend-config="access_key=${TF_BKEND_access_key}" \
-backend-config="secret_key=${TF_BKEND_secret_key}" \
-backend-config="endpoint=${TF_BKEND_endpoint}" \
-backend-config="skip_credentials_validation=${TF_BKEND_skip_credentials_validation}" \
-backend-config="force_path_style=${TF_BKEND_force_path_style}"
gitea_vultr_json:
bash merge_vars.sh vultr gitea_vultr.tfvars.json
gitea_vultr: gitea_vultr_json
tofu workspace select gitea_vultr
tofu apply -var-file=gitea_vultr.tfvars.json
gitea_vultr_plan: gitea_vultr_json
tofu workspace select gitea_vultr
tofu plan -var-file=gitea_vultr.tfvars.json