- Run the local plugin code with your debugging IDE of choice with something similar to
go run ./... -debug
. - Set breakpoints in your IDE.
- In your shell, apply the resource you are working on.
# export the printed environment variable from the go run ./... -debug command above. E.g. export TF_REATTACH_PROVIDERS='{"registry.terraform.io/zitadel/zitadel":{"Protocol":"grpc","ProtocolVersion":6,"Pid":8123,"Test":true,"Addr":{"Network":"unix","String":"/tmp/plugin275634719"}}}' # go to a directory containing .tf files. cd /my-zitadel-terraform-files # apply them terraform apply
- The execution stops at your breakpoints.
Run a local ZITADEL instance using docker compose.
# To have the machine key written with the correct ownership, set your current users ID.
export ZITADEL_DEV_UID="$(id -u)"
# Setup ZITADEL
docker compose --file ./acceptance/docker-compose.yaml run setup
Run the accepance tests using the machine key generated by ZITADEL.
TF_ACC=1 go test ./...
go run github.com/golangci/golangci-lint/cmd/[email protected] run --fix
- Manually maintain files in /templates and /examples
- Generate the docs
go run github.com/hashicorp/terraform-plugin-docs/cmd/[email protected] generate