Skip to content
Merged
Show file tree
Hide file tree
Changes from 12 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
2 changes: 1 addition & 1 deletion docs/data-sources/vpc_gateway_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ data scaleway_vpc_gateway_network by_gateway_and_pn {
* `gateway_id` - (Optional) ID of the Public Gateway the GatewayNetwork is linked to
* `private_network_id` - (Optional) ID of the Private Network the GatewayNetwork is linked to
* `enable_masquerade` - (Optional) Whether masquerade (dynamic NAT) is enabled on requested GatewayNetwork
* `dhcp_id` - (Optional) ID of the Public Gateway's DHCP configuration
* `dhcp_id` - (Deprecated) ID of the Public Gateway's DHCP configuration

## Attributes Reference

Expand Down
3 changes: 3 additions & 0 deletions docs/data-sources/vpc_public_gateway_dhcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ page_title: "Scaleway: scaleway_vpc_public_gateway_dhcp"

# scaleway_vpc_public_gateway_dhcp

~> **Important:** The data source `scaleway_vpc_public_gateway_dhcp` has been deprecated and will no longer be supported.
In 2023, DHCP functionality was moved from Public Gateways to Private Networks, DHCP resources are now no longer needed.

Gets information about a Public Gateway DHCP configuration.

## Example Usage
Expand Down
4 changes: 4 additions & 0 deletions docs/data-sources/vpc_public_gateway_dhcp_reservation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ page_title: "Scaleway: scaleway_vpc_public_gateway_dhcp_reservation"

# scaleway_vpc_public_gateway_dhcp_reservation

~> **Important:** The data source `scaleway_vpc_public_gateway_dhcp_reservation` has been deprecated and will no longer be supported.
In 2023, DHCP functionality was moved from Public Gateways to Private Networks, DHCP resources are now no longer needed.
You can use IPAM to manage your IPs.

Gets information about a DHCP entry. For further information, please see the
[API documentation](https://www.scaleway.com/en/developers/api/public-gateway/#path-dhcp-entries-list-dhcp-entries).

Expand Down
65 changes: 7 additions & 58 deletions docs/resources/vpc_gateway_network.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ page_title: "Scaleway: scaleway_vpc_gateway_network"

Creates and manages GatewayNetworks (connections between a Public Gateway and a Private Network).

It allows the attachment of Private Networks to Public Gateways and DHCP configurations.
For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/public-gateway/#step-3-attach-private-networks-to-the-vpc-public-gateway).
It allows the attachment of Private Networks to Public Gateways.
For more information, see [the API documentation](https://www.scaleway.com/en/developers/api/public-gateway/#step-3-attach-private-networks-to-the-vpc-public-gateway).

## Example Usage

Expand Down Expand Up @@ -80,71 +80,20 @@ resource scaleway_vpc_gateway_network main {
}
```

### Create a GatewayNetwork with DHCP

```terraform
resource "scaleway_vpc_private_network" "pn01" {
name = "pn_test_network"
}

resource "scaleway_vpc_public_gateway_ip" "gw01" {
}

resource "scaleway_vpc_public_gateway_dhcp" "dhcp01" {
subnet = "192.168.1.0/24"
push_default_route = true
}

resource "scaleway_vpc_public_gateway" "pg01" {
name = "foobar"
type = "VPC-GW-S"
ip_id = scaleway_vpc_public_gateway_ip.gw01.id
}

resource "scaleway_vpc_gateway_network" "main" {
gateway_id = scaleway_vpc_public_gateway.pg01.id
private_network_id = scaleway_vpc_private_network.pn01.id
dhcp_id = scaleway_vpc_public_gateway_dhcp.dhcp01.id
cleanup_dhcp = true
enable_masquerade = true
}
```

### Create a GatewayNetwork with a static IP address

```terraform
resource scaleway_vpc_private_network pn01 {
name = "pn_test_network"
}

resource scaleway_vpc_public_gateway pg01 {
name = "foobar"
type = "VPC-GW-S"
}

resource scaleway_vpc_gateway_network main {
gateway_id = scaleway_vpc_public_gateway.pg01.id
private_network_id = scaleway_vpc_private_network.pn01.id
enable_dhcp = false
enable_masquerade = true
static_address = "192.168.1.42/24"
}
```

## Argument Reference

The following arguments are supported:

- `gateway_id` - (Required) The ID of the Public Gateway.
- `private_network_id` - (Required) The ID of the Private Network.
- `dhcp_id` - (Required) The ID of the Public Gateway DHCP configuration. Only one of `dhcp_id`, `static_address` and `ipam_config` should be specified.
- `enable_masquerade` - (Defaults to true) Whether masquerade (dynamic NAT) should be enabled on this GatewayNetwork
- `enable_dhcp` - (Defaults to true) Whether a DHCP configuration should be enabled on this GatewayNetwork. Requires a DHCP ID.
- `cleanup_dhcp` - (Defaults to false) Whether to remove DHCP configuration on this GatewayNetwork upon destroy. Requires DHCP ID.
- `static_address` - Enable DHCP configration on this GatewayNetwork. Only one of `dhcp_id`, `static_address` and `ipam_config` should be specified.
- `ipam_config` - Auto-configure the GatewayNetwork using Scaleway's IPAM (IP address management service). Only one of `dhcp_id`, `static_address` and `ipam_config` should be specified.
- `push_default_route` - Defines whether to enable the default route on the GatewayNetwork.
- `ipam_ip_id` - Use this IPAM-booked IP ID as the Gateway's IP in this Private Network.
- `enable_masquerade` - (Defaults to true) Whether masquerade (dynamic NAT) should be enabled on this GatewayNetwork
- `dhcp_id` - (Deprecated) Please use `ipam_config`. The ID of the Public Gateway DHCP configuration. Only one of `dhcp_id`, `static_address` and `ipam_config` should be specified.
- `enable_dhcp` - (Deprecated) Please use `ipam_config`. Whether a DHCP configuration should be enabled on this GatewayNetwork. Requires a DHCP ID.
- `cleanup_dhcp` - (Deprecated) Please use `ipam_config`. Whether to remove DHCP configuration on this GatewayNetwork upon destroy. Requires DHCP ID.
- `static_address` - (Deprecated) Please use `ipam_config`. Enable DHCP configration on this GatewayNetwork. Only one of `dhcp_id`, `static_address` and `ipam_config` should be specified.
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the gateway network should be created.

## Attributes Reference
Expand Down
3 changes: 3 additions & 0 deletions docs/resources/vpc_public_gateway_dhcp.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@ page_title: "Scaleway: scaleway_vpc_public_gateway_dhcp"

# Resource: scaleway_vpc_public_gateway_dhcp

~> **Important:** The resource `scaleway_vpc_public_gateway_dhcp` has been deprecated and will no longer be supported.
In 2023, DHCP functionality was moved from Public Gateways to Private Networks, DHCP resources are now no longer needed.

Creates and manages Scaleway VPC Public Gateway DHCP configurations.
For more information, see the [API documentation](https://www.scaleway.com/en/developers/api/public-gateway/#dhcp-c05544).

Expand Down
4 changes: 4 additions & 0 deletions docs/resources/vpc_public_gateway_dhcp_reservation.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ page_title: "Scaleway: scaleway_vpc_public_gateway_dhcp_reservation"

# Resource: scaleway_vpc_public_gateway_dhcp_reservation

~> **Important:** The resource `scaleway_vpc_public_gateway_dhcp_reservation` has been deprecated and will no longer be supported.
In 2023, DHCP functionality was moved from Public Gateways to Private Networks, DHCP resources are now no longer needed.
You can use IPAM to manage your IPs.

Creates and manages [Scaleway DHCP Reservations](https://www.scaleway.com/en/docs/vpc/concepts/#dhcp).

These static associations are used to assign IP addresses based on the MAC addresses of the resource.
Expand Down
10 changes: 5 additions & 5 deletions internal/services/k8s/pool_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -476,18 +476,18 @@ func TestAccPool_PublicIPDisabled(t *testing.T) {
resource "scaleway_vpc_private_network" "public_ip" {
name = "test-k8s-public-ip"
}

resource "scaleway_vpc_public_gateway" "public_ip" {
name = "test-k8s-public-ip"
type = "VPC-GW-S"
}
resource "scaleway_vpc_public_gateway_dhcp" "public_ip" {
subnet = "192.168.0.0/22"
push_default_route = true
}

resource "scaleway_vpc_gateway_network" "public_ip" {
gateway_id = scaleway_vpc_public_gateway.public_ip.id
private_network_id = scaleway_vpc_private_network.public_ip.id
dhcp_id = scaleway_vpc_public_gateway_dhcp.public_ip.id
ipam_config {
push_default_route = true
}
}

resource "scaleway_k8s_cluster" "public_ip" {
Expand Down
Loading
Loading