Repository navigation
Show before/after values for mutating commands (--dry-run diff and post-change summary) #762
workers-devprod
started this conversation in
Feature Requests
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Moved from #202. Originally opened by heredia21 on 2026-10-04.
Summary of the issue
Mutating commands such as
cf dns records edit/update/deletedon't show the resource's previous state.--dry-runprints only the request that would be sent, not what would change. Cloudflare's audit logs don't record the prior value for these edits either: they include the request and the response, but not the state before the change. So after a CLI edit, there's no record anywhere of what the value used to be unless the user captured it manually first.Expected behaviour
--dry-runon edit/update/delete fetches the current resource and shows a field-level diff (e.g.content: 192.0.2.1 → 198.51.100.7) next to the request.--show-diff, includes in JSON output) the before and after values of the fields it changed.This matters most for agent-driven use (the CLI is described as agentic), where a human reviews changes afterwards.
Version of
cfused1.0.0-beta.12
System information and package versions
Linux x86_64, Node.js 26.10.0
Reproduction (optional)
cf dns records edit <record-id> -z <zone> --dry-run --body '{"content":"198.51.100.7"}': output shows only the method, URL and body, not the currentcontent.--dry-run: the output shows only the new record.cf accounts logs audit list --zone-name <zone>: the entry hasresource.requestandresource.response, but no previous value.All reactions