Skip to content

Commit 43d9ad0

Browse files
feat(webhosting): add domain configuration (#3696)
Co-authored-by: Mia-Cross <[email protected]>
1 parent af66e8f commit 43d9ad0

File tree

5 files changed

+43
-11
lines changed

5 files changed

+43
-11
lines changed

cmd/scw/testdata/test-all-usage-webhosting-hosting-create-usage.golden

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,18 @@ USAGE:
66
scw webhosting hosting create [arg=value ...]
77

88
ARGS:
9-
[offer-id] ID of the selected offer for the Web Hosting plan
10-
[project-id] Project ID to use. If none is passed the default project ID will be used
11-
[email] Contact email for the Web Hosting client
12-
[tags.{index}] List of tags for the Web Hosting plan
13-
[domain] Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand
14-
[option-ids.{index}] IDs of any selected additional options for the Web Hosting plan
15-
[language] Default language for the control panel interface (unknown_language_code | en_US | fr_FR | de_DE)
16-
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)
9+
[offer-id] ID of the selected offer for the Web Hosting plan
10+
[project-id] Project ID to use. If none is passed the default project ID will be used
11+
[email] Contact email for the Web Hosting client
12+
[tags.{index}] List of tags for the Web Hosting plan
13+
[domain] Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand
14+
[option-ids.{index}] IDs of any selected additional options for the Web Hosting plan
15+
[language] Default language for the control panel interface (unknown_language_code | en_US | fr_FR | de_DE)
16+
[domain-configuration.update-nameservers]
17+
[domain-configuration.update-web-record]
18+
[domain-configuration.update-mail-record]
19+
[domain-configuration.update-all-records]
20+
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)
1721

1822
FLAGS:
1923
-h, --help help for create

docs/commands/webhosting.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,10 @@ scw webhosting hosting create [arg=value ...]
6767
| domain | | Domain name to link to the Web Hosting plan. You must already own this domain name, and have completed the DNS validation process beforehand |
6868
| option-ids.{index} | | IDs of any selected additional options for the Web Hosting plan |
6969
| language | One of: `unknown_language_code`, `en_US`, `fr_FR`, `de_DE` | Default language for the control panel interface |
70+
| domain-configuration.update-nameservers | | |
71+
| domain-configuration.update-web-record | | |
72+
| domain-configuration.update-mail-record | | |
73+
| domain-configuration.update-all-records | | |
7074
| region | Default: `fr-par`<br />One of: `fr-par`, `nl-ams` | Region to target. If none is passed will use default region from the config |
7175

7276

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ require (
2424
github.com/moby/buildkit v0.11.6
2525
github.com/opencontainers/go-digest v1.0.0
2626
github.com/pkg/errors v0.9.1
27-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.24.0.20240229173245-4c0aa9441e5a
27+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25
2828
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
2929
github.com/spf13/cobra v1.8.0
3030
github.com/spf13/pflag v1.0.5

go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -392,8 +392,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN
392392
github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM=
393393
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06 h1:OkMGxebDjyw0ULyrTYWeN0UNCCkmCWfjPnIA2W6oviI=
394394
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06/go.mod h1:+ePHsJ1keEjQtpvf9HHw0f4ZeJ0TLRsxhunSI2hYJSs=
395-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.24.0.20240229173245-4c0aa9441e5a h1:iNuAQctWFa9K2Z8w/8kWa7Qjqki1NK+AQI+nbXeSk44=
396-
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.24.0.20240229173245-4c0aa9441e5a/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
395+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 h1:/8rfZAdFfafRXOgz+ZpMZZWZ5pYggCY9t7e/BvjaBHM=
396+
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
397397
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
398398
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
399399
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=

internal/namespaces/webhosting/v1alpha1/webhosting_cli.go

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,30 @@ func webhostingHostingCreate() *core.Command {
123123
Positional: false,
124124
EnumValues: []string{"unknown_language_code", "en_US", "fr_FR", "de_DE"},
125125
},
126+
{
127+
Name: "domain-configuration.update-nameservers",
128+
Required: false,
129+
Deprecated: false,
130+
Positional: false,
131+
},
132+
{
133+
Name: "domain-configuration.update-web-record",
134+
Required: false,
135+
Deprecated: false,
136+
Positional: false,
137+
},
138+
{
139+
Name: "domain-configuration.update-mail-record",
140+
Required: false,
141+
Deprecated: false,
142+
Positional: false,
143+
},
144+
{
145+
Name: "domain-configuration.update-all-records",
146+
Required: false,
147+
Deprecated: false,
148+
Positional: false,
149+
},
126150
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms),
127151
},
128152
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {

0 commit comments

Comments
 (0)