Skip to content
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

VPC Load Balancer resource ID is appended to Pool/Listener/Listener Policy ID #1359

Closed
argeiger opened this issue Apr 22, 2020 · 2 comments
Closed
Assignees

Comments

@argeiger
Copy link

Terraform Version

Terraform v0.12.20

  • provider.ibm v1.4.0
  • provider.template v2.1.2

Affected Resource(s)

  • ibm_is_lb_pool
  • iibm_is_lb_listener
  • ibm_is_lb_listener_policy

Terraform Configuration Files

  # module.vpc.ibm_is_lb_listener.lb_listener["80"] will be updated in-place
  ~ resource "ibm_is_lb_listener" "lb_listener" {
        connection_limit = 0
      ~ default_pool     = "r014-de10f18c-3e01-43a2-8b4f-b66c9483f3d5" -> "r014-18a88f7e-fb34-46f0-9435-147c7dad26a9/r014-de10f18c-3e01-43a2-8b4f-b66c9483f3d5"
        id               = "r014-18a88f7e-fb34-46f0-9435-147c7dad26a9/r014-20dd45d6-7826-4e04-b3dc-4a1a2704cf97"
        lb               = "r014-18a88f7e-fb34-46f0-9435-147c7dad26a9"
        listener_id      = "r014-20dd45d6-7826-4e04-b3dc-4a1a2704cf97"
        port             = 80
        protocol         = "http"
        status           = "active"
    }

  # module.vpc.ibm_is_lb_listener_policy.lb_listener_policy["policy1"] will be created
  + resource "ibm_is_lb_listener_policy" "lb_listener_policy" {
      + action              = "forward"
      + id                  = (known after apply)
      + lb                  = "r014-18a88f7e-fb34-46f0-9435-147c7dad26a9"
      + listener            = "r014-18a88f7e-fb34-46f0-9435-147c7dad26a9/r014-20dd45d6-7826-4e04-b3dc-4a1a2704cf97"
      + name                = "policy1"
      + policy_id           = (known after apply)
      + priority            = 1
      + provisioning_status = (known after apply)
      + target_id           = "r014-18a88f7e-fb34-46f0-9435-147c7dad26a9/r014-de10f18c-3e01-43a2-8b4f-b66c9483f3d5"

      + rules {
          + condition = "contains"
          + rule_id   = (known after apply)
          + type      = "hostname"
          + value     = "adam"
        }
    }

Behavior

The ids of pool/listener/listener policies should not include the Load Balancer ID in front it. After creation or change, you will have to replace the resource since the IDs do not match up. Also from this, the listener policy can not be created since you will get the following error:

Error: Error while creating lb listener policy for LB r014-18a88f7e-fb34-46f0-9435-147c7dad26a9: Error The listener with ID 'r014-7bc6dcf2-3019-4ea6-870e-f55315bcc7e5' cannot be found. Response {404 map[Cf-Cache-Status:[DYNAMIC] Cf-Ray:[588182b6494ae3a2-ATL] Cf-Request-Id:[0244d005ea0000e3a22c081200000001] Connection:[keep-alive] Content-Type:[application/json; charset=utf-8] Date:[Wed, 22 Apr 2020 18:46:58 GMT] Expect-Ct:[max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"] Server:[cloudflare] Set-Cookie:[__cfduid=de160e668a5f2123bb30d3696d8d245f51587581218; expires=Fri, 22-May-20 18:46:58 GMT; path=/; domain=.iaas.cloud.ibm.com; HttpOnly; SameSite=Lax] Transaction-Id:[f989c7d5-5820-463a-ae61-3633ee9a8b4b] Vary:[Accept-Encoding] X-Request-Id:[f989c7d5-5820-463a-ae61-3633ee9a8b4b]] map[errors:[map[code:listener_not_found message:The listener with ID 'r014-7bc6dcf2-3019-4ea6-870e-f55315bcc7e5' cannot be found. more_info:https://cloud.ibm.com/docs/infrastructure/vpc-on-classic?topic=vpc-on-classic-rias-error-messages#listener_not_found target:map[name:listener.id type:field]]] trace:f989c7d5-5820-463a-ae61-3633ee9a8b4b] []}

Steps to Reproduce

Please list the steps required to reproduce the issue, for example:

  1. Create a configuration with a LB/Pool/Listener/Policy
@hkantare
Copy link
Collaborator

hkantare commented May 4, 2020

@umarali-nagoor
Copy link
Collaborator

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

No branches or pull requests

3 participants