Skip to content

Instantly share code, notes, and snippets.

@lukaszraczylo
Created March 14, 2021 10:11
Show Gist options
  • Save lukaszraczylo/9eb45a36d695db4486ee000391d13889 to your computer and use it in GitHub Desktop.
Save lukaszraczylo/9eb45a36d695db4486ee000391d13889 to your computer and use it in GitHub Desktop.
ADDITIONAL_ARGS=-var 'traefik_api_key=$(TRAEFIK_API_KEY)' -var "github_user=$(GH_USER)" -var "github_pat=$(GH_TOKEN)"
apply:
cd infrastructure; terraform apply $(ADDITIONAL_ARGS) -auto-approve -var-file ../variables.tfvars
plan:
cd infrastructure; terraform plan $(ADDITIONAL_ARGS) -var-file ../variables.tfvars
destroy:
cd infrastructure; terraform destroy $(ADDITIONAL_ARGS) -var-file ../variables.tfvars
destroy-target:
cd infrastructure; terraform destroy $(ADDITIONAL_ARGS) -var-file ../variables.tfvars -target $(TARGET)
refresh:
cd infrastructure; terraform refresh $(ADDITIONAL_ARGS) -var-file ../variables.tfvars
init:
cd infrastructure; rm -fr .terraform; terraform init
import:
cd infrastructure; terraform import $(ADDITIONAL_ARGS) -var-file ../variables.tfvars $(ARGS)
lint:
terraform fmt -recursive infrastructure/
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment