CiscoDevNet / terraform-provider-mso

Terraform Cisco MSO provider
https://registry.terraform.io/providers/CiscoDevNet/mso/latest/docs
Mozilla Public License 2.0
7 stars 28 forks source link

Crash with `mso_schema_template_external_epg_subnet` resource #236

Closed danischm closed 10 months ago

danischm commented 11 months ago

Community Note

Terraform Version

Provider version: 0.11.0

MSO version

APIC version and APIC Platform for Site Level Resources

Affected Resource(s)

Terraform Plan Output

  + resource "mso_schema_template_external_epg_subnet" "schema_template_external_epg_subnet" {
      + aggregate         = []
      + external_epg_name = "EXT-EPG1"
      + id                = (known after apply)
      + ip                = "0.0.0.0/0"
      + schema_id         = (known after apply)
      + scope             = [
          + "import-security",
        ]
      + template_name     = "TEMPLATE1"
    }

Debug Output

Panic Output

panic: interface conversion: interface {} is nil, not []interface {}

goroutine 136 [running]:
github.com/terraform-providers/terraform-provider-mso/mso.resourceMSOTemplateExtenalepgSubnetRead(0x14000858850, {0x103869120?, 0x1400063d200})
        github.com/terraform-providers/terraform-provider-mso/mso/resource_mso_schema_template_external_epg_subnet.go:258 +0xb60
github.com/terraform-providers/terraform-provider-mso/mso.resourceMSOTemplateExtenalepgSubnetCreate(0x1037732c0?, {0x103869120?, 0x1400063d200})
        github.com/terraform-providers/terraform-provider-mso/mso/resource_mso_schema_template_external_epg_subnet.go:194 +0x548
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Resource).Apply(0x140000f7d60, 0x14000125ae0, 0x140007a5520, {0x103869120, 0x1400063d200})
        github.com/hashicorp/terraform-plugin-sdk@v1.17.1/helper/schema/resource.go:320 +0x3e0
github.com/hashicorp/terraform-plugin-sdk/helper/schema.(*Provider).Apply(0x140000cda00, 0x1400018f960, 0x10349dc00?, 0xf?)
        github.com/hashicorp/terraform-plugin-sdk@v1.17.1/helper/schema/provider.go:294 +0x70
github.com/hashicorp/terraform-plugin-sdk/internal/helper/plugin.(*GRPCProviderServer).ApplyResourceChange(0x1400000f2e8, {0x14000858380?, 0x0?}, 0x14000858380)
        github.com/hashicorp/terraform-plugin-sdk@v1.17.1/internal/helper/plugin/grpc_provider.go:895 +0x6b8
github.com/hashicorp/terraform-plugin-sdk/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x103847fc0?, 0x1400000f2e8}, {0x103883310, 0x14000410180}, 0x14000596e40, 0x0)
        github.com/hashicorp/terraform-plugin-sdk@v1.17.1/internal/tfplugin5/tfplugin5.pb.go:3305 +0x174
google.golang.org/grpc.(*Server).processUnaryRPC(0x14000219180, {0x1038867f0, 0x140000fe480}, 0x1400029ee00, 0x140003911a0, 0x103e3cd40, 0x0)
        google.golang.org/grpc@v1.32.0/server.go:1194 +0xaf0
google.golang.org/grpc.(*Server).handleStream(0x14000219180, {0x1038867f0, 0x140000fe480}, 0x1400029ee00, 0x0)
        google.golang.org/grpc@v1.32.0/server.go:1517 +0x840
google.golang.org/grpc.(*Server).serveStreams.func1.2()
        google.golang.org/grpc@v1.32.0/server.go:859 +0x88
created by google.golang.org/grpc.(*Server).serveStreams.func1
        google.golang.org/grpc@v1.32.0/server.go:857 +0x298

Error: The terraform-provider-mso_v0.11.0 plugin crashed!

Expected Behavior

Actual Behavior

Steps to Reproduce

  1. terraform apply

Important Factoids

References

akinross commented 10 months ago

Hi @danischm, this issue should be fixed in the v.0.11.1. This PR includes the fix for the resource: https://github.com/CiscoDevNet/terraform-provider-mso/commit/dd52850d67ef11fdfdd3fa54606730187a6d8b06. I validate that issue is there in v0.11.0 and is not happening anymore in v.0.11.1. Could you please retest with v.0.11.1, that issue for you also is solved?

danischm commented 10 months ago

Yes, I can confirm the issue is fixed with v0.11.1.