diff --git a/.woodpecker/deploy.yml b/.woodpecker/deploy.yml new file mode 100644 index 0000000..f8541fd --- /dev/null +++ b/.woodpecker/deploy.yml @@ -0,0 +1,9 @@ +branches: main + +pipeline: + init: + image: hashicorp/terraform + commands: + - CODE_PATH=./hetzner/template make init + + \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..32f12a5 --- /dev/null +++ b/Makefile @@ -0,0 +1,22 @@ +CODE_PATH ?= . + +init: + @cd $(CODE_PATH) && terraform init -reconfigure -upgrade + +plan: init validate + @cd $(CODE_PATH) && terraform plan + +apply: init validate + @cd $(CODE_PATH) && terraform apply --auto-approve + +refresh: init validate + @cd $(CODE_PATH) && terraform refresh + +fmt: + @cd $(CODE_PATH) && terraform fmt -check -recursive + +validate: + @cd $(CODE_PATH) && terraform validate + +output: init + @cd $(CODE_PATH) && terraform output \ No newline at end of file