You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I try to create a keycloak_attribute_importer_identity_provider_mapper for a keycloak_saml_identity_provider, Terraform runs into a crash. You can find the repo file in the main.txt attachment.
When I comment out the mapper on the first apply, the Identity Provider is created. If I now uncomment the mapper and apply again, the mapper is created correctly.
But if I try to apply both together, it runs to the crash.log that I've attached.
On top of the callstack I find the following error:
Hi @embody, apologies for getting back to this so late.
The reason this config isn't working is because Terraform is trying to create the keycloak_saml_identity_provider resource in parallel with the keycloak_attribute_importer_identity_provider_mapper resource. You can use variable interpolation within the keycloak_attribute_importer_identity_provider_mapper resource to instruct Terraform to create the SAML identity provider first. The following config should work:
resource"keycloak_saml_identity_provider""production_adfs" {
realm="myRealm"alias="myAlias"enabled=trueentity_id="foo"// this is now a required attribute, so this may be different for yousingle_sign_on_service_url="https://adfs.local/adfs/ls/"
}
resource"keycloak_attribute_importer_identity_provider_mapper""lastName_mapper" {
realm="myRealm"name="last_name"identity_provider_alias=keycloak_saml_identity_provider.production_adfs.aliasattribute_name="http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname"user_attribute="lastName"
}
That being said, the provider shouldn't ever panic, even with a bad configuration, so I submitted #556 to fix this.
When I try to create a keycloak_attribute_importer_identity_provider_mapper for a keycloak_saml_identity_provider, Terraform runs into a crash. You can find the repo file in the main.txt attachment.
When I comment out the mapper on the first apply, the Identity Provider is created. If I now uncomment the mapper and apply again, the mapper is created correctly.
But if I try to apply both together, it runs to the crash.log that I've attached.
On top of the callstack I find the following error:
Error: rpc error: code = Unavailable desc = transport is closingpanic: runtime error: invalid memory address or nil pointer dereference 2021-01-27T16:22:24.411+0100 [DEBUG] plugin.terraform-provider-keycloak_v2.2.0.exe: [signal 0xc0000005 code=0x0 addr=0x8 pc=0xaae32e] 2021-01-27T16:22:24.411+0100 [DEBUG] plugin.terraform-provider-keycloak_v2.2.0.exe: 2021-01-27T16:22:24.411+0100 [DEBUG] plugin.terraform-provider-keycloak_v2.2.0.exe: goroutine 100 [running]: 2021-01-27T16:22:24.411+0100 [DEBUG] plugin.terraform-provider-keycloak_v2.2.0.exe: github.com/mrparkers/terraform-provider-keycloak/keycloak.(*KeycloakClient).NewIdentityProviderMapper(0xc00011c420, 0x0, 0xc00011c420, 0x0)
Am I doing something unintended here or is this a bug?
crash.log
main.txt
The text was updated successfully, but these errors were encountered: