Closed stmyers closed 1 year ago
Thanks @stmyers , I'll try and get a bug fix release out real quick, there was another panic issue as well that was reported.
Okta internal reference: https://oktainc.atlassian.net/browse/OKTA-586216
I saw the other issue (#1480) you're referencing (I assume) but that is for an older version (3.32) so I think that's unrelated to this issue.
Not going to create another issue -- But going to add one more stack trace here:
3.43.0 / OIE
panic: runtime error: invalid memory address or nil pointer dereference
[signal 0xc0000005 code=0x0 addr=0x28 pc=0x1589fbe]
goroutine 155 [running]:
github.com/okta/terraform-provider-okta/okta.resourcePolicyPasswordDefaultRead({0x1925408?, 0xc000789770?}, 0xc0002d2f80, {0x1689a00?, 0xc0002f9680?})
github.com/okta/terraform-provider-okta/okta/resource_okta_policy_password_default.go:215 +0xfe
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc0004a2fc0, {0x1925440, 0xc0002cb620}, 0xd?, {0x1689a00, 0xc0002f9680})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/resource.go:724 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0004a2fc0, {0x1925440, 0xc0002cb620}, 0xc000881110, {0x1689a00, 0xc0002f9680})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/resource.go:1015 +0x585
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc00068e270, {0x1925440?, 0xc0002cacc0?}, 0xc000886c40)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.25.0/helper/schema/grpc_provider.go:613 +0x4a5
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ReadResource(0xc000246000, {0x1925440?, 0xc00051b980?}, 0xc000053380)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/tf5server/server.go:748 +0x4b1
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler({0x1775e00?, 0xc000246000}, {0x1925440, 0xc00051b980}, 0xc0001a4850, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.14.3/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:349 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0001b61e0, {0x19292b8, 0xc0005841a0}, 0xc000449e60, 0xc00068dce0, 0x1ed39b0, 0x0)
google.golang.org/grpc@v1.51.0/server.go:1340 +0xd33
google.golang.org/grpc.(*Server).handleStream(0xc0001b61e0, {0x19292b8, 0xc0005841a0}, 0xc000449e60, 0x0)
google.golang.org/grpc@v1.51.0/server.go:1713 +0xa36
google.golang.org/grpc.(*Server).serveStreams.func1.2()
google.golang.org/grpc@v1.51.0/server.go:965 +0x98
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.51.0/server.go:963 +0x28a
Error: The terraform-provider-okta_v3.43.0.exe plugin crashed!
Right, that integer pointers fix I brought in to fix JSON serialization of ints opened up a bunch of small bugs. I had been avoiding fixing that. I am working on fix release, hoping to get that out today.
Confirmed that the above stack trace I posted (not the author's original) is fixed via 3.44.0
Community Note
Terraform Version
v1.3.9
Affected Resource(s)
Terraform Configuration Files
Important Factoids
I pinned provider version to 3.42.0 to prevent the panic
Panic Output
Appears to be these lines https://github.com/okta/terraform-provider-okta/blob/3529685f132ddd99c67f92c1e36671e8afb42b20/okta/resource_okta_policy_mfa.go#L155 https://github.com/okta/terraform-provider-okta/blob/3529685f132ddd99c67f92c1e36671e8afb42b20/okta/resource_okta_policy_mfa_default.go#L57