From dc0c2bbec2046b5613581484fd456b726c69fa75 Mon Sep 17 00:00:00 2001 From: "Matthew C. Morgan" Date: Wed, 12 Mar 2025 22:37:15 -0400 Subject: [PATCH] remove realm --- README.md | 18 ----------------- outputs.tf | 8 ++------ variables.tf | 56 ---------------------------------------------------- 3 files changed, 2 insertions(+), 80 deletions(-) diff --git a/README.md b/README.md index c3fde13..bc977c9 100644 --- a/README.md +++ b/README.md @@ -72,8 +72,6 @@ Common issues and solutions: | Name | Version | |------|---------| | [helm](#provider\_helm) | 2.17.0 | -| [keycloak](#provider\_keycloak) | 5.1.1 | -| [kubernetes](#provider\_kubernetes) | 2.35.1 | ## Modules @@ -87,20 +85,11 @@ Common issues and solutions: | Name | Type | |------|------| | [helm_release.keycloak](https://registry.terraform.io/providers/hashicorp/helm/latest/docs/resources/release) | resource | -| [keycloak_openid_client.client](https://registry.terraform.io/providers/keycloak/keycloak/latest/docs/resources/openid_client) | resource | -| [keycloak_realm.realm](https://registry.terraform.io/providers/keycloak/keycloak/latest/docs/resources/realm) | resource | -| [keycloak_role.developer_role](https://registry.terraform.io/providers/keycloak/keycloak/latest/docs/resources/role) | resource | -| [keycloak_user.user](https://registry.terraform.io/providers/keycloak/keycloak/latest/docs/resources/user) | resource | -| [keycloak_user_roles.user_roles](https://registry.terraform.io/providers/keycloak/keycloak/latest/docs/resources/user_roles) | resource | -| [kubernetes_secret.keycloak_realm_creds](https://registry.terraform.io/providers/hashicorp/kubernetes/latest/docs/resources/secret) | resource | ## Inputs | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| -| [base\_url](#input\_base\_url) | Base URL for the OpenID client | `string` | `""` | no | -| [client\_id](#input\_client\_id) | Client ID for the OpenID client | `string` | `"app-client"` | no | -| [client\_secret](#input\_client\_secret) | Client secret for the OpenID client | `string` | `""` | no | | [cluster\_domain](#input\_cluster\_domain) | The domain name used to reference ingresses for the cluster. | `string` | n/a | yes | | [cluster\_name](#input\_cluster\_name) | EKS cluster name name component used through out the EKS cluster describing its purpose (ex: dice-dev) | `string` | n/a | yes | | [default\_storage\_class](#input\_default\_storage\_class) | The default storage class to use for persistent volumes | `string` | `"gp3-encrypted"` | no | @@ -111,12 +100,6 @@ Common issues and solutions: | [namespace](#input\_namespace) | The namespace which will be created and into which keycloak will be deployed. | `string` | `"keycloak"` | no | | [postgresql\_tag](#input\_postgresql\_tag) | The tag of the postgresql image to use. | `string` | `"17.4.0"` | no | | [profile](#input\_profile) | AWS config profile used to upload images into ECR | `string` | `""` | no | -| [realm\_email](#input\_realm\_email) | Email for the realm user | `string` | `"admin@example.com"` | no | -| [realm\_name](#input\_realm\_name) | Name of the Keycloak realm to create | `string` | `"default"` | no | -| [realm\_password](#input\_realm\_password) | Password for the realm user | `string` | `""` | no | -| [realm\_user](#input\_realm\_user) | Username for the realm admin user | `string` | `"user"` | no | -| [redirect\_uris](#input\_redirect\_uris) | Valid redirect URIs for the OpenID client | `list(string)` |
[
"*"
]
| no | -| [root\_url](#input\_root\_url) | Root URL for the OpenID client | `string` | `""` | no | | [service\_name](#input\_service\_name) | The name of the service to be deployed in the EKS cluster. | `string` | `"service"` | no | | [telemetry\_namespace](#input\_telemetry\_namespace) | The namespace used for telemetry. | `string` | `"namespace"` | no | @@ -133,5 +116,4 @@ Common issues and solutions: | [namespace](#output\_namespace) | The namespace in which keycloak gets installed in. | | [provider\_config](#output\_provider\_config) | Add provider configuration block for easier consumption | | [public\_endpoint](#output\_public\_endpoint) | The endpoint at which keycloak can be reached from outside the cluster. | -| [realm\_id](#output\_realm\_id) | n/a | diff --git a/outputs.tf b/outputs.tf index b34db99..998f7a7 100644 --- a/outputs.tf +++ b/outputs.tf @@ -12,16 +12,12 @@ output "admin_internal_endpoint" { } } -output "realm_id" { - value = keycloak_realm.realm.id -} - # Add provider configuration block for easier consumption output "provider_config" { value = { - url = "https://${var.service_name}.${var.cluster_domain}" + url = "${module.ingress_resources.service_url}/auth" realm = "master" - client_id = "admin-cli" + client_id = var.keycloak_user } sensitive = true } diff --git a/variables.tf b/variables.tf index 7c5091c..194fdbc 100644 --- a/variables.tf +++ b/variables.tf @@ -67,59 +67,3 @@ variable "postgresql_tag" { type = string default = "17.4.0" } - -variable "realm_name" { - description = "Name of the Keycloak realm to create" - type = string - default = "default" -} - -variable "realm_user" { - description = "Username for the realm admin user" - type = string - default = "user" -} - -variable "realm_email" { - description = "Email for the realm user" - type = string - default = "admin@example.com" -} - -variable "realm_password" { - description = "Password for the realm user" - type = string - default = "" - sensitive = true -} - -variable "client_id" { - description = "Client ID for the OpenID client" - type = string - default = "app-client" -} - -variable "client_secret" { - description = "Client secret for the OpenID client" - type = string - default = "" - sensitive = true -} - -variable "redirect_uris" { - description = "Valid redirect URIs for the OpenID client" - type = list(string) - default = ["*"] -} - -variable "root_url" { - description = "Root URL for the OpenID client" - type = string - default = "" -} - -variable "base_url" { - description = "Base URL for the OpenID client" - type = string - default = "" -}