Open horus opened 1 year ago
Hello,
Related module: data_source_keycloak_client_description_converter Version tested: 3.10.0, 4.0.0
data_source_keycloak_client_description_converter
data "keycloak_client_description_converter" "saml_client" { realm_id = keycloak_realm.realm.id body = file("./saml-metadata.xml") }
With this example, we expected protocol mappers to be saved in example.tfstate as:
example.tfstate
"origin": "", "protocol": "saml", "protocol_mappers": [ { "config": { "attribute.name": "https://aws.amazon.com/SAML/Attributes/Role", "friendly.name": "RoleEntitlement" }, "id": "", "name": "https://aws.amazon.com/SAML/Attributes/Role", "protocol": "saml", "protocol_mapper": "saml-user-attribute-mapper" },
Actual result:
"protocol_mappers": []
The Keycloak API /{realm}/client-description-converter responded correctly.
/{realm}/client-description-converter
Example error message with TF_LOG=TRACE on:
TF_LOG=TRACE
2022-10-10T18:56:18.778+0800 [INFO] provider.terraform-provider-keycloak_v3.10.0: 2022/10/10 18:56:18 [ERROR] setting state: Invalid address to set: []string{"protocol_mappers", "0", "ProtocolMapper"}: timestamp=2022-10-10T18:56:18.775+0800
I've prepared an potential fix for the issue here: https://github.com/horus/terraform-provider-keycloak/commit/32d1e31793c40e4c41fc1122999e6aa87a284131. If there's anything I could help please let me know. Thank you!
@mrparkers, i'm facing the same issue, is there any change to support the protocol mappers?
Hello,
Related module:
data_source_keycloak_client_description_converter
Version tested: 3.10.0, 4.0.0With this example, we expected protocol mappers to be saved in
example.tfstate
as:Actual result:
The Keycloak API
/{realm}/client-description-converter
responded correctly.Example error message with
TF_LOG=TRACE
on:I've prepared an potential fix for the issue here: https://github.com/horus/terraform-provider-keycloak/commit/32d1e31793c40e4c41fc1122999e6aa87a284131. If there's anything I could help please let me know. Thank you!