Skip to content

Can't disable proxy_protocol for upcloud loadbalancers #12273

Open
@AlbinB97

Description

@AlbinB97

What happened?

If you change proxy_protocol to true for loadbalancers when using UpCloud and apply, it works and enables it.

If you change proxy_protocol to false for loadbalancers when using UpCloud and apply, it says that it will change outbound_proxy_protocol from "v2" to empty string, but it doesn't actually go through even though the apply says it completes without any errors. It's only when running with TF_LOG=debug that you'll see some warning message, but still no errors. See output below.

[WARN]  Provider "provider[\"registry.terraform.io/upcloudltd/upcloud\"]" produced an unexpected new value for module.kubernetes.upcloud_loadbalancer_backend.lb_backend["public-http"], but we are tolerating it because it is using the legacy plugin SDK.
    The following problems may be the cause of any confusing errors from downstream operations:
      - .properties[0].outbound_proxy_protocol: was cty.StringVal(""), but now cty.StringVal("v2")
module.kubernetes.upcloud_loadbalancer_backend.lb_backend["public-http"]: Modifications complete after 0s [id=IDHERE/lb-backend-http]
2025-05-30T11:51:56.176+0200 [DEBUG] provider.stdio: received EOF, stopping recv loop: err="rpc error: code = Unavailable desc = error reading from server: EOF"
2025-05-30T11:51:56.181+0200 [DEBUG] provider: plugin process exited: path=.terraform/providers/registry.terraform.io/upcloudltd/upcloud/5.9.1/linux_amd64/terraform-provider-upcloud_v5.9.1 pid=9180
2025-05-30T11:51:56.181+0200 [DEBUG] provider: plugin exited

Apply complete! Resources: 0 added, 1 changed, 0 destroyed.

Now if you check the tfstate file, you'll see that outbound_proxy_protocol is still set to "v2", and if you try to apply again with Terraform, it will try to do the same changes again, so it actually never disables it.

Only way to disable it, is to manually enter the UpCloud dashboard and change the outbound_proxy_protocol in the loadbalancer to null.

What did you expect to happen?

I expect Terraform to disable the proxy protocol for UpCloud loadbalancers by changing the outbound_proxy_protocol to null when you set proxy_protocol to false.

How can we reproduce it (as minimally and precisely as possible)?

Enable proxy protocol for loadbalancer on UpCloud using Terraform. Then try to disable it.

OS

Ubuntu 22

Version of Ansible

ansible [core 2.16.11]

Version of Python

3.10.12

Version of Kubespray (commit)

6f74ef1

Network plugin used

calico

Full inventory with variables

Don't want to share, contains sensitive information.

Command used to invoke ansible

Just used terraform

Output of ansible run

did not use ansible, just used terraform

Anything else we need to know

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Ubuntu 22kind/bugCategorizes issue or PR as related to a bug.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions