-
Notifications
You must be signed in to change notification settings - Fork 663
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
Non consistent input type for SCC attachment #5350
Comments
With 1.64:
With 1.65
|
was able to replicate v1.64 issue; the main problem with 1.64 is Stack trace from the terraform-provider-ibm_v1.64.0 plugin:
panic: interface conversion: interface {} is *schema.Set, not []interface {}
goroutine 147 [running]:
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/scc.resourceIbmSccProfileAttachmentMapToAttachmentsPrototype(0x4c9c9a0?)
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/scc/resource_ibm_scc_profile_attachment.go:637 +0x9d4
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/scc.resourceIbmSccProfileAttachmentMapToAttachmentPrototype(0x4c9c9a0?)
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/scc/resource_ibm_scc_profile_attachment.go:841 +0x13b
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/scc.resourceIbmSccProfileAttachmentCreate({0x5d53418, 0xc002952cc0}, 0x0?, {0x53eaee0?, 0xc0001b2000})
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/scc/resource_ibm_scc_profile_attachment.go:310 +0x71f
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).create(0xc0015c0e00, {0x5d53450, 0xc002937c50}, 0xd?, {0x53eaee0, 0xc0001b2000})
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(0xc0015c0e00, {0x5d53450, 0xc002937c50}, 0xc00290dba0, 0xc002942780, {0x53eaee0, 0xc0001b2000})
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(0xc000865068, {0x5d53450?, 0xc002937b30?}, 0xc001a2b130)
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(0xc000b1c0a0, {0x5d53450?, 0xc002937140?}, 0xc002858770)
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({0x52665e0?, 0xc000b1c0a0}, {0x5d53450, 0xc002937140}, 0xc002858700, 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(0xc000b941e0, {0x5d5e2e0, 0xc001678820}, 0xc001d1f8c0, 0xc001656cc0, 0x7d83078, 0x0)
google.golang.org/grpc@v1.57.1/server.go:1358 +0xe23
google.golang.org/grpc.(*Server).handleStream(0xc000b941e0, {0x5d5e2e0, 0xc001678820}, 0xc001d1f8c0, 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.64.0 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. The problem stems from the type mismatch between the actual type and the expected. |
@pauljegouic i might have a workaround for v1.65:
to:
|
@pauljegouic I am currently trying addressing this issue which you reported. A modification was implemented some weeks ago to introduce validation, preventing empty string values in a string list. This update includes support for two string list formats, aligning with UI validation:
In the upcoming fix, we will also include support for the format "["test","tata"]". |
@tyao117 actually I can't. Because those values are actually the subnet's names computed through a datasource. That's why we are doing a jsonencode. |
# WAIT FOR IBM FIX : https://github.com/IBM-Cloud/terraform-provider-ibm/issues/5350
{
parameter_name = "excluded_subnets",
parameter_value = "${jsonencode(module.ibm_vpc.subnet_zone_list[*].name)}"
}, |
@pavanm87 I'd like to get an ETA about the support of Therefore, it prevents me from updating other parts of my DA (especially IAM access groups). I will need to know if I need to release a wordarounded-version on my side, or if it's a matter of days, we can wait. Thanks a lot guys in advance ! |
@pauljegouic We anticipate completing the task by the end of May, indicating that the fix will be accessible in the BNPP region by the month's end. As a temporary solution, we can utilize |
any update @pavanm87 ? |
@pauljegouic This change will be available in BNPP region by May 29th. |
@pavanm87 hello - note that there is a similar issue on |
@nicolascomete This is different issue but what you are saying is it is not allowing Can you please provide the example body which you are trying? |
@pavanm87 I'm saying that the trick does not work for provider in v1.65, v1.65 or v1.66.
This is an example of what fails. It also fails with |
And also can you please provide the error which you are getting @nicolascomete |
Error: CreateRuleWithContext failed Encountered invalid operator value type. Expected []string |
@pauljegouic The fix for this issue has been promoted to BNPP region, verified the fix and looks fine to me. Please check and close it from your end. A fix has been pushed to BNPP, and it works as expected. It now supports the format "["us-south-1", "us-south-2"]" that the client requested, check below. main.tf which I used for testing with the format
Additionally, it maintains UI consistency with the formats "['us-south-1','us-south-2']". Added validation when empty string provided while creating or updating an attachment like below |
Thanks. I confirm, closing the issue |
Hello there,
Please fix the input type for the parameter_value of an SCC attachment.
The doc says that it requires a string_list, but : "[\"value1\",\"value2\"]" who was valid 2 weeks ago (before my holidays) and it's not working now.
I'd like to avoid to stringify complex json structure.
Look like it is an SCC API change since the error also happens on 1.64
The text was updated successfully, but these errors were encountered: