/terraform-provider-keycloak

Terraform provider for Keycloak

Primary LanguageGoMIT LicenseMIT

terraform-provider-keycloak

Terraform provider for Keycloak.

CircleCI

Features

This project is a work in progress with a short term goal of supporting all of the Keycloak features that I need to manage at my place of employment.

Long term, I'd like to support as much as I can while I tinker with Keycloak in my spare time.

Supported Resources

I will write some docs for each resource once more are supported. For now, please refer to the linked source files.

Building

This project uses Go Modules which requires Go 1.11. I personally test the provider with version 0.11.8 of Terraform, and version 4.2.1.Final of Keycloak. Other versions may also work.

GO111MODULE=on go mod download && make build

Tests

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:

KEYCLOAK_CLIENT_ID=terraform \
KEYCLOAK_CLIENT_SECRET=884e0f95-0f42-4a63-9b1f-94274655669e \
KEYCLOAK_URL="http://localhost:8080" \
make testacc

These tests will also run in CI when opening a PR and on master.

License

MIT