opentelekomcloud / terraform-provider-opentelekomcloud

Terraform OpenTelekomCloud provider
https://registry.terraform.io/providers/opentelekomcloud/opentelekomcloud/latest
Mozilla Public License 2.0
85 stars 77 forks source link

ELB Listener creation fails with transparent_client_ip_enable = false #2488

Closed brunoagueda closed 5 months ago

brunoagueda commented 5 months ago

Terraform provider version

Terraform v1.7.3 on linux_amd64

Affected Resource(s)

opentelekomcloud_lb_listener_v2

Terraform Configuration Files

resource "opentelekomcloud_lb_loadbalancer_v2" "lb_1" {
  vip_subnet_id = var.subnet_id
  name          = "tf-testing"
}

resource "opentelekomcloud_lb_listener_v2" "listener_1" {
  name                         = "tf-listener"
  protocol                     = "TCP"
  protocol_port                = 80
  loadbalancer_id              = opentelekomcloud_lb_loadbalancer_v2.lb_1.id
  transparent_client_ip_enable = false

Debug Output/Panic Output

https://gist.github.com/brunoagueda/8b4a07bd0ae949f31508870da38b3e1b

Steps to Reproduce

  1. terraform apply

Expected Behavior

Creation of ELB and Listener with "Transfer Client IP Address" disabled

Actual Behavior

ELB and Listener are created, but the listener is tainted and with "Transfer Client IP Address" enabled, along with the error message: "Invalid input for transparent_client_ip_enable."

Important Factoids

We are using the Swiss Region, I don't know if this is not available on this region. If so, maybe it is good to add this remark on the documentation, and we will raise a feature request for that

References

artem-lifshits commented 5 months ago

Hello @brunoagueda swiss doc only has support for v3 loadbalancers and listeners. So please use opentelekomcloud_lb_listener_v3 and opentelekomcloud_lb_loadbalancer_v3.

Documentation states that transparent_client_ip_enable parameter is always true for all types of listeners, so it's not added in v3 resources:

Screenshot 2024-04-24 at 12 17 16

Doc source: https://docs.sc.otc.t-systems.com/elastic-load-balancing/api-ref/apis/listener/adding_a_listener.html#createlistener

brunoagueda commented 5 months ago

Hello @artem-lifshits I see now that the v3 is under "Dedicated Load Balancer (DLB)", thanks for pointing that out. Since it is not possible to set the transparent_client_ip_enable to false in Swiss region, this issue can be closed. Thanks for the support!