{"id":20480836,"url":"https://github.com/keycloak/terraform-provider-keycloak","last_synced_at":"2026-03-10T11:05:43.602Z","repository":{"id":38849081,"uuid":"147036024","full_name":"keycloak/terraform-provider-keycloak","owner":"keycloak","description":"Terraform provider for Keycloak ","archived":false,"fork":false,"pushed_at":"2026-03-03T03:04:00.000Z","size":3180,"stargazers_count":900,"open_issues_count":317,"forks_count":400,"subscribers_count":13,"default_branch":"main","last_synced_at":"2026-03-08T09:12:56.097Z","etag":null,"topics":["hacktoberfest","keycloak","terraform","terraform-provider"],"latest_commit_sha":null,"homepage":"https://registry.terraform.io/providers/keycloak/keycloak/latest/docs","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/keycloak.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE-APACHE-2.0","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":"MAINTAINERS.md","copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2018-09-01T22:05:31.000Z","updated_at":"2026-03-06T17:08:59.000Z","dependencies_parsed_at":"2026-01-21T11:01:05.517Z","dependency_job_id":null,"html_url":"https://github.com/keycloak/terraform-provider-keycloak","commit_stats":{"total_commits":573,"total_committers":151,"mean_commits":3.794701986754967,"dds":0.4240837696335078,"last_synced_commit":"3f6b75b79ada48eddb41de6055f57a357d9b691c"},"previous_names":["keycloak/terraform-provider-keycloak","mrparkers/terraform-provider-keycloak"],"tags_count":71,"template":false,"template_full_name":null,"purl":"pkg:github/keycloak/terraform-provider-keycloak","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keycloak%2Fterraform-provider-keycloak","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keycloak%2Fterraform-provider-keycloak/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keycloak%2Fterraform-provider-keycloak/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keycloak%2Fterraform-provider-keycloak/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/keycloak","download_url":"https://codeload.github.com/keycloak/terraform-provider-keycloak/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/keycloak%2Fterraform-provider-keycloak/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30331654,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-10T05:25:20.737Z","status":"ssl_error","status_checked_at":"2026-03-10T05:25:17.430Z","response_time":106,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["hacktoberfest","keycloak","terraform","terraform-provider"],"created_at":"2024-11-15T16:01:21.014Z","updated_at":"2026-03-10T11:05:43.582Z","avatar_url":"https://github.com/keycloak.png","language":"Go","funding_links":[],"categories":["Go","Providers"],"sub_categories":["Vendor supported providers"],"readme":"# terraform-provider-keycloak\nTerraform provider for [Keycloak](https://www.keycloak.org/).\n\n## Migration to the new provider\n\nTo migrate from `mrparkers/keycloak` to the `keycloak/keycloak` Terraform provider, you can use the `terraform state replace-provider` command:\n```\nterraform state replace-provider mrparkers/keycloak keycloak/keycloak\n```\nYou can find the documentation for this command [here](https://developer.hashicorp.com/terraform/cli/commands/state/replace-provider).\n\n## Docs\n\nAll documentation for this provider can now be found on the Terraform Registry: https://registry.terraform.io/providers/keycloak/keycloak/latest/docs\n\n## Installation\n\nThis provider can be installed automatically using Terraform \u003e=0.13 by using the `terraform` configuration block:\n\n```hcl\nterraform {\n  required_providers {\n    keycloak = {\n      source = \"keycloak/keycloak\"\n      version = \"\u003e= 5.7.0\"\n    }\n  }\n}\n```\n\nIf you are using Terraform 0.12, you can use this provider by downloading it and placing it within\none of the [implied local mirror directories](https://www.terraform.io/docs/commands/cli-config.html#implied-local-mirror-directories).\nOr, follow the [old instructions for installing third-party plugins](https://www.terraform.io/docs/configuration-0-11/providers.html#third-party-plugins).\n\nIf you are using any provider version below v2.0.0, you can also follow the [old instructions for installing third-party plugins](https://www.terraform.io/docs/configuration-0-11/providers.html#third-party-plugins).\n\n## A note for users of the legacy Wildfly distribution\n\nRecently, Keycloak has been updated to use Quarkus over the legacy Wildfly distribution. The only significant change here\nthat affects this Terraform provider is the removal of `/auth` from the default context path for the Keycloak API.\n\nIf you are using the legacy Wildfly distribution of Keycloak, you will need to set the `base_path` provider argument to\n`/auth`. This can also be done by using the `KEYCLOAK_BASE_PATH` environment variable.\n\n## Supported Versions\n\nThis provider will officially support the latest three minor versions of Keycloak, although older versions may still work.\n\nThe following versions are used when running acceptance tests in CI:\n\n- 26.5.4 (latest)\n- 26.4.7\n- 26.3.5\n- 26.2.5\n- 26.1.4\n- 26.0.8\n\n## Releases\n\nThis provider uses [GoReleaser](https://goreleaser.com/) to build and publish releases. Each release published to GitHub\ncontains binary files for Linux, macOS (darwin), and Windows, as configured within the [`.goreleaser.yml`](https://github.com/keycloak/terraform-provider-keycloak/blob/master/.goreleaser.yml)\nfile.\n\nEach release also contains a `terraform-provider-keycloak_${RELEASE_VERSION}_SHA256SUMS` file that can be used to check integrity.\n\nYou can find the list of releases [here](https://github.com/keycloak/terraform-provider-keycloak/releases).\nYou can find the changelog for each version [here](https://github.com/keycloak/terraform-provider-keycloak/blob/master/CHANGELOG.md).\n\nNote: Prior to v2.0.0, a statically linked build for use within Alpine linux was included with each release. This is no longer\ndone due to [GoReleaser not supporting CGO](https://goreleaser.com/limitations/cgo/). Instead of using a statically linked,\nbuild you can use the `linux_amd64` build as long as `libc6-compat` is installed.\n\n## Development\n\nThis project requires Go 1.25 and Terraform 1.14.0.\nThis project uses [Go Modules](https://github.com/golang/go/wiki/Modules) for dependency management, which allows this project to exist outside an existing GOPATH.\n\nAfter cloning the repository, you can build the project by running `make build`.\n\n### Debugging\n\nWe support remote debugging via [delve](https://github.com/go-delve/delve) via the make target `build-debug` and `run-debug`.\n\nTo debug the plugin, proceed as follows:\n1) Run `make build-debug`\n2) Run `make run-debug`\n3) Attach a remote debugger to the printed local address, e.g. `127.0.0.1:58772` from your IDE.\n4) Copy the `TF_REATTACH_PROVIDERS='{...}'` env variable, that is printed by the delve debugger after attachment.\n5) In a separate terminal prepend the `TF_REATTACH_PROVIDERS='{...}'` env variable to your `terraform ...` command\n\nNote that we use the delve options to wait for a debugger. This allows us to debug the complete\nplugin lifecycle.\n\nNote for Goland users, there is a preconfigured remote debugger configuration called `local debug`.\n\n### Debugging Example\n\nThe easiest way to play with the remote debugger setup is the bundled example project.\nTo use that run `make build-example-debug` and follow the steps above.\n\n### Local Environment\n\nYou can spin up a local developer environment via [Docker Compose](https://docs.docker.com/compose/) by running `make local`.\nThis will spin up a few containers for Keycloak, PostgreSQL, and OpenLDAP, which can be used for testing the provider.\nThis environment and its setup via `make local` is not intended for production use.\n\nYou can also use `make local-mtls` to start Keycloak with required client authentication via mTLS certificate.\n\nTo stop the environment you can use the `make local-stop`. To remove the local environment use `make local-down`.\n\nNote: The setup scripts require the [jq](https://stedolan.github.io/jq/) command line utility.\n\n### Tests\n\nEvery resource supported by this provider will have a reasonable amount of acceptance test coverage.\n\nYou can run acceptance tests against a Keycloak instance by running `make testacc`. You will need to supply some environment\nvariables in order to set up the provider during tests. Here is an example for running tests against a local environment\nthat was created via `make local`:\n\n```\nKEYCLOAK_CLIENT_ID=terraform \\\nKEYCLOAK_CLIENT_SECRET=884e0f95-0f42-4a63-9b1f-94274655669e \\\nKEYCLOAK_CLIENT_TIMEOUT=5 \\\nKEYCLOAK_REALM=master \\\nKEYCLOAK_TEST_PASSWORD_GRANT=true \\\nKEYCLOAK_URL=\"http://localhost:8080\" \\\nmake testacc\n```\n\n#### Test with HTTPS\nYou can also run the same tests on Keycloak's https port.\nFor this start the env with `make local`. After that run the following command:\n\n```\nKEYCLOAK_CLIENT_ID=terraform \\\nKEYCLOAK_CLIENT_SECRET=884e0f95-0f42-4a63-9b1f-94274655669e \\\nKEYCLOAK_CLIENT_TIMEOUT=5 \\\nKEYCLOAK_REALM=master \\\nKEYCLOAK_TEST_PASSWORD_GRANT=true \\\nKEYCLOAK_URL=\"https://localhost:8443\" \\\nKEYCLOAK_TLS_CA_CERT=\"$(cat provider/testdata/tls/server-cert.pem)\" \\\nmake testacc\n```\n\n#### Test Authenticating with HTTPS + mTLS\nYou can also run the same tests on Keycloak's https port with the Keycloak Terraform provider authenticating to the server with a mTLS client certificate.\nFor this start the env with `make local-mtls`. After that run the following command:\n\n```\nKEYCLOAK_CLIENT_ID=terraform \\\nKEYCLOAK_CLIENT_SECRET=884e0f95-0f42-4a63-9b1f-94274655669e \\\nKEYCLOAK_CLIENT_TIMEOUT=5 \\\nKEYCLOAK_REALM=master \\\nKEYCLOAK_TEST_PASSWORD_GRANT=true \\\nKEYCLOAK_URL_HTTP=\"http://localhost:8080\" \\\nKEYCLOAK_URL=\"https://localhost:8443\" \\\nKEYCLOAK_TLS_CLIENT_CERT=\"$(cat provider/testdata/tls/client-cert.pem)\" \\\nKEYCLOAK_TLS_CLIENT_KEY=\"$(cat provider/testdata/tls/client-key.pem)\" \\\nKEYCLOAK_TLS_CA_CERT=\"$(cat provider/testdata/tls/server-cert.pem)\" \\\nmake testauth\n```\n\n#### Test Authenticating with provided Access Token\nYou can also run the same test with a provided access token.\nFor this start the env with `make local`. To obtain an access token for the admin user via the admin-cli client, run `make access-token` to\nstore an acess token in the `./keycloak_access_token` file.\n\nAfter that run the following command:\n\n```\nmake access-token\nKEYCLOAK_CLIENT_ID=terraform \\\nKEYCLOAK_CLIENT_TIMEOUT=5 \\\nKEYCLOAK_ACCESS_TOKEN=\"$(cat keycloak_access_token)\" \\\nKEYCLOAK_REALM=master \\\nKEYCLOAK_URL=\"http://localhost:8080\" \\\nmake testauth\n```\n\n### Run examples\n\nYou can run examples against a Keycloak instance.\nFollow the commands for running examples against a local environment that was created via `make local`:\n\n```\nmake build-example\ncd example\nterraform init\nterraform plan -out tfplan\nterraform apply tfplan\nrm tfplan\n```\n\n## Acknowledgments\n\nThe Keycloak Terraform Provider was originally created by [Michael Parker](https://github.com/mrparkers). Many thanks for the hard work and dedication in building the foundation for this project.\nAlso, many thanks to all the contributors extending it and approving the license change to maintain it as part of the [Keycloak](https://www.keycloak.org/) project.\n\n## License\n\nThis software is licensed under Apache License, Version 2.0, (LICENSE-APACHE-2.0 or https://www.apache.org/licenses/LICENSE-2.0)\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in this software by you shall be licensed under the Apache License, Version 2.0, without any additional terms or conditions.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeycloak%2Fterraform-provider-keycloak","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkeycloak%2Fterraform-provider-keycloak","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkeycloak%2Fterraform-provider-keycloak/lists"}