Skip to content

Commit 8f0d10f

Browse files
authored
feat(s2s_vpn): accept custom private interco IPs on connection creation (#2482)
1 parent 1f46eb0 commit 8f0d10f

File tree

4 files changed

+11
-5
lines changed

4 files changed

+11
-5
lines changed

packages_generated/s2s_vpn/src/v1alpha1/api.gen.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
validatePathParam,
1111
waitForResource,
1212
} from '@scaleway/sdk-client'
13-
import { VPN_GATEWAY_TRANSIENT_STATUSES as VPN_GATEWAY_TRANSIENT_STATUSES_S2S_VPN } from './content.gen'
13+
import { VPN_GATEWAY_TRANSIENT_STATUSES as VPN_GATEWAY_TRANSIENT_STATUSES_S2S_VPN } from './content.gen.js'
1414
import {
1515
marshalCreateConnectionRequest,
1616
marshalCreateCustomerGatewayRequest,
@@ -33,7 +33,7 @@ import {
3333
unmarshalRenewConnectionPskResponse,
3434
unmarshalRoutingPolicy,
3535
unmarshalVpnGateway,
36-
} from './marshalling.gen'
36+
} from './marshalling.gen.js'
3737
import type {
3838
Connection,
3939
CreateConnectionRequest,
@@ -72,7 +72,7 @@ import type {
7272
UpdateRoutingPolicyRequest,
7373
UpdateVpnGatewayRequest,
7474
VpnGateway,
75-
} from './types.gen'
75+
} from './types.gen.js'
7676

7777
const jsonContentHeaders = {
7878
'Content-Type': 'application/json; charset=utf-8',

packages_generated/s2s_vpn/src/v1alpha1/content.gen.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
// This file was automatically generated. DO NOT EDIT.
22
// If you have any remark or suggestion do not hesitate to open an issue.
3-
import type { VpnGatewayStatus } from './types.gen'
3+
import type { VpnGatewayStatus } from './types.gen.js'
44

55
/** Lists transient statutes of the enum {@link VpnGatewayStatus}. */
66
export const VPN_GATEWAY_TRANSIENT_STATUSES: VpnGatewayStatus[] = [

packages_generated/s2s_vpn/src/v1alpha1/marshalling.gen.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ import type {
3737
VpnGateway,
3838
VpnGatewayPrivateConfig,
3939
VpnGatewayPublicConfig,
40-
} from './types.gen'
40+
} from './types.gen.js'
4141

4242
const unmarshalBgpSession = (data: unknown): BgpSession => {
4343
if (!isJSONObject(data)) {
@@ -47,6 +47,7 @@ const unmarshalBgpSession = (data: unknown): BgpSession => {
4747
}
4848

4949
return {
50+
peerPrivateIp: data.peer_private_ip,
5051
privateIp: data.private_ip,
5152
routingPolicyId: data.routing_policy_id,
5253
} as BgpSession
@@ -359,6 +360,8 @@ const marshalCreateConnectionRequestBgpConfig = (
359360
request: CreateConnectionRequestBgpConfig,
360361
defaults: DefaultValues,
361362
): Record<string, unknown> => ({
363+
peer_private_ip: request.peerPrivateIp,
364+
private_ip: request.privateIp,
362365
routing_policy_id: request.routingPolicyId,
363366
})
364367

packages_generated/s2s_vpn/src/v1alpha1/types.gen.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ export type VpnGatewayStatus =
9393
export interface BgpSession {
9494
routingPolicyId: string
9595
privateIp: string
96+
peerPrivateIp: string
9697
}
9798

9899
export interface ConnectionCipher {
@@ -110,6 +111,8 @@ export interface VpnGatewayPublicConfig {
110111

111112
export interface CreateConnectionRequestBgpConfig {
112113
routingPolicyId: string
114+
privateIp?: string
115+
peerPrivateIp?: string
113116
}
114117

115118
export interface Connection {

0 commit comments

Comments
 (0)