Skip to content

Commit 13f7734

Browse files
authored
feat(vpc): add subnet documentation (#2013)
1 parent 2243263 commit 13f7734

File tree

2 files changed

+36
-3
lines changed

2 files changed

+36
-3
lines changed

docs/data-sources/vpc_private_network.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ data "scaleway_vpc_private_network" "my_name" {
1717
1818
# Get info by IP ID
1919
data "scaleway_vpc_private_network" "my_id" {
20-
private_network_id_id = "11111111-1111-1111-1111-111111111111"
20+
private_network_id = "11111111-1111-1111-1111-111111111111"
2121
}
2222
```
2323

docs/resources/vpc_private_network.md

+35-2
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,31 @@ For more information, see [the documentation](https://developers.scaleway.com/en
1010

1111
## Example
1212

13+
### Basic
14+
15+
```hcl
16+
resource "scaleway_vpc_private_network" "pn_priv" {
17+
name = "subnet_demo"
18+
tags = ["demo", "terraform"]
19+
}
20+
```
21+
22+
### With subnets
23+
1324
```hcl
1425
resource "scaleway_vpc_private_network" "pn_priv" {
1526
name = "subnet_demo"
1627
tags = ["demo", "terraform"]
28+
29+
ipv4_subnet {
30+
subnet = "192.168.0.0/24"
31+
}
32+
ipv6_subnets {
33+
subnet = "fd46:78ab:30b8:177c::/64"
34+
}
35+
ipv6_subnets {
36+
subnet = "fd46:78ab:30b8:c7df::/64"
37+
}
1738
}
1839
```
1940

@@ -41,8 +62,10 @@ The following arguments are supported:
4162
- `tags` - (Optional) The tags associated with the private network.
4263
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the private network should be created.
4364
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the private network is associated with.
44-
- `ipv4_subnet` - (Optional) The IPv4 subnet associated with the private network.
45-
- `ipv6_subnets` - (Optional) The IPv6 subnets associated with the private network.
65+
- `ipv4_subnet` - (Optional) The IPv4 subnet to associate with the private network.
66+
- `subnet` - (Optional) The subnet CIDR.
67+
- `ipv6_subnets` - (Optional) The IPv6 subnets to associate with the private network.
68+
- `subnet` - (Optional) The subnet CIDR.
4669

4770
-> **Note:** If using Regional Private Network:
4871

@@ -55,6 +78,16 @@ The following arguments are supported:
5578
In addition to all above arguments, the following attributes are exported:
5679

5780
- `id` - The ID of the private network.
81+
- `ipv4_subnet` - The IPv4 subnet associated with the private network.
82+
- `subnet` - The subnet CIDR.
83+
- `id` - The subnet ID.
84+
- `created_at` - The date and time of the creation of the subnet.
85+
- `updated_at` - The date and time of the last update of the subnet.
86+
- `ipv6_subnets` - The IPv6 subnets associated with the private network.
87+
- `subnet` - The subnet CIDR.
88+
- `id` - The subnet ID.
89+
- `created_at` - The date and time of the creation of the subnet.
90+
- `updated_at` - The date and time of the last update of the subnet.
5891

5992
~> **Important:** Private networks' IDs are [zoned](../guides/regions_and_zones.md#resource-ids) or [regional](../guides/regions_and_zones.md#resource-ids) if using beta, which means they are of the form `{zone}/{id}`, e.g. `fr-par-1/11111111-1111-1111-1111-111111111111` or `{region}/{id}`, e.g. `fr-par/11111111-1111-1111-1111-111111111111
6093

0 commit comments

Comments
 (0)