From 759ad2f059066e98add4861cf4fe76bedb57c932 Mon Sep 17 00:00:00 2001 From: PaulG Date: Sat, 9 Jan 2021 10:25:52 +0200 Subject: [PATCH] Allow commas in keycloak_custom_user_federation config (#3) 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. --- ...esource_keycloak_custom_user_federation_test.go | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/provider/resource_keycloak_custom_user_federation_test.go b/provider/resource_keycloak_custom_user_federation_test.go index 4e59912d3..8a66016f7 100644 --- a/provider/resource_keycloak_custom_user_federation_test.go +++ b/provider/resource_keycloak_custom_user_federation_test.go @@ -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) {