Skip to content

Commit

Permalink
Added empty Terraform setup.
Browse files Browse the repository at this point in the history
  • Loading branch information
larwef committed Oct 26, 2023
1 parent 7da562a commit f81789c
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 3 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
**/.DS_Store
**/*.bin
artifacts/
artifacts/
*.tfvars
.terraformrc
terraform.rc
*.terraform/
*.terraform.lock.hcl
*.tfplan
22 changes: 20 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@ GOARCH=amd64
K8S_CONTEXT=your_context
K8S_NAMESPACE=your_namespace

ARTIFACTS=artifacts
ARTIFACTS=./artifacts

clean:
rm -rf $(ARTIFACTS)

# ------------------------------------- Go -------------------------------------
run:
Expand Down Expand Up @@ -75,4 +78,19 @@ k8s-apply:
# kubernetes-delete:
# K8S_CONTEXT=$(K8S_CONTEXT) \
# K8S_NAMESPACE=$(K8S_NAMESPACE) \
# ./scripts/delete.sh
# ./scripts/delete.sh

# --------------------------------- Terraform ----------------------------------
terraform-init:
terraform -chdir=deployments/terraform/ init

# Terraform variables can be added as environment variables. Eg:
# TF_VAR_var_name=$(YOUR_VARIABLE)
terraform-plan:
terraform -chdir=deployments/terraform/ plan -out=plan.tfplan

terraform-apply:
terraform -chdir=deployments/terraform/ apply plan.tfplan

terraform-destroy:
terraform -chdir=deployments/terraform/ destroy
Empty file added deployments/terraform/main.tf
Empty file.

0 comments on commit f81789c

Please sign in to comment.