Skip to content

auth0_connection scope not applied #1244

Open
@HugoKNL

Description

@HugoKNL

Checklist

  • I have looked into the README and have not found a suitable solution or answer.
  • I have looked into the documentation and have not found a suitable solution or answer.
  • I have searched the issues and have not found a suitable solution or answer.
  • I have upgraded to the latest version of this provider and the issue still persists.
  • I have searched the Auth0 Community forums and have not found a suitable solution or answer.
  • I agree to the terms within the Auth0 Code of Conduct.

Description

When applying the auth0_connection resource, given you specify scopes as a set of strings (as mentioned in the docs, and not passing validation otherwise), the parsing goes wrong and the scopes end up as an array of strings in the connection instead of one string with the scopes being separated by spaces.

Expectation

I expect to be able to declare the auth0_connection options block's scopes as a set of strings (like the docs prescribe) and then have them being parsed as a whitespace separated string before being applied.

The underlying request should have this syntax:

"scope": "foo bar"

Reproduction

  1. Given you specify the auth0_connection options block's scopes parameter like this:
scopes         = ["foo", "bar"]
  1. When you perform a terraform apply
  2. The scopes are applied as an array of strings
  3. The management dashboard UI shows the strings comma separated and shows an error (cause it needs to be a string)
  4. A GET request on the connection through the management api shows:
"scope": [
      "foo",
      "bar"
    ],
  1. When you update the connection through the management dashboard UI to "foo bar", it'll add the scopes param like this to the request:
"scope": "foo bar"
  1. A GET request on the connection through the management api shows:
"scope": "email openid profile"

Auth0 Terraform Provider version

1.19.1

Terraform version

1.11.2

Metadata

Metadata

Assignees

Labels

🪲 bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions