Fix global role binding name to be RFC 1123 compliant #3

Merged
benvin merged 1 commits from benvin/rancher-grb-name into main 2026-07-18 22:59:02 +10:00
Owner

Why

The main apply after #2 failed:

Error: 422 InvalidFormat, fieldName=name: invalid value akgroup-akP-rancher-admin:
a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-'

rancher2_global_role_binding.name must be a lowercase RFC 1123 label, but the akP-* group keys are mixed-case.

Change

  • name = akgroup-${lower(each.key)} (e.g. akgroup-akp-rancher-admin). The group_principal_id keeps the original case (keycloakoidc_group://akP-rancher-admin) to match the Authentik group.

Validation

tofu validate passes. The keycloak_oidc auth config from #2 already applied; this unblocks the two global role bindings.

## Why The `main` apply after #2 failed: ``` Error: 422 InvalidFormat, fieldName=name: invalid value akgroup-akP-rancher-admin: a lowercase RFC 1123 label must consist of lower case alphanumeric characters or '-' ``` `rancher2_global_role_binding.name` must be a lowercase RFC 1123 label, but the `akP-*` group keys are mixed-case. ## Change - `name = akgroup-${lower(each.key)}` (e.g. `akgroup-akp-rancher-admin`). The `group_principal_id` keeps the original case (`keycloakoidc_group://akP-rancher-admin`) to match the Authentik group. ## Validation `tofu validate` passes. The keycloak_oidc auth config from #2 already applied; this unblocks the two global role bindings.
unkinben added 1 commit 2026-07-18 22:55:49 +10:00
Fix global role binding name to be RFC 1123 compliant
ci/woodpecker/pr/pre-commit Pipeline was successful
ci/woodpecker/pr/plan Pipeline was successful
f2f41fc1c0
rancher2_global_role_binding.name must be a lowercase RFC 1123 label, but the
akP-* group keys are mixed-case, so apply failed with InvalidFormat 422.
Lowercase the name; keep the group principal id in original case to match the
Authentik group.
benvin merged commit 08fbc9b8ab into main 2026-07-18 22:59:02 +10:00
benvin deleted branch benvin/rancher-grb-name 2026-07-18 22:59:02 +10:00
Sign in to join this conversation.