Terraform provider for Keycloak.
https://mrparkers.github.io/terraform-provider-keycloak/
This project uses Go Modules which requires Go 1.11. You can initialize your local development environment and build the provider like so:
GO111MODULE=on go mod download && make build
Currently, this provider is tested against Terraform v0.12.1 and Keycloak v8.0.0. I personally use this provider with Terraform v0.11.x and Keycloak 4.8.3.Final.
In the future, it would be nice to run acceptance tests using different versions of Terraform / Keycloak. Please feel free to submit a PR if you believe you can help with this.
Every resource supported by this provider will have a reasonable amount of acceptance test coverage
For local development, you can spin up a local instance of Keycloak, backed by Postgres and OpenLDAP using make local
.
Once the environment is ready, you can run the acceptance tests after setting the required environment variables:
export KEYCLOAK_CLIENT_ID=terraform \
export KEYCLOAK_CLIENT_SECRET=884e0f95-0f42-4a63-9b1f-94274655669e \
export KEYCLOAK_REALM=master \
export KEYCLOAK_URL="http://localhost:8080" \
make testacc
These tests will also run in CI when opening a PR and on master.