Skip to content

Commit

Permalink
fix: update version check for keycloak_default_roles resource (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
mrparkers authored Jan 19, 2022
1 parent 6247d06 commit 4d35953
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion provider/resource_keycloak_default_roles.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ func resourceKeycloakDefaultRolesRead(data *schema.ResourceData, meta interface{
func resourceKeycloakDefaultRolesReconcile(data *schema.ResourceData, meta interface{}) error {
keycloakClient := meta.(*keycloak.KeycloakClient)

if ok, err := keycloakClient.VersionIsGreaterThanOrEqualTo(keycloak.Version_13); !ok && err != nil {
if ok, err := keycloakClient.VersionIsGreaterThanOrEqualTo(keycloak.Version_13); !ok && err == nil {
return errors.New("this resource requires Keycloak v13 or higher")
} else if err != nil {
return err
Expand Down

0 comments on commit 4d35953

Please sign in to comment.