Skip to content

feat(webhosting): replace domain conf options #4583

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 13, 2025
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
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,20 @@ USAGE:
scw webhosting domain sync-dns-records [arg=value ...]

ARGS:
domain Domain for which the DNS records will be synchronized.
[update-web-records] Whether or not to synchronize the web records.
[update-mail-records] Whether or not to synchronize the mail records.
[update-all-records] Whether or not to synchronize all types of records. This one has priority.
[update-nameservers] Whether or not to synchronize domain nameservers.
[custom-records.{index}.name]
[custom-records.{index}.type] (unknown_type | a | cname | mx | txt | ns | aaaa)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
domain Domain for which the DNS records will be synchronized.
[custom-records.{index}.name]
[custom-records.{index}.type] (unknown_type | a | cname | mx | txt | ns | aaaa)
[auto-config-domain-dns.nameservers] Whether or not to synchronize domain nameservers.
[auto-config-domain-dns.web-records] Whether or not to synchronize web records.
[auto-config-domain-dns.mail-records] Whether or not to synchronize mail records.
[auto-config-domain-dns.all-records] Whether or not to synchronize all types of records. Takes priority over the other fields.
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

DEPRECATED ARGS:
[update-web-records] Whether or not to synchronize the web records (deprecated, use auto_config_domain_dns).
[update-mail-records] Whether or not to synchronize the mail records (deprecated, use auto_config_domain_dns).
[update-all-records] Whether or not to synchronize all types of records. This one has priority (deprecated, use auto_config_domain_dns).
[update-nameservers] Whether or not to synchronize domain nameservers (deprecated, use auto_config_domain_dns).

FLAGS:
-h, --help help for sync-dns-records
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ ARGS:
[domain-configuration.update-mail-record]
[domain-configuration.update-all-records]
[skip-welcome-email] Indicates whether to skip a welcome email to the contact email containing hosting info.
[auto-config-domain-dns.nameservers] Whether or not to synchronize domain nameservers.
[auto-config-domain-dns.web-records] Whether or not to synchronize web records.
[auto-config-domain-dns.mail-records] Whether or not to synchronize mail records.
[auto-config-domain-dns.all-records] Whether or not to synchronize all types of records. Takes priority over the other fields.
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
Expand Down
16 changes: 12 additions & 4 deletions docs/commands/webhosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -393,12 +393,16 @@ scw webhosting domain sync-dns-records [arg=value ...]
| Name | | Description |
|------|---|-------------|
| domain | Required | Domain for which the DNS records will be synchronized. |
| update-web-records | | Whether or not to synchronize the web records. |
| update-mail-records | | Whether or not to synchronize the mail records. |
| update-all-records | | Whether or not to synchronize all types of records. This one has priority. |
| update-nameservers | | Whether or not to synchronize domain nameservers. |
| ~~update-web-records~~ | Deprecated | Whether or not to synchronize the web records (deprecated, use auto_config_domain_dns). |
| ~~update-mail-records~~ | Deprecated | Whether or not to synchronize the mail records (deprecated, use auto_config_domain_dns). |
| ~~update-all-records~~ | Deprecated | Whether or not to synchronize all types of records. This one has priority (deprecated, use auto_config_domain_dns). |
| ~~update-nameservers~~ | Deprecated | Whether or not to synchronize domain nameservers (deprecated, use auto_config_domain_dns). |
| custom-records.{index}.name | | |
| custom-records.{index}.type | One of: `unknown_type`, `a`, `cname`, `mx`, `txt`, `ns`, `aaaa` | |
| auto-config-domain-dns.nameservers | | Whether or not to synchronize domain nameservers. |
| auto-config-domain-dns.web-records | | Whether or not to synchronize web records. |
| auto-config-domain-dns.mail-records | | Whether or not to synchronize mail records. |
| auto-config-domain-dns.all-records | | Whether or not to synchronize all types of records. Takes priority over the other fields. |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |


Expand Down Expand Up @@ -507,6 +511,10 @@ scw webhosting hosting create [arg=value ...]
| domain-configuration.update-mail-record | | |
| domain-configuration.update-all-records | | |
| skip-welcome-email | | Indicates whether to skip a welcome email to the contact email containing hosting info. |
| auto-config-domain-dns.nameservers | | Whether or not to synchronize domain nameservers. |
| auto-config-domain-dns.web-records | | Whether or not to synchronize web records. |
| auto-config-domain-dns.mail-records | | Whether or not to synchronize mail records. |
| auto-config-domain-dns.all-records | | Whether or not to synchronize all types of records. Takes priority over the other fields. |
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams`, `pl-waw` | Region to target. If none is passed will use default region from the config |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ require (
github.com/mattn/go-isatty v0.0.20
github.com/moby/buildkit v0.13.2
github.com/opencontainers/go-digest v1.0.0
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250312091247-697a13a38e06
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250312144558-0af04b4e364d
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.9.1
github.com/spf13/pflag v1.0.6
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -458,8 +458,8 @@ github.com/rogpeppe/go-internal v1.11.0/go.mod h1:ddIwULY96R17DhadqLgMfk9H9tvdUz
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250312091247-697a13a38e06 h1:SHt9tWyql2MPgr9f2sCgcLNhiWsGHMjGwePXQBAas38=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250312091247-697a13a38e06/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250312144558-0af04b4e364d h1:crcNANqcAyq7wm80ySMUew10by466BZP57FWCMo8KVw=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.32.0.20250312144558-0af04b4e364d/go.mod h1:792k1RTU+5JeMXm35/e2Wgp71qPH/DmDoZrRc+EFZDk=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/sclevine/spec v1.4.0/go.mod h1:LvpgJaFyvQzRvc1kaDs0bulYwzC70PbiYjC4QnFHkOM=
github.com/secure-systems-lab/go-securesystemslib v0.8.0 h1:mr5An6X45Kb2nddcFlbmfHkLguCE9laoZCUzEEpIZXA=
Expand Down
72 changes: 64 additions & 8 deletions internal/namespaces/webhosting/v1/webhosting_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -752,30 +752,30 @@ func webhostingDomainSyncDNSRecords() *core.Command {
},
{
Name: "update-web-records",
Short: `Whether or not to synchronize the web records.`,
Short: `Whether or not to synchronize the web records (deprecated, use auto_config_domain_dns).`,
Required: false,
Deprecated: false,
Deprecated: true,
Positional: false,
},
{
Name: "update-mail-records",
Short: `Whether or not to synchronize the mail records.`,
Short: `Whether or not to synchronize the mail records (deprecated, use auto_config_domain_dns).`,
Required: false,
Deprecated: false,
Deprecated: true,
Positional: false,
},
{
Name: "update-all-records",
Short: `Whether or not to synchronize all types of records. This one has priority.`,
Short: `Whether or not to synchronize all types of records. This one has priority (deprecated, use auto_config_domain_dns).`,
Required: false,
Deprecated: false,
Deprecated: true,
Positional: false,
},
{
Name: "update-nameservers",
Short: `Whether or not to synchronize domain nameservers.`,
Short: `Whether or not to synchronize domain nameservers (deprecated, use auto_config_domain_dns).`,
Required: false,
Deprecated: false,
Deprecated: true,
Positional: false,
},
{
Expand All @@ -791,6 +791,34 @@ func webhostingDomainSyncDNSRecords() *core.Command {
Positional: false,
EnumValues: []string{"unknown_type", "a", "cname", "mx", "txt", "ns", "aaaa"},
},
{
Name: "auto-config-domain-dns.nameservers",
Short: `Whether or not to synchronize domain nameservers.`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "auto-config-domain-dns.web-records",
Short: `Whether or not to synchronize web records.`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "auto-config-domain-dns.mail-records",
Short: `Whether or not to synchronize mail records.`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "auto-config-domain-dns.all-records",
Short: `Whether or not to synchronize all types of records. Takes priority over the other fields.`,
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down Expand Up @@ -950,6 +978,34 @@ func webhostingHostingCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "auto-config-domain-dns.nameservers",
Short: `Whether or not to synchronize domain nameservers.`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "auto-config-domain-dns.web-records",
Short: `Whether or not to synchronize web records.`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "auto-config-domain-dns.mail-records",
Short: `Whether or not to synchronize mail records.`,
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "auto-config-domain-dns.all-records",
Short: `Whether or not to synchronize all types of records. Takes priority over the other fields.`,
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down
Loading