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

v3.13.7 plugin crashed #621

Closed
john-hoffman opened this issue Aug 31, 2021 · 3 comments · Fixed by #622
Closed

v3.13.7 plugin crashed #621

john-hoffman opened this issue Aug 31, 2021 · 3 comments · Fixed by #622

Comments

@john-hoffman
Copy link

Hi,

Code was running fine yesterday. Today ran terraform plan on same code base on got following output:

Stack trace from the terraform-provider-okta_v3.13.7 plugin:

panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x18 pc=0x18ad682]

goroutine 107 [running]:
github.com/okta/terraform-provider-okta/okta.resourcePolicyRuleIdpDiscoveryRead(0x1bf0528, 0xc00053c7e0, 0xc00030c200, 0x199a8e0, 0xc000270ea0, 0xc000657ad0, 0xc0001bf908, 0x100df38)
github.com/okta/terraform-provider-okta/okta/resource_okta_policy_rule_idp_discovery.go:110 +0x522
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).read(0xc0004577a0, 0x1bf04b8, 0xc0003a21c0, 0xc00030c200, 0x199a8e0, 0xc000270ea0, 0x0, 0x0, 0x0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:347 +0x17f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).RefreshWithoutUpgrade(0xc0004577a0, 0x1bf04b8, 0xc0003a21c0, 0xc0003761c0, 0x199a8e0, 0xc000270ea0, 0xc000626390, 0x0, 0x0, 0x0)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:624 +0x1cb
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ReadResource(0xc000490a20, 0x1bf04b8, 0xc0003a21c0, 0xc0003a2200, 0xc0003a21c0, 0x100b665, 0x1a41740)
github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:575 +0x43b
github.com/hashicorp/terraform-plugin-go/tfprotov5/server.(*server).ReadResource(0xc000149d40, 0x1bf0560, 0xc0003a21c0, 0xc00053c300, 0xc000149d40, 0xc000650a20, 0xc00053eba0)
github.com/hashicorp/[email protected]/tfprotov5/server/server.go:298 +0x105
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ReadResource_Handler(0x1a77280, 0xc000149d40, 0x1bf0560, 0xc000650a20, 0xc00053c2a0, 0x0, 0x1bf0560, 0xc000650a20, 0xc000818200, 0x1e2)
github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:344 +0x214
google.golang.org/grpc.(*Server).processUnaryRPC(0xc000232c40, 0x1bf8c78, 0xc000103980, 0xc0000ee100, 0xc0003004b0, 0x20d4830, 0x0, 0x0, 0x0)
google.golang.org/[email protected]/server.go:1194 +0x52b
google.golang.org/grpc.(*Server).handleStream(0xc000232c40, 0x1bf8c78, 0xc000103980, 0xc0000ee100, 0x0)
google.golang.org/[email protected]/server.go:1517 +0xd0c
google.golang.org/grpc.(*Server).serveStreams.func1.2(0xc000302050, 0xc000232c40, 0x1bf8c78, 0xc000103980, 0xc0000ee100)
google.golang.org/[email protected]/server.go:859 +0xab
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/[email protected]/server.go:857 +0x1fd

Error: The terraform-provider-okta_v3.13.7 plugin crashed!

This is always indicative of a bug within the plugin. It would be immensely
helpful if you could report the crash with the plugin's maintainers so that it
can be fixed. The output above should help diagnose the issue.

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

Affected Resource(s)

  • okta_xxx

Terraform Configuration Files

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key: https://keybase.io/hashicorp

Debug Output

Panic Output

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

  • #0000
@bogdanprodan-okta
Copy link
Contributor

Hi @john-hoffman! Thanks for submitting this issue! I'll add a nil check there to avoid this problem.

@bogdanprodan-okta
Copy link
Contributor

@john-hoffman could you also provide the resource example you are using for okta_policy_rule_idp_discovery?

@john-hoffman
Copy link
Author

Hi @bogdanprodan-okta ..I did setup similar to this (terraform-provider-okta/examples/okta_policy_rule_idp_discovery/basic.tf)

data "okta_policy" "idp" {
name = "Idp Discovery Policy"
type = "IDP_DISCOVERY"
}

esource "okta_policy_rule_idp_discovery" "aloha" {
policy_id = "S{data.okta_policy.idp.id}"
name = "Redirect for new"
idp_id = okta_idp_saml.aloha.id
idp_type = "SAML2"
network_connection = "ANYWHERE"
priority = 1
status = "INACTIVE"
user_identifier_type = "ATTRIBUTE"
user_identifier_attribute = "preEnrollmentRequired"

user_identifier_patterns {
match_type = "EQUALS"
value = "true"
}
}

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