Skip to content

Commit

Permalink
Allow commas in keycloak_custom_user_federation config (#3)
Browse files Browse the repository at this point in the history
Allow commas in keycloak_custom_user_federation config

User federation config is a MultivaluedMap. A multivalued map
has a key and a list of values.

The correct terraform config would be:
config = {
key = ["value1", "value2"]
}

Changing the config structure to array of strings would break
existing configurations therefore only the first value is
set and taken into account.
  • Loading branch information
PaulGgithub committed Feb 4, 2021
1 parent 490a46b commit 759ad2f
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions provider/resource_keycloak_custom_user_federation_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,20 @@ func TestAccKeycloakCustomUserFederation_customConfig(t *testing.T) {
},
},
})

configValue = configValue + "," + acctest.RandString(10)

resource.Test(t, resource.TestCase{
ProviderFactories: testAccProviderFactories,
PreCheck: func() { testAccPreCheck(t) },
CheckDestroy: testAccCheckKeycloakCustomUserFederationDestroy(),
Steps: []resource.TestStep{
{
Config: testKeycloakCustomUserFederation_customConfig(realmName, name, providerId, configValue),
Check: testAccCheckKeycloakCustomUserFederationExistsWithCustomConfig("keycloak_custom_user_federation.custom", configValue),
},
},
})
}

func TestAccKeycloakCustomUserFederation_createAfterManualDestroy(t *testing.T) {
Expand Down

0 comments on commit 759ad2f

Please # to comment.