Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

auth0_connection google-oauth2 import fails if Allowed Mobile Client IDs is empty. #100

Closed
Aurelian-Shuttleworth opened this issue Mar 28, 2022 · 1 comment
Labels
🪲 bug Something isn't working

Comments

@Aurelian-Shuttleworth
Copy link

Describe the problem

When running import on auth0_connection resources using google-oauth2 the import will fail with the error decoding response payload failed: json: cannot unmarshal string into Go struct field ConnectionOptionsGoogleOAuth2.allowed_audiences of type []interface {} unless the field Allowed Mobile Client IDs is not empty.

What was the expected behaviour?

when running terraform import auth0_connection.<name> <id> on a social google-oauth2 resource it completes successfully regardless of Allowed Mobile Client IDs

Reproduction

  1. Create a google-oauth2 social connection with no Allowed Mobile Client IDs set.
  2. Import the auth0_connection.

Temporary Solution

  1. Set an arbitrary client id in the Allowed Mobile Client IDs section of the social connection in the auth0 ui.
  2. Import the resource
  3. Remove the Allowed Mobile Client IDs entry created in step 1.

Environment

terraform version version
Terraform v0.15.5
on darwin_amd64
+ provider registry.terraform.io/alexkappa/auth0 v0.26.2
+ provider registry.terraform.io/hashicorp/random v3.1.2
+ provider registry.terraform.io/hashicorp/vault v3.4.0
@Aurelian-Shuttleworth Aurelian-Shuttleworth added the 🪲 bug Something isn't working label Mar 28, 2022
@sergiught
Copy link
Contributor

Hey @Aurelian-Shuttleworth thanks for opening this issue. The provider uses auth0/go-auth0 under the hood and unfortunately we can't set empty values on any fields currently. It's an issue we'll fix soon and is already tracked through #14. I'll close this down and add it as another reference to that issue as this is a duplicate of that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🪲 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants