Skip to content

Commit c414b50

Browse files
committed
changelog: add workers terraform, api, and smart placement fixes
1 parent 23c6705 commit c414b50

6 files changed

+132
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
title: Dozens of Cloudflare Terraform Provider resources now have proper drift detection
3+
description: Improper drift detection in the Cloudflare Terraform Provider resulted in dozens of resources always indicating they needed to be updated or replaced.
4+
products:
5+
- fundamentals
6+
date: 2025-03-21T00:00:00Z
7+
---
8+
9+
In [Cloudflare Terraform Provider](https://github.com/cloudflare/terraform-provider-cloudflare) >5.2.0, dozens of resources now have proper drift detection. Before the fix, these resources would indicate they needed to be updated or replaced even if there was no real change.
10+
11+
This issue affected [resources](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs) related to these products and features:
12+
13+
- API Shield
14+
- Argo Smart Routing
15+
- Argo Tiered Caching
16+
- Bot Management
17+
- BYOIP
18+
- D1
19+
- DNS
20+
- Email Routing
21+
- Hyperdrive
22+
- Observatory
23+
- Pages
24+
- R2
25+
- Rules
26+
- SSL/TLS
27+
- Waiting Room
28+
- Workers
29+
- Zero Trust
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
title: Cloudflare Terraform Provider now properly redacts sensitive values
3+
description: Resources in the Cloudflare Terraform Provider that have sensitive properties will not show those values in logs.
4+
products:
5+
- fundamentals
6+
date: 2025-03-21T00:00:00Z
7+
---
8+
9+
In [Cloudflare Terraform Provider](https://github.com/cloudflare/terraform-provider-cloudflare) >5.2.0, resources that have sensitive properties will not have those values show up in logs. This was done by annotating properties in the [Cloudflare OpenAPI Schema](https://raw.githubusercontent.com/cloudflare/api-schemas/refs/heads/main/openapi.yaml) with `x-sensitive: true`. This results in proper auto-generation of the corresponding Terraform resources.
10+
11+
This issue affected [resources](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs) related to these products and features:
12+
13+
- Alerts and Audit Logs
14+
- Device API
15+
- DLP
16+
- DNS
17+
- Magic Visibility
18+
- Magic WAN
19+
- TLS Certs and Hostnames
20+
- Tunnels
21+
- Turnstile
22+
- Workers
23+
- Zaraz
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
title: Added missing Secrets API to docs for Workers and Workers for Platforms
3+
description: The Secrets API for Workers and Workers for Platforms have been added to the Cloudflare API docs.
4+
products:
5+
- workers
6+
- workers-for-platforms
7+
date: 2025-03-18T00:00:00Z
8+
---
9+
10+
The [Workers](https://developers.cloudflare.com/api/resources/workers/subresources/scripts/subresources/secrets/) and [Workers for Platforms](https://developers.cloudflare.com/api/resources/workers_for_platforms/subresources/dispatch/subresources/namespaces/subresources/scripts/subresources/secrets/) secrets APIs are now documented in the Cloudflare OpenAPI docs. They are also available in the API Library SDKs (such as [cloudflare-typescript](https://github.com/cloudflare/cloudflare-typescript) (>4.2.0) and [cloudflare-python](https://github.com/cloudflare/cloudflare-python)) (>4.1.0).
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
title: Terraform "cloudflare_workers_script (Resource)" documents all binding types.
3+
description: Terraform "cloudflare_workers_script (Resource)" bindings docs now show all the available type values.
4+
products:
5+
- workers
6+
date: 2025-03-21T00:00:00Z
7+
---
8+
9+
The [cloudflare_workers_script (Resource)](https://registry.terraform.io/providers/cloudflare/cloudflare/latest/docs/resources/workers_script) in the Cloudflare Terraform Provider docs now auto-generates a list of all the available bindings type values. This was previously not available.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
---
2+
title: Smart Placement will keep optimal placement decisions longer
3+
description: Workers and Pages Functions with Smart Placement enabled will not unexpectedly return to default locations if heuristics are no longer met.
4+
products:
5+
- workers
6+
- pages
7+
date: 2025-03-22T00:00:00Z
8+
---
9+
10+
[Smart Placement](https://developers.cloudflare.com/workers/configuration/smart-placement/) figures out potentially better locations to run Workers and Pages Functions. There are heuristics to get these compute resources placed in optimal locations that are different from default locations (closest to where the request is received). Previously if these heuristics were not consistently met, compute would return to running in default locations. Now after heuristics have been met at least once, dropping below them won't unset optimal locations.
11+
12+
For example in the previous algorithm, a drop in requests for a few days might return to default locations and heuristics would have to be met again. This was problematic for workloads that made requests to a geographically located resource every few days or longer. In this scenario, compute would never get placed optimally. This is no longer the case.
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
title: Workers Routes API returns a correct response
3+
description: Fixed the Workers Routes API always returning "null" for "script" and an empty string for "pattern".
4+
products:
5+
- workers
6+
date: 2025-04-15T00:00:00Z
7+
---
8+
9+
Previously, a request to the Workers [Create Route API](https://developers.cloudflare.com/api/resources/workers/subresources/routes/methods/create/) would always return `null` for "script" and an empty string for "pattern" even if the request was successful. Example request:
10+
11+
```bash
12+
curl https://api.cloudflare.com/client/v4/zones/$CF_ACCOUNT_ID/workers/routes \
13+
-X PUT \
14+
-H "Authorization: Bearer $CF_API_TOKEN" \
15+
-H 'Content-Type: application/json' \
16+
--data '{ "pattern": "example.com/*", "script": "hello-world-script" }'
17+
```
18+
19+
Example bad response:
20+
21+
```
22+
{
23+
"result": {
24+
"id": "bf153a27ba2b464bb9f04dcf75de1ef9",
25+
"pattern": "",
26+
"script": null,
27+
"request_limit_fail_open": false
28+
},
29+
"success": true,
30+
"errors": [],
31+
"messages": []
32+
}
33+
```
34+
35+
Now, it properly returns all values:
36+
37+
```
38+
{
39+
"result": {
40+
"id": "bf153a27ba2b464bb9f04dcf75de1ef9",
41+
"pattern": "example.com/*",
42+
"script": "hello-world-script",
43+
"request_limit_fail_open": false
44+
},
45+
"success": true,
46+
"errors": [],
47+
"messages": []
48+
}
49+
```

0 commit comments

Comments
 (0)