Closed pauljegouic closed 1 month ago
2024/05/13 12:08:41 Terraform apply |
2024/05/13 12:08:41 Terraform apply | with module.landing_zone.module.iam_account_settings.module.iam_account_settings.ibm_cloud_shell_account_settings.cloud_shell_account_settings,
2024/05/13 12:08:41 Terraform apply | on .terraform/modules/landing_zone.iam_account_settings.iam_account_settings/main.tf line 39, in resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings":
2024/05/13 12:08:41 Terraform apply | 39: resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings" {
2024/05/13 12:08:41 Terraform apply |
2024/05/13 12:08:41 Terraform apply | The plugin encountered an error, and failed to respond to the
2024/05/13 12:08:41 Terraform apply | plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain
2024/05/13 12:08:41 Terraform apply | more details.
2024/05/13 12:08:41 Terraform apply |
was able to reproduce your panic.
in your profile_attachment: can you put the notification block :
resource "ibm_scc_profile_attachment" "scc_profile_attachment_instance" {
...
notifications {
enabled = false
controls {
failed_control_ids = []
threshold_limit = {any number like 15 or 999}
}
}
...
}
Working workaround. Thanks @tyao117
Sure thing @pauljegouic, the attribute notifications
is a Required
attribute. I'm going to write a PR for a doc update.
Reproduced with cloudshell in 1.65.1:
Stack trace from the terraform-provider-ibm_v1.65.1 plugin:
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x2339b1d]
goroutine 151 [running]:
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cloudshell.resourceIBMCloudShellAccountSettingsCreate({0x520fd98, 0xc002404720}, 0x1176592e000?, {0x4885ea0?, 0xc000454000})
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cloudshell/resource_ibm_cloud_shell_account_settings.go:172 +0x6dd
github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider.wrapFunction.func1({0x520fd98?, 0xc002404720?}, 0x0?, {0x4885ea0?, 0xc000454000?})
github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider/provider.go:1533 +0x32
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc0015e7260, {0x520fdd0, 0xc001b65770}, 0xd?, {0x4885ea0, 0xc000454000})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:778 +0x12e
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0xc0015e7260, {0x520fdd0, 0xc001b65770}, 0xc002417790, 0xc0017ee680, {0x4885ea0, 0xc000454000})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:909 +0xa85
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0xc000c3a9c0, {0x520fdd0?, 0xc001b65320?}, 0xc002155b80)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/grpc_provider.go:1060 +0xe8d
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0xc000b00000, {0x520fdd0?, 0xc001b64[630](https://github.com/terraform-ibm-modules/terraform-ibm-account-infrastructure-base/actions/runs/9126603347/job/25095369560#step:7:631)?}, 0xc00241c3f0)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/tf5server/server.go:859 +0x574
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x46fe9e0?, 0xc000b00000}, {0x520fdd0, 0xc001b64630}, 0xc00241c380, 0x0)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:467 +0x170
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0002243c0, {0x521abe0, 0xc000a0e680}, 0xc0019f4fc0, 0xc0015b36e0, 0x726d098, 0x0)
google.golang.org/grpc@v1.57.1/server.go:1358 +0xe23
google.golang.org/grpc.(*Server).handleStream(0xc0002243c0, {0x521abe0, 0xc000a0e680}, 0xc0019f4fc0, 0x0)
google.golang.org/grpc@v1.57.1/server.go:1735 +0xa2f
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/grpc@v1.57.1/server.go:970 +0xca
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.57.1/server.go:981 +0x15c
Error: The terraform-provider-ibm_v1.65.1 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.
}
We just added some extra check to avoid crash I think we still need for backend team to fix the issue
1.66 fix, closing issue
Hello @hkantare
As requested, here is the error we are encountering for few days now.
Note that we also had this issue with other resources: