Skip to content

Conversation

@uibm
Copy link
Collaborator

@uibm uibm commented Jan 23, 2025

Community Note

  • Please vote on this pull request by adding a 👍 reaction to the original pull request comment 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 pull request followers and do not help prioritize the request

Relates OR Closes #0000

Output from acceptance testing:

$ make testacc TESTARGS='-run=TestAccXXX'

...

@astha-jain
Copy link
Collaborator

Addition of pool causing replacement.

astha@Asthas-MBP vpc-terraform-config % tf plan  
ibm_is_vpc.example: Refreshing state... [id=r134-c910e202-a3cd-4ce3-9ab8-97fbd5ca41e3]
ibm_is_subnet.example: Refreshing state... [id=0716-8ff62bca-d447-47ab-a844-4c8e07ccf440]
ibm_is_lb.example: Refreshing state... [id=r134-43183475-0c99-46e9-be62-27644032892f]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
-/+ destroy and then create replacement

Terraform will perform the following actions:

  # ibm_is_lb.example must be replaced
-/+ resource "ibm_is_lb" "example" {
      ~ access_mode                             = "public" -> (known after apply)
      ~ access_tags                             = [] -> (known after apply)
      ~ availability                            = "subnet" -> (known after apply)
      ~ crn                                     = "crn:v1:staging:public:is:us-south:a/3bf43234b648447d95aa1aee1bc5e73a::load-balancer:r134-43183475-0c99-46e9-be62-27644032892f" -> (known after apply)
      ~ hostname                                = "43183475-us-south.lb.test.appdomain.cloud" -> (known after apply)
      ~ id                                      = "r134-43183475-0c99-46e9-be62-27644032892f" -> (known after apply)
      ~ instance_groups_supported               = true -> (known after apply)
        name                                    = "example-lb"
      ~ operating_status                        = "online" -> (known after apply)
      ~ private_ip                              = [
          - {
              - address       = "10.240.0.4"
              - href          = "https://us-south-stage01.iaasdev.cloud.ibm.com/v1/subnets/0716-8ff62bca-d447-47ab-a844-4c8e07ccf440/reserved_ips/0716-1f49d200-633f-4c94-969a-c5276006ce10"
              - name          = "blouson-energetic-mutate-stagnant"
              - reserved_ip   = "0716-1f49d200-633f-4c94-969a-c5276006ce10"
              - resource_type = "subnet_reserved_ip"
            },
          - {
              - address       = "10.240.0.5"
              - href          = "https://us-south-stage01.iaasdev.cloud.ibm.com/v1/subnets/0716-8ff62bca-d447-47ab-a844-4c8e07ccf440/reserved_ips/0716-e4259998-2606-4b55-bd22-dedf40e19b32"
              - name          = "chased-cornea-mumps-exponent"
              - reserved_ip   = "0716-e4259998-2606-4b55-bd22-dedf40e19b32"
              - resource_type = "subnet_reserved_ip"
            },
        ] -> (known after apply)
      ~ private_ips                             = [
          - "10.240.0.4",
          - "10.240.0.5",
        ] -> (known after apply)
      ~ profile                                 = "dynamic" -> (known after apply)
      ~ public_ips                              = [
          - "169.48.151.79",
          - "174.37.142.142",
        ] -> (known after apply)
      ~ resource_controller_url                 = "https://test.cloud.ibm.com/vpc-ext/network/loadBalancers" -> (known after apply)
      ~ resource_group                          = "8302a7a06e7440d6927383cd7c06e7d2" -> (known after apply)
      ~ resource_group_name                     = "Default" -> (known after apply)
      ~ resource_name                           = "example-lb" -> (known after apply)
      ~ security_group_supported                = true -> (known after apply)
      ~ security_groups                         = [
          - "r134-f977b0df-c3ce-4fbd-852e-ece4169745df",
        ] -> (known after apply)
      ~ source_ip_session_persistence_supported = true -> (known after apply)
      ~ status                                  = "active" -> (known after apply)
      ~ tags                                    = [] -> (known after apply)
      ~ udp_supported                           = false -> (known after apply)
      ~ version                                 = "W/qlfkm8rrmeuoq2eckrv2lkzezhqnvnbusdhsk65wgdnm0xzxe7d4rkwtswtqhzzrib9nwgmylgng7+ywe7bpqa" -> (known after apply)
        # (4 unchanged attributes hidden)

      ~ pools { # forces replacement
          ~ name           = "example-pool2" -> "example-pool3"
            # (3 unchanged attributes hidden)

            # (1 unchanged block hidden)
        }
      + pools { # forces replacement
          + algorithm      = "round_robin"
          + name           = "example-pool33"
          + protocol       = "http"
          + proxy_protocol = "v1"

          + health_monitor {
              + delay       = 60
              + max_retries = 5
              + port        = 238
              + timeout     = 30
              + type        = "http"
              + url_path    = "kkk"
            }
        }

        # (1 unchanged block hidden)
    }

Plan: 1 to add, 0 to change, 1 to destroy.

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform
apply" now.
astha@Asthas-MBP vpc-terraform-config % 

@astha-jain
Copy link
Collaborator

astha@Asthas-MBP vpc-terraform-config % tf plan
ibm_is_vpc.example: Refreshing state... [id=r134-c910e202-a3cd-4ce3-9ab8-97fbd5ca41e3]
ibm_is_subnet.example: Refreshing state... [id=0716-8ff62bca-d447-47ab-a844-4c8e07ccf440]
ibm_is_lb.example: Refreshing state... [id=r134-43183475-0c99-46e9-be62-27644032892f]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # ibm_is_lb.example will be updated in-place
  ~ resource "ibm_is_lb" "example" {
        id                                      = "r134-43183475-0c99-46e9-be62-27644032892f"
        name                                    = "example-lb"
        tags                                    = []
        # (25 unchanged attributes hidden)

      ~ pools {
          ~ name           = "example-pool2" -> "example-pool3"
            # (3 unchanged attributes hidden)

            # (1 unchanged block hidden)
        }

        # (1 unchanged block hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────

Note: You didn't use the -out option to save this plan, so Terraform can't guarantee to take exactly these actions if you run "terraform
apply" now.
astha@Asthas-MBP vpc-terraform-config % tf apply
ibm_is_vpc.example: Refreshing state... [id=r134-c910e202-a3cd-4ce3-9ab8-97fbd5ca41e3]
ibm_is_subnet.example: Refreshing state... [id=0716-8ff62bca-d447-47ab-a844-4c8e07ccf440]
ibm_is_lb.example: Refreshing state... [id=r134-43183475-0c99-46e9-be62-27644032892f]

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  ~ update in-place

Terraform will perform the following actions:

  # ibm_is_lb.example will be updated in-place
  ~ resource "ibm_is_lb" "example" {
        id                                      = "r134-43183475-0c99-46e9-be62-27644032892f"
        name                                    = "example-lb"
        tags                                    = []
        # (25 unchanged attributes hidden)

      ~ pools {
          ~ name           = "example-pool2" -> "example-pool3"
            # (3 unchanged attributes hidden)

            # (1 unchanged block hidden)
        }

        # (1 unchanged block hidden)
    }

Plan: 0 to add, 1 to change, 0 to destroy.

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_is_lb.example: Modifying... [id=r134-43183475-0c99-46e9-be62-27644032892f]
╷
│ Error: Plugin did not respond
│ 
│   with ibm_is_lb.example,
│   on main.tf line 41, in resource "ibm_is_lb" "example":
│   41: resource "ibm_is_lb" "example" {
│ 
│ 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 plugin:

panic: interface conversion: interface {} is nil, not string

goroutine 138 [running]:
github.com/IBM-Cloud/terraform-provider-ibm/ibm/service/vpc.resourceIBMISLBUpdate(0x14003865a80, {0x105be5cc0, 0x140000eb508})
        /Users/astha/Documents/GitHub/ibm-vpc/terraform-provider-ibm/ibm/service/vpc/resource_ibm_is_lb.go:980 +0xfe0
github.com/IBM-Cloud/terraform-provider-ibm/ibm/provider.wrapResource.wrapFunction.func6({0x105c4f1d0?, 0x1400388c3c0?}, 0x1a3185c5000?, {0x105be5cc0?, 0x140000eb508?})
        /Users/astha/Documents/GitHub/ibm-vpc/terraform-provider-ibm/ibm/provider/provider.go:1796 +0x60
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).update(0x1400326da40, {0x105c4f1d0, 0x1400388c3c0}, 0x14003865a80, {0x105be5cc0, 0x140000eb508})
        /Users/astha/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:840 +0xe4
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*Resource).Apply(0x1400326da40, {0x105c4f1d0, 0x1400388c3c0}, 0x14001dd0410, 0x14003865880, {0x105be5cc0, 0x140000eb508})
        /Users/astha/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/resource.go:947 +0x66c
github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema.(*GRPCProviderServer).ApplyResourceChange(0x14000518c90, {0x105c4f1d0?, 0x1400388c300?}, 0x1400383bb80)
        /Users/astha/go/pkg/mod/github.com/hashicorp/terraform-plugin-sdk/[email protected]/helper/schema/grpc_provider.go:1155 +0xa70
github.com/hashicorp/terraform-plugin-go/tfprotov5/tf5server.(*server).ApplyResourceChange(0x1400059aaa0, {0x105c4f1d0?, 0x14003873860?}, 0x140037bb880)
        /Users/astha/go/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/tf5server/server.go:865 +0x294
github.com/hashicorp/terraform-plugin-go/tfprotov5/internal/tfplugin5._Provider_ApplyResourceChange_Handler({0x105adb280, 0x1400059aaa0}, {0x105c4f1d0, 0x14003873860}, 0x14003864a80, 0x0)
        /Users/astha/go/pkg/mod/github.com/hashicorp/[email protected]/tfprotov5/internal/tfplugin5/tfplugin5_grpc.pb.go:611 +0x1c0
google.golang.org/grpc.(*Server).processUnaryRPC(0x1400076a400, {0x105c4f1d0, 0x140038737d0}, {0x105c5c9a0, 0x1400318e340}, 0x14003875b00, 0x140032b3860, 0x10842fc78, 0x0)
        /Users/astha/go/pkg/mod/google.golang.org/[email protected]/server.go:1394 +0xb58
google.golang.org/grpc.(*Server).handleStream(0x1400076a400, {0x105c5c9a0, 0x1400318e340}, 0x14003875b00)
        /Users/astha/go/pkg/mod/google.golang.org/[email protected]/server.go:1805 +0xb08
google.golang.org/grpc.(*Server).serveStreams.func2.1()
        /Users/astha/go/pkg/mod/google.golang.org/[email protected]/server.go:1029 +0x84
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 81
        /Users/astha/go/pkg/mod/google.golang.org/[email protected]/server.go:1040 +0x138

Error: The terraform-provider-ibm 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.

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 this pull request may close these issues.

3 participants