Open ocofaigh opened 4 months ago
cc @hkantare
Got the same on other resource @ocofaigh see #5349
1.66.0-beta0 fix the issue, could you confirm ?
May I get a release date of the 1.66, I got some milestones next week.
@pauljegouic We have https://github.com/IBM-Cloud/terraform-provider-ibm/releases/tag/v1.65.1 with the fix for above issue Can this release help you out
Not sure about your fix :
Do you want to perform these actions?
Terraform will perform the actions described above.
Only 'yes' will be accepted to approve.
Enter a value: yes
ibm_cloud_shell_account_settings.cloud_shell_account_settings: Destroying... [id=ac-3f2cae45b0644f6d87aefcf404f5987f]
ibm_cloud_shell_account_settings.cloud_shell_account_settings: Destruction complete after 0s
ibm_cloud_shell_account_settings.cloud_shell_account_settings: Creating...
ibm_cloud_shell_account_settings.cloud_shell_account_settings: Still creating... [10s elapsed]
ibm_cloud_shell_account_settings.cloud_shell_account_settings: Still creating... [20s elapsed]
╷
│ Error: Plugin did not respond
│
│ with ibm_cloud_shell_account_settings.cloud_shell_account_settings,
│ on main.tf line 9, in resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings":
│ 9: resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.
╵
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=0x2 addr=0x0 pc=0x1026fb1e8]
goroutine 125 [running]:
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cloudshell.resourceIBMCloudShellAccountSettingsCreate({0x105489078, 0x1400290f080}, 0x1074c0d20?, {0x10542f560?, 0x14000b0d500})
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cloudshell/resource_ibm_cloud_shell_account_settings.go:172 +0x5e8
github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider.wrapFunction.func1({0x105489078?, 0x1400290f080?}, 0x0?, {0x10542f560?, 0x14000b0d500?})
github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider/provider.go:1533 +0x34
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x1400164b420, {0x1054890b0, 0x14001ff2030}, 0xd?, {0x10542f560, 0x14000b0d500})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:778 +0xe8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x1400164b420, {0x1054890b0, 0x14001ff2030}, 0x14001b1e5b0, 0x140029d2680, {0x10542f560, 0x14000b0d500})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:909 +0x890
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x140001678a8, {0x1054890b0?, 0x140029d1ef0?}, 0x140029b05f0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/grpc_provider.go:1060 +0xb70
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x14000a60280, {0x1054890b0?, 0x140029d16e0?}, 0x140028bcee0)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/tf5server/server.go:859 +0x3b8
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x1052a8800?, 0x14000a60280}, {0x1054890b0, 0x140029d16e0}, 0x140028bce70, 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(0x1400012e000, {0x105493e20, 0x14000b921a0}, 0x140029a4900, 0x140015f56b0, 0x10747fd98, 0x0)
google.golang.org/grpc@v1.57.1/server.go:1358 +0xc88
google.golang.org/grpc.(*Server).handleStream(0x1400012e000, {0x105493e20, 0x14000b921a0}, 0x140029a4900, 0x0)
google.golang.org/grpc@v1.57.1/server.go:1735 +0x82c
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/grpc@v1.57.1/server.go:970 +0xb4
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.57.1/server.go:981 +0x174
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.
@hkantare
definitely not fixing.
➜ test git:(feat/init) ✗ terraform apply --auto-approve
data.ibm_iam_account_settings.iam_account_settings: Reading...
data.ibm_iam_account_settings.iam_account_settings: Read complete after 0s [id=3f2cae45b0644f6d87aefcf404f5987f]
data.ibm_cloud_shell_account_settings.cloud_shell_account_settings: Reading...
data.ibm_cloud_shell_account_settings.cloud_shell_account_settings: Read complete after 2s
Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
+ create
Terraform will perform the following actions:
# ibm_cloud_shell_account_settings.cloud_shell_account_settings will be created
+ resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings" {
+ account_id = "3f2cae45b0644f6d87aefcf404f5987f"
+ created_at = (known after apply)
+ created_by = (known after apply)
+ enabled = false
+ id = (known after apply)
+ rev = (known after apply)
+ type = (known after apply)
+ updated_at = (known after apply)
+ updated_by = (known after apply)
+ features {
+ enabled = (known after apply)
+ key = (known after apply)
}
+ regions {
+ enabled = (known after apply)
+ key = (known after apply)
}
}
Plan: 1 to add, 0 to change, 0 to destroy.
ibm_cloud_shell_account_settings.cloud_shell_account_settings: Creating...
╷
│ Error: Plugin did not respond
│
│ with ibm_cloud_shell_account_settings.cloud_shell_account_settings,
│ on main.tf line 9, in resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings":
│ 9: resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings" {
│
│ The plugin encountered an error, and failed to respond to the plugin.(*GRPCProvider).ApplyResourceChange call. The plugin logs may contain more details.
╵
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=0x2 addr=0x0 pc=0x1024ff1e8]
goroutine 119 [running]:
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cloudshell.resourceIBMCloudShellAccountSettingsCreate({0x10528d078, 0x1400299d260}, 0x1072c4d20?, {0x105233560?, 0x14000a60a80})
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/cloudshell/resource_ibm_cloud_shell_account_settings.go:172 +0x5e8
github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider.wrapFunction.func1({0x10528d078?, 0x1400299d260?}, 0x0?, {0x105233560?, 0x14000a60a80?})
github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider/provider.go:1533 +0x34
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0x140015a2e00, {0x10528d0b0, 0x140029c95f0}, 0xd?, {0x105233560, 0x14000a60a80})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:778 +0xe8
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x140015a2e00, {0x10528d0b0, 0x140029c95f0}, 0x140029bd860, 0x14001bebc00, {0x105233560, 0x14000a60a80})
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/resource.go:909 +0x890
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x140011b1458, {0x10528d0b0?, 0x140029c94d0?}, 0x14001be5bd0)
github.com/hashicorp/terraform-plugin-sdk/v2@v2.29.0/helper/schema/grpc_provider.go:1060 +0xb70
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x14000ade640, {0x10528d0b0?, 0x140029c8ae0?}, 0x1400298d650)
github.com/hashicorp/terraform-plugin-go@v0.19.0/tfprotov5/tf5server/server.go:859 +0x3b8
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x1050ac800?, 0x14000ade640}, {0x10528d0b0, 0x140029c8ae0}, 0x1400298d5e0, 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(0x140001c0000, {0x105297e20, 0x1400021a680}, 0x140029c5200, 0x140015696e0, 0x107283d98, 0x0)
google.golang.org/grpc@v1.57.1/server.go:1358 +0xc88
google.golang.org/grpc.(*Server).handleStream(0x140001c0000, {0x105297e20, 0x1400021a680}, 0x140029c5200, 0x0)
google.golang.org/grpc@v1.57.1/server.go:1735 +0x82c
google.golang.org/grpc.(*Server).serveStreams.func1.1()
google.golang.org/grpc@v1.57.1/server.go:970 +0xb4
created by google.golang.org/grpc.(*Server).serveStreams.func1
google.golang.org/grpc@v1.57.1/server.go:981 +0x174
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.
To reproduce, simply apply the following terraform:
provider "ibm" {
region = "eu-fr2"
ibmcloud_timeout = 60
}
terraform {
required_version = "> 1.0.0, < 1.6.0"
required_providers {
ibm = {
source = "IBM-Cloud/ibm"
version = ">= 1.56.1, < 2.0.0"
}
}
}
data "ibm_iam_account_settings" "iam_account_settings" {
}
data "ibm_cloud_shell_account_settings" "cloud_shell_account_settings" {
account_id = data.ibm_iam_account_settings.iam_account_settings.account_id
}
resource "ibm_cloud_shell_account_settings" "cloud_shell_account_settings" {
rev = data.ibm_cloud_shell_account_settings.cloud_shell_account_settings.rev
account_id = data.ibm_iam_account_settings.iam_account_settings.account_id
enabled = false
}
The backend team is still investigating the issue
any update @hkantare this is becoming a big issue on my side, since it creates us a lot of technical debt (workaround everywhere)
@pauljegouic I'm following up with Cloud shell team. I will provide updates shortly
Thanks @pauljegouic @ocofaigh for your patience guys as a fix was developed. Please test on production and let me know how you get on and if you require anything further in this area. Thank you @hkantare for your help here also, much appreciated.
I confirm on my side. Thanks guys !
When trying to execute the module https://github.com/terraform-ibm-modules/terraform-ibm-iam-account-settings/blob/main/main.tf we saw the provider crash....
Community Note
Terraform CLI and Terraform IBM Provider Version
tf 1.5.7 ibm provider 1.56.1
Affected Resource(s)
Terraform Configuration Files
See https://github.com/terraform-ibm-modules/terraform-ibm-iam-account-settings/blob/main/main.tf
Debug Output
Panic Output
iam-account-settings-module-test-logs-240514-050649.tar.gz
Expected Behavior
Actual Behavior
Steps to Reproduce
terraform apply
Important Factoids
References
0000