Skip to content

feat(rdb): add support for PrivateNetwork and LoadBalancer in Endpoint #1960

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 4 commits into from
Sep 16, 2021
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
32 changes: 17 additions & 15 deletions cmd/scw/testdata/test-all-usage-rdb-instance-create-usage.golden
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,23 @@ USAGE:
scw rdb instance create [arg=value ...]

ARGS:
[project-id] Project ID to use. If none is passed the default project ID will be used
[name=<generated>] Name of the instance
engine Database engine of the database (PostgreSQL, MySQL, ...)
user-name Name of the user created when the instance is created
password Password of the user
node-type=DB-DEV-S Type of node to use for the instance (DB-DEV-S | DB-DEV-M | DB-DEV-L | DB-DEV-XL | DB-GP-XS | DB-GP-S | DB-GP-M | DB-GP-L | DB-GP-XL)
[is-ha-cluster] Whether or not High-Availability is enabled
[disable-backup] Whether or not backups are disabled
[tags.{index}] Tags to apply to the instance
[init-settings.{index}.name]
[init-settings.{index}.value]
[volume-type] Type of volume where data are stored (lssd, bssd, ...) (lssd | bssd)
[volume-size] Volume size when volume_type is not lssd
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)
[project-id] Project ID to use. If none is passed the default project ID will be used
[name=<generated>] Name of the instance
engine Database engine of the database (PostgreSQL, MySQL, ...)
user-name Name of the user created when the instance is created
password Password of the user
node-type=DB-DEV-S Type of node to use for the instance (DB-DEV-S | DB-DEV-M | DB-DEV-L | DB-DEV-XL | DB-GP-XS | DB-GP-S | DB-GP-M | DB-GP-L | DB-GP-XL)
[is-ha-cluster] Whether or not High-Availability is enabled
[disable-backup] Whether or not backups are disabled
[tags.{index}] Tags to apply to the instance
[init-settings.{index}.name]
[init-settings.{index}.value]
[volume-type] Type of volume where data are stored (lssd, bssd, ...) (lssd | bssd)
[volume-size] Volume size when volume_type is not lssd
[init-endpoints.{index}.private-network.private-network-id]
[init-endpoints.{index}.private-network.service-ip]
[organization-id] Organization ID to use. If none is passed the default organization ID will be used
[region=fr-par] Region to target. If none is passed will use default region from the config (fr-par | nl-ams | pl-waw)

FLAGS:
-h, --help help for create
Expand Down
2 changes: 2 additions & 0 deletions docs/commands/rdb.md
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,8 @@ scw rdb instance create [arg=value ...]
| init-settings.{index}.value | | |
| volume-type | One of: `lssd`, `bssd` | Type of volume where data are stored (lssd, bssd, ...) |
| volume-size | | Volume size when volume_type is not lssd |
| init-endpoints.{index}.private-network.private-network-id | | |
| init-endpoints.{index}.private-network.service-ip | | |
| organization-id | | Organization ID to use. If none is passed the default organization ID will be used |
| 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
12 changes: 12 additions & 0 deletions internal/namespaces/rdb/v1/rdb_cli.go
Original file line number Diff line number Diff line change
Expand Up @@ -810,6 +810,18 @@ func rdbInstanceCreate() *core.Command {
Deprecated: false,
Positional: false,
},
{
Name: "init-endpoints.{index}.private-network.private-network-id",
Required: false,
Deprecated: false,
Positional: false,
},
{
Name: "init-endpoints.{index}.private-network.service-ip",
Required: false,
Deprecated: false,
Positional: false,
},
core.OrganizationIDArgSpec(),
core.RegionArgSpec(scw.RegionFrPar, scw.RegionNlAms, scw.RegionPlWaw),
},
Expand Down