alexkappa/terraform-provider-auth0

auth0_connections.options.fields_map is very limited

yarinm opened this issue · 1 comments

I'm trying to create a SAML connection with the following fields_map (which is valid if I create it via the API):

{
        "name": [
          "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name",
          "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
        ],
        "email": [
          "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress",
          "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/nameidentifier"
        ],
        "given_name": [
          "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/givenname",
          "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/name"
        ],
        "samlGroups": [
          "groups",
          "http://schemas.microsoft.com/ws/2008/06/identity/claims/groups"
        ],
        "family_name": "http://schemas.xmlsoap.org/ws/2005/05/identity/claims/surname",
      }

For some reason fields_map in the provider is defined as a simple map of strings:

				"fields_map": {
					Type:        schema.TypeMap,
					Elem:        &schema.Schema{Type: schema.TypeString},
					Optional:    true,
					Description: "If you're configuring a SAML enterprise connection for a non-standard PingFederate Server, you must update the attribute mappings.",
				},

It would be nice if the elem schema could be a string or list of strings or better yet just make this a JSON field

We have moved this issue over at auth0/terraform-provider-auth0#53 as this repo is now maintained at https://github.com/auth0/terraform-provider-auth0.