Six new resources, all backed by endpoints that did not exist before v0.30.0
and verified end-to-end against a live v0.30.2 instance:
dokploy_network Docker networks, now first-class. Services attach
through network_ids, which is what deprecates
Compose's isolated_deployment upstream.
dokploy_dns_provider Cloudflare or Route53, so adding a domain creates
its DNS record.
dokploy_vault_provider Env values resolved from HashiCorp Vault, Infisical,
AWS, Doppler, Azure or Scaleway at deploy time, so
the secret never lands in Dokploy or in state.
dokploy_schedule Cron jobs in a container, a stack, or on a server.
dokploy_volume_backup Scheduled backups of a named volume — the companion
to a mount that persists.
dokploy_libsql The sixth managed database engine.
libsql.create is the strictest endpoint in the API: eleven keys required to
be present, several only meaningfully null, no generated service name, and it
returns `true` rather than the row. CreateDefaults and ListIDs absorb all
three so the resource behaves like every other database.
Also filled the gaps a field-by-field diff against the live schema turned up:
domain gains `enabled` (the v0.30.0 park-a-domain toggle), compose gains
create_env_file, icon and service_networks, application gains icon and
preview_require_collaborator_permissions, and mounts accept libsql.
DNS and vault credentials are masked by Dokploy on read, so `config` is
tagged noread and keeps the configured value, as the basic-auth password
already does.
66 lines
2.0 KiB
Makefile
66 lines
2.0 KiB
Makefile
BINARY := terraform-provider-dokploy
|
|
VERSION ?= 0.2.0
|
|
NAMESPACE := maxvojtkov
|
|
NAME := dokploy
|
|
|
|
OS_ARCH := $(shell go env GOOS)_$(shell go env GOARCH)
|
|
MIRROR := $(HOME)/.local/share/terraform/plugins
|
|
DEST := $(MIRROR)/registry.terraform.io/$(NAMESPACE)/$(NAME)/$(VERSION)/$(OS_ARCH)
|
|
|
|
.PHONY: build
|
|
build: ## Compile the provider
|
|
go build -ldflags "-X main.version=$(VERSION)" -o $(BINARY) .
|
|
|
|
.PHONY: install
|
|
install: ## Build and install into the local filesystem mirror
|
|
@mkdir -p "$(DEST)"
|
|
go build -ldflags "-X main.version=$(VERSION)" -o "$(DEST)/$(BINARY)_v$(VERSION)" .
|
|
@echo
|
|
@echo "Installed $(BINARY) $(VERSION) to:"
|
|
@echo " $(DEST)"
|
|
@echo
|
|
@echo "Add this to ~/.terraformrc (or ~/.tofurc):"
|
|
@echo
|
|
@echo ' provider_installation {'
|
|
@echo ' filesystem_mirror {'
|
|
@echo ' path = "$(MIRROR)"'
|
|
@echo ' include = ["registry.terraform.io/$(NAMESPACE)/$(NAME)"]'
|
|
@echo ' }'
|
|
@echo ' direct {'
|
|
@echo ' exclude = ["registry.terraform.io/$(NAMESPACE)/$(NAME)"]'
|
|
@echo ' }'
|
|
@echo ' }'
|
|
|
|
.PHONY: test
|
|
test: ## Run unit tests
|
|
go test ./... -count=1
|
|
|
|
.PHONY: testacc
|
|
testacc: ## Run acceptance tests against a live instance (needs DOKPLOY_HOST and DOKPLOY_API_KEY)
|
|
TF_ACC=1 go test ./internal/provider/ -v -count=1 -timeout 30m
|
|
|
|
.PHONY: docs
|
|
docs: ## Regenerate docs/ from the provider schema
|
|
go run github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs@v0.23.0 generate --provider-name dokploy
|
|
|
|
.PHONY: fmt
|
|
fmt: ## Format Go and Terraform sources
|
|
gofmt -w .
|
|
@command -v terraform >/dev/null && terraform fmt -recursive examples modules || true
|
|
|
|
.PHONY: lint
|
|
lint: ## Vet Go sources and check formatting
|
|
go vet ./...
|
|
@test -z "$$(gofmt -l .)" || { echo "gofmt needed:"; gofmt -l .; exit 1; }
|
|
|
|
.PHONY: clean
|
|
clean: ## Remove build artifacts
|
|
rm -f $(BINARY)
|
|
|
|
.PHONY: help
|
|
help: ## Show this help
|
|
@grep -hE '^[a-zA-Z_-]+:.*?## ' $(MAKEFILE_LIST) \
|
|
| awk 'BEGIN {FS = ":.*?## "}; {printf " \033[36m%-10s\033[0m %s\n", $$1, $$2}'
|
|
|
|
.DEFAULT_GOAL := help
|