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

"Cannot unmarshal array into Go value of type okta.NetworkZone" while creating dynamic zone #584

Closed
patoarvizu opened this issue Aug 15, 2021 · 4 comments · Fixed by #586

Comments

@patoarvizu
Copy link

patoarvizu commented Aug 15, 2021

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

v0.13.5

Affected Resource(s)

Terraform Configuration Files

resource okta_network_zone tor {
  name               = "TOR Blocker"
  type               = "DYNAMIC"
  usage              = "BLOCKLIST"
  dynamic_proxy_type = "TorAnonymizer"
}

Debug Output

https://gist.github.com/patoarvizu/134d058b633e26c076f2551cc0b35b83

Panic Output

Expected Behavior

The dynamic zone is created.

Actual Behavior

Terraform returns the error Error: failed to get network zone: json: cannot unmarshal array into Go value of type okta.NetworkZone. The zone does get created in Okta itself, but is not in the Terraform state, so attempting to run terraform apply again would result in Terraform trying to create the resource again.

This seems to only happen for network zones of type = "DYNAMIC".

Steps to Reproduce

  1. Create resource as described above (it's almost identical to the example in the provider documentation, here).
  2. Run terraform apply.

Important Factoids

This is on an Okta Developer/Starter plan.

References

  • #0000
@patoarvizu
Copy link
Author

Actually, I was also able to reproduce this with a network zone of type = "IP". The strange thing in this case is that the resource definition was exactly identical to one I was successfully able to create just a few minutes before it started failing.

@bogdanprodan-okta
Copy link
Contributor

Hi @patoarvizu! Thanks for submitting this issue! I'll try to reproduce the bug and get back to you asap.

@patoarvizu
Copy link
Author

Thanks!! 👍

@bogdanprodan-okta
Copy link
Contributor

@patoarvizu will be released today.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants