You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pages/public-gateways/reference-content/understanding-v2.mdx
+38-18Lines changed: 38 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,7 +15,6 @@ categories:
15
15
16
16
TODO CHECK CONSOLE MENTIONS
17
17
TODO CHECK DATES
18
-
TODO ADD TERRAFORM SNIPPETS
19
18
20
19
Scaleway's VPC offering is evolving, and with this comes changes for the Public Gateway product.
21
20
@@ -42,10 +41,17 @@ After a deprecation period ending on 1 Oct 2025, the Public Gateways API v1 and
42
41
43
42
- Ensure that your Public Gateway is in [IPAM mode](#ipam-mode-becomes-default). Only IPAM-mode gateways are compatible with v2.
44
43
45
-
- Put any non-IPAM mode ([legacy](/network/public-gateways/concepts/#ipam)) Public Gateways in IPAM mode, by using the **Move to IPAM mode** button in the console, or the [dedicated API call](TODO).
44
+
- Put any non-IPAM mode ([legacy](/network/public-gateways/concepts/#ipam)) Public Gateways in IPAM mode. You can do this in several ways:
45
+
- Use the **Move to IPAM mode** button in the console
46
+
- Use the [dedicated API call](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateways-put-a-public-gateway-in-ipam-mode).
47
+
- Use the `move_to_ipam` flag in [Terraform](https://github.com/scaleway/terraform-provider-scaleway/blob/master/docs/guides/migration_guide_vpcgw_v2.md)
46
48
47
49
- Update any code or scripts you have that call version 1 of the Public Gateways API, so that they call version 2 instead, and do not refer to [removed functionalities](#introducing-public-gateways-api-v2).
48
50
51
+
<Messagetype="tip">
52
+
If you manage your Public Gateway via Terraform, see our [dedicated guide](https://github.com/scaleway/terraform-provider-scaleway/blob/master/docs/guides/migration_guide_vpcgw_v2.md)
53
+
</Message>
54
+
49
55
If your Public Gateway is already in IPAM mode, and you only manage it via the console, you will not be affected by these changes and you do not need to take any action.
50
56
51
57
## Background: DHCP and IPAM
@@ -54,7 +60,7 @@ When Scaleway originally introduced Public Gateways, they provided DHCP function
54
60
55
61
Scaleway also introduced [IPAM](/network/ipam/concepts/#ipam) to act as a single source of truth for the IP addressing of all Scaleway resources. DHCP uses IPAM to ensure consistent and reliable addressing across all Private Networks.
56
62
57
-
When you [create a Private Network](/network/vpc/how-to/create-private-network/), you can either automatically generate a default IPv4 CIDR block, or define a custom block. A default IPv6 block is automatically created. When you attach resources to the Private Network, they automatically receive an IPv4 address (and, if compatible, an IPv6 address) from this block. Alternatively, you can [reserve a specific IP address](/network/ipam/how-to/reserve-ip/) from the block, and [specify this address](/network/ipam/how-to/reserve-ip/#how-to-attach-a-resource-to-a-private-network-using-a-reserved-ip-address) when attaching the resource. When you reserve a private IP with IPAM, you have the option to attach a MAC address to it. This allows you to use the IP with a custom resource e.g. virtual machines hosted on a Proxmox cluster on an Elastic Metal server.
63
+
When you [create a Private Network](/network/vpc/how-to/create-private-network/), you can either automatically generate a default IPv4 CIDR block, or define a custom block. A default IPv6 block is automatically created. When you attach resources to the Private Network, they automatically receive an IPv4 address (and, if compatible, an IPv6 address) from this block. Alternatively, you can [reserve a specific IP address](/network/ipam/how-to/reserve-ip/) from the block, and [specify this address](/network/ipam/how-to/reserve-ip/#how-to-attach-a-resource-to-a-private-network-using-a-reserved-ip-address) when attaching the resource.
58
64
59
65
Whether you choose a custom or default CIDR block, automatic address assignment or use a reserved address, **the resource's private IP address does not risk changing** unless you detach the resource from the Private Network. To ensure that you can keep the same address for a resource even after detaching it, use the [reserve IP](/network/ipam/how-to/reserve-ip/) functionality.
60
66
@@ -87,7 +93,7 @@ Legacy Public Gateways use a [workaround](/network/vpc/reference-content/vpc-mig
87
93
88
94
Legacy mode will be deprecated going forward, and will not be compatible with v2 of the Public Gateway API. It will no longer be possible to create legacy-mode Public Gateways, all gateways will necessarily be in IPAM mode.
89
95
90
-
If you still have a legacy gateway, you must transition it to IPAM mode so that it is compatible with v2 of the API. Do this by using the **Move to IPAM mode** button in the console, or the [dedicated API call](TODO). This will update the auto-calculated `is_legacy` field and put your gateway in IPAM mode.
96
+
If you still have a legacy gateway, you must [transition it to IPAM mode](#how-do-i-move-my-legacy-public-gateway-to-ipam-mode) so that it is compatible with v2 of the API. This will update the auto-calculated `is_legacy` field and put your gateway in IPAM mode.
91
97
92
98
### Removal of the DHCP object
93
99
@@ -105,7 +111,7 @@ When attaching a Public Gateway to a Private Network (creating a [Gateway Networ
105
111
106
112
**The `address` field does not exist in v2 of the API**. Instead, you can pass an `ipam_ip_id` to specify a reserved IP address to use for a Public Gateway on a Private Network, if you wish. On the Scaleway console, you can select a [reserved IP](/ipam/how-to/reserve-ip/) to use when attaching a Public Gateway to a Private Network. Otherwise, use the default behaviour where IPAM auto-assigns an IP address from the Private Network's CIDR block to the Public Gateway at the moment of attachment.
107
113
108
-
When you use the **Move to IPAM mode** button in the console, or the [dedicated API call](TODO) to move a legacy Public Gateway to IPAM mode, it will keep its current IP address on all attached Private Networks.
114
+
When you [use a dedicated method](#how-do-i-move-my-legacy-public-gateway-to-ipam-mode) to move a legacy Public Gateway to IPAM mode, it will keep its current IP address on all attached Private Networks.
109
115
110
116
### Removal of DHCP entries
111
117
@@ -115,7 +121,7 @@ For some time now, this functionality has been available via the API and develop
115
121
116
122
**DHCP entries do not exist in v2 of the API**. Instead, you can rely on the default IPAM/DHCP functionality as described [above](#background-dhcp-and-ipam). The default behavior will auto-assign IP addresses to resources on the Private Network from the network's CIDR block, or you can use the IP reservation functionality to specify the IP address(es) to assign to each resource.
117
123
118
-
For custom resources, such as VMs hosted on Elastic Metal servers, you can use the IPAM API's [Attach IP to custom resource](https://www.scaleway.com/en/developers/api/ipam/#path-ips-attach-ip-to-custom-resource) method to assign IP addresses on Private Networks. This lets you associate a [reserved IP](https://www.scaleway.com/en/developers/api/ipam/#path-ips-reserve-a-new-ip) address with a resource name and MAC address.
124
+
For custom resources, such as VMs hosted on Elastic Metal servers, we now provide [dedicated functionality](https://www.scaleway.com/en/docs/vpc/how-to/attach-resources-to-pn/) for attaching these to Private Networks. When choosing the **Custom Resource** type, you can specify a MAC address and hostname at the moment of attachment.
119
125
120
126
We will automatically migrate any existing DHCP entries to IPAM for you, at the moment you put a legacy Public Gateway into IPAM mode. TODO STUFF ABOUT LATER ON DETACH/REATTACH
121
127
@@ -137,11 +143,11 @@ TODO CHECK DATES
137
143
-**7 March 2025 2025 - 1 Oct 2025: Migration period**: You have a six month migration period to complete the following actions
138
144
139
145
- Ensure that your Public Gateway is in [IPAM mode](/network/public-gateways/concepts/#ipam). Only IPAM mode gateways are compatible with v2.
140
-
- Put any non-IPAM mode ([legacy](/network/public-gateways/concepts/#ipam)) Public Gateways in IPAM-mode, by using the **Move to IPAM mode** button in the console, or the [dedicated API call](TODO).
141
-
- Ensure that [DHCP is activated](TODO) on all Private Networks attached to your IPAM-mode Public Gateways.
142
-
- Update any code or scripts you have that call version 1 of the Public Gateways API, so that they call version 2 instead. This includes removing any use of the DHCP entries, DHCP objects or address fields as mentioned [above](link).
146
+
- Put any non-IPAM mode ([legacy](/network/public-gateways/concepts/#ipam)) Public Gateways in IPAM-mode, by using the **Move to IPAM mode** button in the console, the [dedicated API call](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateways-put-a-public-gateway-in-ipam-mode), or the `move_to_ipam` flag in [Terraform](https://github.com/scaleway/terraform-provider-scaleway/blob/master/docs/guides/migration_guide_vpcgw_v2.md).
147
+
- Ensure that [DHCP is activated](/vpc/how-to/activate-dhcp/) on all Private Networks attached to your IPAM-mode Public Gateways.
148
+
- Update any code or scripts you have that call version 1 of the Public Gateways API, so that they call version 2 instead. This includes removing any use of the DHCP entries, DHCP objects or address fields as mentioned above.
143
149
144
-
If your Public Gateway is already in IPAM-mode, and you only manage it via the console, you will not be affected by these changes and you do not need to take any action.
150
+
If your Public Gateway is already in IPAMmode, and you only manage it via the console, you will not be affected by these changes and you do not need to take any action.
145
151
146
152
-**1 Oct 2025 - V1 removal**: The Public Gateway v1 API will be removed. Any code or scripts still pointing to v1 will cease to function. We will automatically put any existing legacy Public Gateways into IPAM mode.
147
153
@@ -151,31 +157,33 @@ TODO CHECK DATES
151
157
152
158
- Consider whether you mange your Public Gateway uniquely via the Scaleway console, or via calls to the API/devtools in code and scripts:
153
159
154
-
-**Code and scripts**: If you have any code or scripts that call v1 of the API, or use devtool functionality that is removed from v2 such as DHCP object or entries, **you must take action before 1 Oct 2025**. Update your code and scripts so they point to v2 of the API. [Follow the examples provided for tools such as Terraform](TODO) to rewrite your devtool templates so they do not refer to removed functionalities. Do this in synchronization with moving your gateway to IPAM mode (if necessary).
160
+
-**Code and scripts**: If you have any code or scripts that call v1 of the API, or use devtool functionality that is removed from v2 such as DHCP object or entries, **you must take action before 1 Oct 2025**. Update your code and scripts so they point to v2 of the API. [Follow the examples provided for tools such as Terraform](https://github.com/scaleway/terraform-provider-scaleway/blob/master/docs/guides/migration_guide_vpcgw_v2.md) to rewrite your devtool templates so they do not refer to removed functionalities. Do this in synchronization with moving your gateway to IPAM mode (if necessary).
155
161
156
162
-**Console-only**: You do not need to take any action, except ensuring that your gateway is in IPAM mode.
157
163
158
164
- Check in the [Scaleway console](https://console.scaleway.com/public-gateway/public-gateways) whether your Public Gateway is in IPAM mode or legacy mode:
159
165
160
-
-**Legacy mode**: you must move the gateway to IPAM mode. Only IPAM mode gateways are compatible with v2. Use the **Move to IPAM mode** button in the console, or the [dedicated API call](TODO).
166
+
-**Legacy mode**: you must move the gateway to IPAM mode. Only IPAM mode gateways are compatible with v2. Use the **Move to IPAM mode** button in the console, the [dedicated API call](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateways-put-a-public-gateway-in-ipam-mode), or the `move_to_ipam` flag in [Terraform](https://github.com/scaleway/terraform-provider-scaleway/blob/master/docs/guides/migration_guide_vpcgw_v2.md).
161
167
162
168
-**IPAM mode**: you do not have any action to take, except updating any code and scripts that you have (see above).
163
169
164
170
### How do I move my legacy Public Gateway to IPAM mode?
165
171
166
-
Use the **Move to IPAM mode** button next to your gateway in the [Scaleway console](https://console.scaleway.com/public-gateway/public-gateways), or the [dedicated API call](TODO).
172
+
You can do this in several ways:
167
173
168
-
If you use Terraform to manage your infrastructure as code, modify your templates to reattach your Public Gateways in IPAM mode, and use IPAM functionality to replace any DHCP configurations. Refer to our [Terraform snippets](TODO) for help with this.
174
+
- Use the **Move to IPAM mode** button in the console
175
+
- Use the [dedicated API call](https://www.scaleway.com/en/developers/api/public-gateway/#path-gateways-put-a-public-gateway-in-ipam-mode).
176
+
- Use the `move_to_ipam` flag in [Terraform](https://github.com/scaleway/terraform-provider-scaleway/blob/master/docs/guides/migration_guide_vpcgw_v2.md)
169
177
170
178
### What happens when I move my legacy Public Gateway to IPAM mode?
171
179
172
-
We will detach your Public Gateway from all attached Private Networks, and reattach it in IPAM mode. You can expect downtime of about 10-20 seconds. We will ensure that the IP used for the new attachment is the same as the old one.
180
+
We will detach your Public Gateway from all attached Private Networks, and reattach it in IPAM mode. You can expect downtime of about 10-20 seconds. We will ensure that the IP address used for the new attachment is the same as the old one.
173
181
174
182
### My Public Gateway is already in IPAM mode, do I need to take any action?
175
183
176
184
If you only manage your gateway via the Scaleway console, you do not need to take any action once your gateway is in IPAM mode.
177
185
178
-
If you have any code or scripts that call v1 of the Scaleway Public Gateways API, you must update these to point towards [v2](TODO) before 1 Oct 2025.
186
+
If you have any code or scripts that call v1 of the Scaleway Public Gateways API, you must update these to point towards [v2](https://www.scaleway.com/en/developers/api/public-gateway/) before 1 Oct 2025.
179
187
180
188
### What if I want to keep using my custom gateway DHCP configuration from v1 of the API?
181
189
@@ -185,11 +193,22 @@ Going forward, we expect users who were previously using custom DHCP with a Publ
185
193
186
194
### I use Terraform to manage my Public Gateway, what should I do?
187
195
188
-
If you use Terraform to manage your infrastructure as code, ensure that you are not using any functionality associated with v1 of the API (DHCP objects, DHCP entries or the `address` field). If necessary, modify your templates to reattach your Public Gateways in IPAM mode, and use IPAM functionality to replace any DHCP configurations. Refer to our [Terraform snippets](TODO) for help with this.
196
+
If you use Terraform to manage your infrastructure as code, ensure that you are not using any functionality associated with v1 of the API (DHCP objects, DHCP entries or the `address` field). If necessary, modify your templates to reattach your Public Gateways in IPAM mode with the `move_to_ipam` flag, and use IPAM functionality to replace any DHCP configurations.
197
+
198
+
```
199
+
resource "scaleway_vpc_public_gateway" "main" {
200
+
name = "foobar"
201
+
type = "VPC-GW-S"
202
+
ip_id = scaleway_vpc_public_gateway_ip.main.id
203
+
move_to_ipam = true
204
+
}
205
+
```
206
+
207
+
Refer to our [Terraform migration guide](https://github.com/scaleway/terraform-provider-scaleway/blob/master/docs/guides/migration_guide_vpcgw_v2.md) for full details and help moving legacy gateways to IPAM mode.
189
208
190
209
### Can't I just wait for Scaleway to force the move to IPAM mode?
191
210
192
-
After the 1 Oct 2025 we will carry out a forced action which will move all existing legacy Public Gateways to IPAM mode, and we will remove v1 of the Public Gateways API.
211
+
After 1 Oct 2025 we will carry out a forced action which will move all existing legacy Public Gateways to IPAM mode, and we will remove v1 of the Public Gateways API.
193
212
194
213
We highly recommend that you move to IPAM mode **before** this date, so that you can plan a smooth and synchronized transition at a time that suits you.
195
214
@@ -205,3 +224,4 @@ The following documentation resources may be useful to you:
205
224
-[Public Gateway Main Documentation](https://www.scaleway.com/en/docs/network/public-gateways/)
206
225
-[IPAM API Documentation](https://www.scaleway.com/en/developers/api/ipam/)
207
226
-[IPAM Main Documentation](https://www.scaleway.com/en/docs/network/ipam/)
227
+
-[Moving a Public Gateway from Legacy mode to IPAM mode with Terraform](https://github.com/scaleway/terraform-provider-scaleway/blob/master/docs/guides/migration_guide_vpcgw_v2.md)
0 commit comments