Skip to content

Commit

Permalink
remove tfswitch support, upgrade dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
tillkuhn committed Oct 7, 2024
1 parent 084f2ec commit f03d235
Show file tree
Hide file tree
Showing 2 changed files with 43 additions and 43 deletions.
68 changes: 34 additions & 34 deletions terraform/.terraform.lock.hcl

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions terraform/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,38 +30,38 @@ help:

# Terraform Lifecycle

.PHONY: tfswitch
tfswitch: ## Run 'tfswitch' utility if the binary exists and versions.tf is present
test -f versions.tf && hash tfswitch 2>/dev/null && tfswitch || echo tfswitch not installed
#.PHONY: tfswitch
#tfswitch: ## Run 'tfswitch' utility if the binary exists and versions.tf is present
# test -f versions.tf && hash tfswitch 2>/dev/null && tfswitch || echo tfswitch not installed

.PHONY: init
init: tfswitch ## Run 'terraform init' to prepare your working directory for other commands
init: ## Run 'terraform init' to prepare your working directory for other commands
$(TF_BIN) --version
$(TF_BIN) init

.PHONY: plan
plan: tfswitch fmt ## Run '$(TF_BIN) plan', implies includes targets fmt and validate
plan: fmt ## Run '$(TF_BIN) plan', implies includes targets fmt and validate
$(TF_BIN) validate; $(TF_BIN) plan

.PHONY: apply
apply: tfswitch fmt ## Run '$(TF_BIN) apply --auto-approve' to apply changes without prompting
apply: fmt ## Run '$(TF_BIN) apply --auto-approve' to apply changes without prompting
$(TF_BIN) apply --auto-approve

.PHONY: update
update: ## Run 'terraform init -upgrade' to update provider versions, see also 'lock'
$(TF_BIN) init -upgrade
test -f versions.tf && hash tfswitch 2>/dev/null && tfswitch --latest || echo tfswitch not installed
#test -f versions.tf && hash tfswitch 2>/dev/null && tfswitch --latest || echo tfswitch not installed
@echo "Finished, it's recommended to run 'make plan' now to verify if everything is still working "

.PHONY: upgrade
upgrade: update ## Alias for target 'update'

.PHONY: fmt
fmt: tfswitch ## Run 'terraform fmt -recursive' to reformat config in the the standard style
fmt: ## Run 'terraform fmt -recursive' to reformat config in the the standard style
$(TF_BIN) fmt -recursive

.PHONY: check
check: tfswitch ## Run 'terraform fmt -check' to check if input is formatted, return != 0 if not
check: ## Run 'terraform fmt -check' to check if input is formatted, return != 0 if not
$(TF_BIN) fmt -check

.PHONY: lock
Expand Down

0 comments on commit f03d235

Please sign in to comment.