Skip to content

Commit 085374b

Browse files
committed
fix(dns): consistent TTL on records across devtools
1 parent 2b520b9 commit 085374b

5 files changed

Lines changed: 6 additions & 4 deletions

File tree

cmd/scw/testdata/test-all-usage-dns-record-add-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ARGS:
1717
data
1818
[name]
1919
[priority]
20-
ttl=300
20+
ttl=3600
2121
type (A | AAAA | CNAME | TXT | SRV | TLSA | MX | NS | PTR | CAA | ALIAS | LOC | SSHFP | HINFO | RP | URI | DS | NAPTR)
2222
[comment]
2323
[geo-ip-config.matches.{index}.countries.{index}]

cmd/scw/testdata/test-all-usage-dns-record-set-usage.golden

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ ARGS:
1717
values.{index} A list of values for replacing the record data. (multiple values cannot be used for all type)
1818
name
1919
[priority]
20-
ttl=300
20+
ttl=3600
2121
type (A | AAAA | CNAME | TXT | SRV | TLSA | MX | NS | PTR | CAA | ALIAS | LOC | SSHFP | HINFO | RP | URI | DS | NAPTR)
2222
[comment]
2323
[geo-ip-config.matches.{index}.countries.{index}]

internal/namespaces/domain/v2beta1/custom_record_add.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ func dnsRecordAddCommand() *core.Command {
5151
Required: true,
5252
Deprecated: false,
5353
Positional: false,
54-
Default: core.DefaultValueSetter("300"),
54+
Default: core.DefaultValueSetter(defaultTTL),
5555
},
5656
{
5757
Name: "type",

internal/namespaces/domain/v2beta1/custom_record_set.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ func dnsRecordSetCommand() *core.Command {
5454
Required: true,
5555
Deprecated: false,
5656
Positional: false,
57-
Default: core.DefaultValueSetter("300"),
57+
Default: core.DefaultValueSetter(defaultTTL),
5858
},
5959
{
6060
Name: "type",

internal/namespaces/domain/v2beta1/domain_cli.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,8 @@ var (
1717
_ = scw.RegionFrPar
1818
)
1919

20+
const defaultTTL = "3600"
21+
2022
func GetGeneratedCommands() *core.Commands {
2123
return core.NewCommands(
2224
dnsRoot(),

0 commit comments

Comments
 (0)