File tree Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Expand file tree Collapse file tree 1 file changed +26
-2
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,9 @@ description: |-
99Creates 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
1517resource "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
2346The 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
3054In 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
You can’t perform that action at this time.
0 commit comments