Removal of zone_name from Cloudflare record response following API deprecation #2068
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Removal of zone_name from Cloudflare record response following API deprecation
Description
Cloudflare deprecated zone_name from individual DNS records on 2024-11-30, as outlined at https://developers.cloudflare.com/fundamentals/api/reference/deprecations/:
Zone information in individual DNS records
Deprecation date: November 30, 2024
Currently, each individual DNS record returned by the API contains information about the zone it is on, specifically the zone ID and name.
{
"result": [
{
// ...
"zone_id": "ab922473c42f4e50819d7c1c9b81b16b",
"zone_name": "example.com"
}
],
// ...
}
This information is redundant because both affected API routes are already within the zone scope. In particular, the zone ID will already be known to any user of these routes because it appears in the URL. The zone name can be retrieved by making a GET request to /zones/:zone_id if it is necessary.
After November 30th, 2024, Cloudflare will stop including the zone_id and zone_name fields on individual DNS records in API responses. These fields are currently ignored when sent to the API as part of a request body, so no changes to request bodies are required.
This is a breaking change in libcloud when fetching records inside zones managed by Cloudflare. This PR removes the check for zone_name attributes in DNS records returned by the Cloudflare API.
Status
Ready for review
Checklist (tick everything that applies)