Skip to content
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

feat(webhosting): add domain configuration #3696

Merged
merged 2 commits into from
Mar 4, 2024
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,18 @@ USAGE:
scw webhosting hosting create [arg=value ...]

ARGS:
[offer-id] ID of the selected offer for the Web Hosting plan
[project-id] Project ID to use. If none is passed the default project ID will be used
[email] Contact email for the Web Hosting client
[tags.{index}] List of tags for the Web Hosting plan
[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
[option-ids.{index}] IDs of any selected additional options for the Web Hosting plan
[language] Default language for the control panel interface (unknown_language_code | en_US | fr_FR | de_DE)
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)
[offer-id] ID of the selected offer for the Web Hosting plan
[project-id] Project ID to use. If none is passed the default project ID will be used
[email] Contact email for the Web Hosting client
[tags.{index}] List of tags for the Web Hosting plan
[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
[option-ids.{index}] IDs of any selected additional options for the Web Hosting plan
[language] Default language for the control panel interface (unknown_language_code | en_US | fr_FR | de_DE)
[domain-configuration.update-nameservers]
[domain-configuration.update-web-record]
[domain-configuration.update-mail-record]
[domain-configuration.update-all-records]
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams)

FLAGS:
-h, --help help for create
Expand Down
4 changes: 4 additions & 0 deletions docs/commands/webhosting.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,10 @@ scw webhosting hosting create [arg=value ...]
| 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 |
| option-ids.{index} | | IDs of any selected additional options for the Web Hosting plan |
| language | One of: `unknown_language_code`, `en_US`, `fr_FR`, `de_DE` | Default language for the control panel interface |
| domain-configuration.update-nameservers | | |
| domain-configuration.update-web-record | | |
| domain-configuration.update-mail-record | | |
| domain-configuration.update-all-records | | |
| 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 |


Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ require (
github.com/moby/buildkit v0.11.6
github.com/opencontainers/go-digest v1.0.0
github.com/pkg/errors v0.9.1
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.24.0.20240229173245-4c0aa9441e5a
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,8 @@ github.com/rogpeppe/go-internal v1.11.0 h1:cWPaGQEPrBb5/AsnsZesgZZ9yb1OQ+GOISoDN
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.24.0.20240229173245-4c0aa9441e5a h1:iNuAQctWFa9K2Z8w/8kWa7Qjqki1NK+AQI+nbXeSk44=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.24.0.20240229173245-4c0aa9441e5a/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25 h1:/8rfZAdFfafRXOgz+ZpMZZWZ5pYggCY9t7e/BvjaBHM=
github.com/scaleway/scaleway-sdk-go v1.0.0-beta.25/go.mod h1:fCa7OJZ/9DRTnOKmxvT6pn+LPWUptQAmHF/SBJUGEcg=
github.com/sclevine/spec v1.4.0 h1:z/Q9idDcay5m5irkZ28M7PtQM4aOISzOpj4bUPkDee8=
github.com/secure-systems-lab/go-securesystemslib v0.4.0 h1:b23VGrQhTA8cN2CbBw7/FulN9fTtqYUdS5+Oxzt+DUE=
github.com/sergi/go-diff v1.0.0/go.mod h1:0CfEIISq7TuYL3j771MWULgwwjU+GofnZX9QAmXWZgo=
Expand Down
24 changes: 24 additions & 0 deletions internal/namespaces/webhosting/v1alpha1/webhosting_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,30 @@ func webhostingHostingCreate() *core.Command {
Positional: false,
EnumValues: []string{"unknown_language_code", "en_US", "fr_FR", "de_DE"},
},
{
Name: "domain-configuration.update-nameservers",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "domain-configuration.update-web-record",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "domain-configuration.update-mail-record",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "domain-configuration.update-all-records",
Required: false,
Deprecated: false,
Positional: false,
},
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms),
},
Run: func(ctx context.Context, args interface{}) (i interface{}, e error) {
Expand Down
Loading