Skip to content

Commit 66f16ff

Browse files
committed
add doc
1 parent 6374f8f commit 66f16ff

File tree

1 file changed

+28
-0
lines changed

1 file changed

+28
-0
lines changed

docs/resources/ipam_ip.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,31 @@ resource "scaleway_ipam_ip" "ip01" {
7676
}
7777
```
7878

79+
### Book an IP for a custom resource
80+
81+
```terraform
82+
resource "scaleway_vpc" "vpc01" {
83+
name = "my vpc"
84+
}
85+
86+
resource "scaleway_vpc_private_network" "pn01" {
87+
vpc_id = scaleway_vpc.vpc01.id
88+
ipv4_subnet {
89+
subnet = "172.16.32.0/22"
90+
}
91+
}
92+
93+
resource "scaleway_ipam_ip" "ip01" {
94+
address = "172.16.32.7"
95+
source {
96+
private_network_id = scaleway_vpc_private_network.pn01.id
97+
}
98+
custom_resource {
99+
mac_address = "bc:24:11:74:d0:6a"
100+
}
101+
}
102+
```
103+
79104
## Argument Reference
80105

81106
The following arguments are supported:
@@ -90,6 +115,9 @@ The following arguments are supported:
90115
- `private_network_id` - The Private Network of the IP (if the IP is a private IP).
91116
- `subnet_id` - The Private Network subnet of the IP (if the IP is a private IP).
92117
- `is_ipv6` - (Optional) Defines whether to request an IPv6 address instead of IPv4.
118+
- `custome_resource` - (Optional) The custom resource to attach to the IP being reserved. An example of a custom resource is a virtual machine hosted on an Elastic Metal server.
119+
- `mac_address` - The MAC address of the custom resource.
120+
- `name` - When the resource is in a Private Network, a DNS record is available to resolve the resource name.
93121
- `region` - (Defaults to [provider](../index.md#region) `region`) The [region](../guides/regions_and_zones.md#regions) of the IP.
94122
- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the Project the IP is associated with.
95123

0 commit comments

Comments
 (0)