Terraform v0.14.2
+ provider registry.terraform.io/cloudflare/cloudflare v2.17.0
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"
]
}
}
]
header attribute is missing from the load_balancer_pool resource
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
@xenalite @jacobbednarz it has been released https://github.com/cloudflare/cloudflare-go/releases/tag/v0.16.0
https://github.com/cloudflare/cloudflare-go/blob/v0.16.0/load_balancing.go#L36
Fixed by #1042
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