Closed a-finocchiaro closed 3 weeks ago
Good catch, i'll look into that. Please Provide a Minimal example and what you expect, so I can work with that 👍
@Breee No problem! I think the CRD that gets created by upjet should include decisionStrategy
and logic
in the array of required fields. I'm not super familiar with how upjet works other than having just read the docs a little bit to understand how this project is built, but it seems like it might just be something like this in config/openidclient/config.go
...
p.AddResourceConfigurator("keycloak_openid_client_role_policy", func(r *config.Resource) {
r.ShortGroup = Group
if s, ok := r.TerraformResource.Schema["decisionStrategy"]; ok {
s.Optional = false
s.Computed = false
}
if s, ok := r.TerraformResource.Schema["logic"]; ok {
s.Optional = false
s.Computed = false
}
})
And then that would need to also be replicated on keycloak_openid_client_client_policy
, keycloak_openid_client_group_policy
, and keycloak_openid_client_user_policy
as well I believe.
I'm only basing this off of what I found on the upjet docs too so it's kind of just a guess at what needs to be done. If you'd like I'm more than happy to take a stab at trying to fix it and writing up a PR!
merged #156
new release v1.4.0 is available
Hello!
Thank you so much for maintaining this repository, this provider is awesome and extremely powerful.
Required Fields
In my playing around with it, I have noticed a small issue with the
ClientRolePolicy
resource. The first is that I believe thedecisionStrategy
andlogic
fields should both be required. If you exclude either of these, the keycloak server will respond with a 500 error, and in the keycloak log it will look something like this:In the example above I purposely left out
decisionStrategy
, but a very similar error is thrown by the keycloak server when leaving out thelogic
field.My guess too is that some other
ClientXPolicy
resources have this same issue.