Create an Audience Resolve OIDC protocol mapper
mainThe keycloak_openid_audience_resolve_protocol_mapper resource allows you to create an "Audience Resolve" OIDC protocol mapper in Keycloak. This mapper helps automate audience management by using the presence of client roles to determine which audiences should be included in the token, rather than managing them manually.
You can attach this mapper to either a specific Client or a Client Scope.
resource "keycloak_openid_audience_resolve_protocol_mapper" "audience_mapper" {
realm_id = keycloak_realm.realm.id
client_id = keycloak_openid_client.openid_client.id
name = "my-audience-resolve-mapper"
}