Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ Format based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), using

- **Block-storage snapshot schedules.** `zcp snapshot schedule` manages policies for a scoped volume. It supports creation, listing, reading, updates, pausing, resuming, immediate runs, and deletion. The CLI rejects VM policies and policies outside the selected region and project before writing.

### Fixed

- `dns record-create` prints one row for the value it created. `dns record-delete` prints a pre-delete snapshot of the selected record set in table, JSON, and YAML output, marked by a `SOURCE` column in tables and `source: pre_delete_snapshot` in structured output. The snapshot may differ from the values deleted if the record set changes concurrently, and the CLI warns when it prints one. Both commands support `--show-zone` to print the resulting zone. CAA matching accepts equivalent numeric flags, tag case, and quoted values. MX output includes its preference, including `0`. `dns show` remains the full-zone read command. If a successful delete cannot identify the previous values, the CLI prints an empty result and a warning.

## [v1.0.1] - 2026-10-11

### Fixed
Expand Down
11 changes: 11 additions & 0 deletions docs/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -439,9 +439,20 @@ zcp dns create --name example.com --project default-9
# Create a record
zcp dns record-create --domain <domain-slug> --name www --type A --content 192.0.2.1
zcp dns record-create --domain <domain-slug> --name @ --type MX --content mail.example.com. --priority 10 --ttl 3600
# Record creation shows the affected value. By default, deletion prints a pre-delete
# snapshot, marked as `Pre-delete snapshot` in table output and
# `source: pre_delete_snapshot` in JSON/YAML, and warns on stderr that concurrent
# changes may make it differ from values actually removed. With --show-zone, deletion
# prints the resulting zone without the snapshot label or warning.
# CAA create matching accepts equivalent numeric flags, tag case, and quoted values.
# If a successful delete cannot identify previous values, it prints an empty result and a warning.
zcp dns record-create --domain <domain-slug> --name www --type A --content 192.0.2.1 --show-zone

# Delete a record set (records are addressed by name and type) or a domain
zcp dns record-delete --domain <domain-slug> --name www --type A
# A fully qualified name ending in a dot can be deleted when the pre-delete read is unavailable.
zcp dns record-delete --domain <domain-slug> --name www.example.com. --type A
zcp dns record-delete --domain <domain-slug> --name www --type A --show-zone
zcp dns delete <domain-slug>
```

Expand Down
2 changes: 1 addition & 1 deletion internal/commands/commands_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1806,7 +1806,7 @@ func TestDNSRecordCreateMXSendsPriorityEndToEnd(t *testing.T) {
if r.Method == http.MethodPost && strings.HasSuffix(r.URL.Path, "/records") {
json.NewDecoder(r.Body).Decode(&gotBody)
w.Header().Set("Content-Type", "application/json")
fmt.Fprint(w, `{"status":"Success","message":"Created","data":{"id":"1","name":"example.com","slug":"example-com-1"}}`)
fmt.Fprint(w, `{"status":"Success","message":"Created","data":{"id":"1","name":"example.com","slug":"example-com-1","records":[{"name":"example.com.","type":"MX","ttl":14400,"contents":["10 mail.example.com."]}]}}`)
return
}
w.WriteHeader(http.StatusNotFound)
Expand Down
Loading
Loading