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

data okta_network_zone fails to retrieve information #1994

Closed
JBorregoE opened this issue May 21, 2024 · 6 comments · Fixed by #2057
Closed

data okta_network_zone fails to retrieve information #1994

JBorregoE opened this issue May 21, 2024 · 6 comments · Fixed by #2057

Comments

@JBorregoE
Copy link

JBorregoE commented May 21, 2024

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

Terraform v1.8.2
on darwin_amd64

  • provider registry.terraform.io/okta/okta v4.8.1

Affected Resource(s)

  • data okta_network_zone

Terraform Configuration Files

data okta_network_zone barcelona_netzone {
  name = "Barcelona"
}

Debug Output


│ Error: failed to find network zone: json: cannot unmarshal object into Go struct field NetworkZone.locations of type []*sdk.NetworkZoneLocation

│ with data.okta_network_zone.barcelona_netzone,
│ on okta-network_zones.tf line 43, in data "okta_network_zone" "barcelona_netzone":
│ 43: data okta_network_zone barcelona_netzone {

Expected Behavior

data okta_network_zone retrieves the information from the existing zones without any issue.

Can this be done in the Admin UI?

I don't know

Can this be done in the actual API call?

I don't know

Actual Behavior

data okta_network_zones produces an error.

Steps to Reproduce

  1. Define a data okta_network_zone resource that exists in Okta.
  2. terraform plan or terraform apply
  3. The resource is not reachable.

Important Factoids

We run a task daily to monitor changes on Okta, and this morning failed for the first time. However, there were no recent changes in our environment.

@JBorregoE
Copy link
Author

We reorganised our repository and imported the zones into the state. Using the resource okta_network_zone instead of the data block did not fail.
If this issue is not causing troubles for anyone else can be closed. Otherwise, happy to provide extra information if needed.

@Abajaj-dh
Copy link

I am also experiencing the same issue. There is no change in the repository or version. The data object still works with id but not with the name.

@duytiennguyen-okta
Copy link
Contributor

@Abajaj-dh do you have the log when you run TF_LOG=debug terraform apply?

@Abajaj-dh
Copy link

Abajaj-dh commented Jul 26, 2024

Hi @duytiennguyen-okta - yes, I've exported the logs. But it's quite huge. I've shared the specific log related to network zone.
ErrorLog1.txt

@duytiennguyen-okta
Copy link
Contributor

It should be fixed with #2057

@Abajaj-dh
Copy link

Abajaj-dh commented Aug 8, 2024 via email

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.

3 participants