Skip to content

Commit b38ec7f

Browse files
committed
fix(instance): cannot create server with project-id
While creating a server with a specific project-id, the request fail at the IP creation step. This is because we provide both a project and an organization while only one of these is expected. We end up with the following error: Error while creating your public IP: scaleway-sdk-go: invalid argument(s): does not respect constraint, Must contain one of ['organization', 'project'] This patch only provides a project since the organization field is deprecated.
1 parent 9e09daf commit b38ec7f

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

internal/namespaces/instance/v1/custom_server_create_builder.go

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,9 @@ func (sb *ServerBuilder) AddIP(ip string) (*ServerBuilder, error) {
185185
switch {
186186
case ip == "" || ip == "new":
187187
sb.createIPReq = &instance.CreateIPRequest{
188-
Zone: sb.createReq.Zone,
189-
Organization: sb.createReq.Project,
190-
Project: sb.createReq.Project,
191-
Type: sb.defaultIPType(),
188+
Zone: sb.createReq.Zone,
189+
Project: sb.createReq.Project,
190+
Type: sb.defaultIPType(),
192191
}
193192
case validation.IsUUID(ip):
194193
sb.createReq.PublicIP = scw.StringPtr(ip)

0 commit comments

Comments
 (0)