Terraform-provider-cloudflare: Missing header in load_balancer_pool

Created on 16 Feb 2021  路  8Comments  路  Source: cloudflare/terraform-provider-cloudflare

Terraform version

Terraform v0.14.2
+ provider registry.terraform.io/cloudflare/cloudflare v2.17.0

Affected resource(s)

  • load_balancer_pool

Expected behavior

Host header can be overriden in load_balancer_pool

https://api.cloudflare.com/#load-balancer-pools-create-pool

[
  {
    "name": "app-server-1",
    "address": "0.0.0.0",
    "enabled": true,
    "weight": 0.56,
    "header": {  <---
      "Host": [
        "example.com"
      ]
    }
  }
]

Actual behavior

header attribute is missing from the load_balancer_pool resource

kinenhancement workflopending-upstream-library

Most helpful comment

I have opened a PR https://github.com/cloudflare/cloudflare-go/pull/603

Hopefully we can get this in ASAP as I need to override the host header myself

All 8 comments

I can confirm that this indeed doesn't work, but not sure if it's a bug or a feature request. The documentation doesn't mention the headers as a valid attribute https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/load_balancer_pool

not a bug; it looks to be a new field seeing how the cloudflare-go library also doesn't have it (and will need it before Terraform can use it) https://github.com/cloudflare/cloudflare-go/blob/4f732091c7c5796a1957288aff22bf90979fe42d/load_balancing.go#L29-L34

I have opened a PR https://github.com/cloudflare/cloudflare-go/pull/603

Hopefully we can get this in ASAP as I need to override the host header myself

@jacobbednarz Does this require a release of another version of cloudflare-go before it can be consumed in this repo?

Yes

Fixed by #1042

Was this page helpful?
0 / 5 - 0 ratings