Skip to content

Commit 3a132c2

Browse files
Mia-Crossremyleone
andauthored
feat(dns): import dns zone using file path (#2754)
Co-authored-by: Rémy Léone <[email protected]>
1 parent 8072955 commit 3a132c2

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

cmd/scw/testdata/test-all-usage-dns-zone-import-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ USAGE:
88
ARGS:
99
dns-zone The DNS zone to import
1010
[project-id] Project ID to use. If none is passed the default project ID will be used
11-
[bind-source.content]
11+
[bind-source.content] (Support file loading with @/path/to/file)
1212
[axfr-source.name-server]
1313
[axfr-source.tsig-key.name]
1414
[axfr-source.tsig-key.key]

internal/namespaces/domain/v2beta1/custom.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ func GetCommands() *core.Commands {
2525
dnsRecordDeleteCommand(),
2626
))
2727

28+
cmds.MustFind("dns", "zone", "import").ArgSpecs.GetByName("bind-source.content").CanLoadFile = true
29+
2830
human.RegisterMarshalerFunc(domain.DNSZoneStatus(""), human.EnumMarshalFunc(zoneStatusMarshalSpecs))
2931
human.RegisterMarshalerFunc(domain.SSLCertificateStatus(""), human.EnumMarshalFunc(certificateStatusMarshalSpecs))
3032
return cmds

0 commit comments

Comments
 (0)