terraform-provider-cloudflare icon indicating copy to clipboard operation
terraform-provider-cloudflare copied to clipboard

[Resources: cloudflare_argo] Tiered Cache Topology selection needed

Open igloo777 opened this issue 4 years ago • 5 comments

Current Terraform version

Terraform version v0.14.4

Description

As in https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/argo - cloudflare provider 2.19.2 supports enabling of tiered_caching and smart_routing, But it doesn't support selection of Tiered Cache Topology for tiered_caching.

Use cases

Currently we have to switch the Tiered Cache Topology in web ui, while the state we keep in terraform.

Potential Terraform configuration

variable "tiered_caching_topology" {
  type = string
  # Value may be "generic" or "smart"
  default = "generic"
}


resource "cloudflare_argo" "example" {
  zone_id        = "d41d8cd98f00b204e9800998ecf8427e"
  tiered_caching = "on"
  tiered_caching_topology = "smart"
  smart_routing  = "off"
}

References

No response

Currently we have to switch the Tiered Cache Topology in web ui, while the state we keep in terraform. The lack of the feature Tiered Cache Topology may be an issue for projects with a large number of domains .

igloo777 avatar Mar 15 '21 04:03 igloo777

At the time of writing, there isn't a public API endpoint support for this so we can't yet add anything to cloudflare-go. Once that lands, we can look at adding support in the Go library before incorporating it here.

jacobbednarz avatar Mar 17 '21 03:03 jacobbednarz

Tracking this issue as Seismic Software has a need for this as well.

toddschilling avatar Apr 20 '21 22:04 toddschilling

This appears to be supported via an undocumented API endpoint.

To enable smart topology:

PATCH /zones/:zone_id/cache/tiered_cache_smart_topology_enable with {"value":"on"}

To enable smart topology and use generic:

PATCH /zones/:zone_id/cache/tiered_cache_smart_topology_enable with {"value":"off"}

AlexKasaku avatar Feb 02 '22 12:02 AlexKasaku

@jacobbednarz any chance to have this feature added to cloudflare-go (and, subsequently, to the CF provider) now that there's an (undocumented) API endpoint for this?

I'm hoping that the fact this API is undocumented should not be an issue, because tiered_caching was also previously implemented against a similarly undocumented API endpoint 😂

borisceranic avatar May 10 '22 07:05 borisceranic

I'm afraid the endpoint needs to be publicly documented before using it in Terraform or the SDK. I'd recommend opening a support ticket to get it routed to the service team to action.

jacobbednarz avatar May 16 '22 02:05 jacobbednarz

FYI @jacobbednarz I got this submitted via a support request, and after a few days got this resolution response:

Thanks for your continued patience. I will close this ticket as we have filed an internal request to get this resolved.

While it doesn't seem to be done yet, hopefully it will be soon.

evanrappe avatar Oct 26 '22 14:10 evanrappe

this has landed in v3.31.0 via #2101

jacobbednarz avatar Dec 28 '22 02:12 jacobbednarz