Skip to content

Conversation

@SirCortly
Copy link
Collaborator

@SirCortly SirCortly commented Dec 30, 2025

Based off this ticket:
https://jira.cfdata.org/browse/APIOPS-11748

Updates the tiered_cache migration to reflect the following:

1) off - Makes a DELETE request to /zones/%s/cache/tiered_cache_smart_topology_enable and a PATCH request to /zones/%s/argo/tiered_caching with value = off

So for a V4 resource such as: 
resource "cloudflare_tiered_cache" "example" {
  zone_id    = "0da42c8d2132a9ddaf714f9e7c920711"
  cache_type = "off"
}

We will create V5 resources: 
resource "cloudflare_tiered_cache" "example" {
  zone_id    = "0da42c8d2132a9ddaf714f9e7c920711"
  value = "off"
}
resource "cloudflare_argo_tiered_caching" "example" {
  zone_id    = "0da42c8d2132a9ddaf714f9e7c920711"
  value = "off"
}

2) generic - Makes a DELETE request to /zones/%s/cache/tiered_cache_smart_topology_enable and a PATCH request to /zones/%s/argo/tiered_caching with value = on 

So for a V4 resource such as: 
resource "cloudflare_tiered_cache" "example" {
  zone_id    = "0da42c8d2132a9ddaf714f9e7c920711"
  cache_type = "generic"
}

We will create V5 resources: 
resource "cloudflare_tiered_cache" "example" {
  zone_id    = "0da42c8d2132a9ddaf714f9e7c920711"
  value = "off"
}resource "cloudflare_argo_tiered_caching" "example" {
  zone_id    = "0da42c8d2132a9ddaf714f9e7c920711"
  value = "on"
}

3) smart - Makes a PATCH request to /zones/%s/argo/tiered_caching with value = on and a PATCH request to /zones/%s/cache/tiered_cache_smart_topology_enable with value = on

So for a V4 resource such as: 
resource "cloudflare_tiered_cache" "example" {
  zone_id    = "0da42c8d2132a9ddaf714f9e7c920711"
  cache_type = "smart"
}

We will create V5 resources: 
resource "cloudflare_tiered_cache" "example" {
  zone_id    = "0da42c8d2132a9ddaf714f9e7c920711"
  value = "on"
}
resource "cloudflare_argo_tiered_caching" "example" {
  zone_id    = "0da42c8d2132a9ddaf714f9e7c920711"
  value = "on"
}

Also updates cases where cache_type is a variable reference to pull the value of that field from state and continue with the migration based on that value.

@SirCortly SirCortly force-pushed the cortlyons/argo-tiered-cache-update branch from f180376 to 097de79 Compare December 30, 2025 22:12
@SirCortly SirCortly merged commit d56cac5 into main Dec 30, 2025
9 checks passed
@SirCortly SirCortly deleted the cortlyons/argo-tiered-cache-update branch December 30, 2025 22:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants