Compare commits

..

No commits in common. "9192879c03bb177fc1df3707c6c3b03ed782ecd1" and "b51617c009669cdf97b0828b17ca2773928a4def" have entirely different histories.

View File

@ -1,23 +1,26 @@
.PHONY: init plan apply format .PHONY: init plan apply format
# Define vault_env function to set up vault environment #init:
define vault_env # @echo "Sourcing environment and initializing Terraform..."
@export VAULT_ADDR="https://vault.service.consul:8200" && \ # @source ./env && terraform init
export VAULT_TOKEN=$$(vault write -field=token auth/approle/login role_id=$$VAULT_ROLEID) && \ #
export CONSUL_HTTP_TOKEN=$$(vault read -format=json consul_root/au/syd1/creds/terraform-vault | jq '.data.token') #plan:
endef # @echo "Sourcing environment and planning Terraform changes..."
# @source ./env && terraform plan
#
#apply:
# @echo "Sourcing environment and applying Terraform changes..."
# @source ./env && terraform apply -auto-approve
init: init:
@$(call vault_env) && \ @terragrunt run --all --non-interactive init -- -upgrade
terragrunt run --all --non-interactive init -- -upgrade
plan: init plan: init
@$(call vault_env) && \ @terragrunt run --all --parallelism 4 --non-interactive plan
terragrunt run --all --parallelism 4 --non-interactive plan
apply: init apply: init
@$(call vault_env) && \ @terragrunt run --all --parallelism 2 --non-interactive apply
terragrunt run --all --parallelism 2 --non-interactive apply
format: format:
@echo "Formatting OpenTofu files..." @echo "Formatting OpenTofu files..."