Skip to content

Commit 9ec0d8f

Browse files
yfodilremyleone
andcommitted
doc(instance_private_nic): added zone field doc & fix typo (scaleway#1328)
Co-authored-by: Rémy Léone <[email protected]>
1 parent bf91b11 commit 9ec0d8f

File tree

1 file changed

+26
-2
lines changed

1 file changed

+26
-2
lines changed

docs/resources/instance_private_nic.md

+26-2
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@ description: |-
99
Creates and manages Scaleway Instance Private NICs. For more information, see
1010
[the documentation](https://developers.scaleway.com/en/products/instance/api/#private-nics-a42eea).
1111

12-
## Example
12+
## Examples
13+
14+
### Basic
1315

1416
```hcl
1517
resource "scaleway_instance_private_nic" "pnic01" {
@@ -18,19 +20,41 @@ resource "scaleway_instance_private_nic" "pnic01" {
1820
}
1921
```
2022

23+
### With zone
24+
25+
```hcl
26+
resource scaleway_vpc_private_network pn01 {
27+
name = "private_network_instance"
28+
zone = "fr-par-2"
29+
}
30+
31+
resource "scaleway_instance_server" "base" {
32+
image = "ubuntu_focal"
33+
type = "DEV1-S"
34+
zone = scaleway_vpc_private_network.pn01.zone
35+
}
36+
37+
resource "scaleway_instance_private_nic" "pnic01" {
38+
server_id = scaleway_instance_server.base.id
39+
private_network_id = scaleway_vpc_private_network.pn01.id
40+
zone = scaleway_vpc_private_network.pn01.zone
41+
}
42+
```
43+
2144
## Arguments Reference
2245

2346
The following arguments are required:
2447

2548
- `server_id` - (Required) The ID of the server associated with.
2649
- `private_network_id` - (Required) The ID of the private network attached to.
50+
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the server must be created.
2751

2852
## Attributes Reference
2953

3054
In addition to all above arguments, the following attributes are exported:
3155

3256
- `id` - The ID of the private NIC.
33-
- ``mac_address` - The MAC address of the private NIC.
57+
- `mac_address` - The MAC address of the private NIC.
3458

3559
## Import
3660

0 commit comments

Comments
 (0)