Skip to content

docs(ipam_ip): change examples format #2538

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Apr 17, 2024
Merged
Changes from all 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
19 changes: 15 additions & 4 deletions docs/data-sources/ipam_ip.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,21 @@ Gets information about IP managed by IPAM service. IPAM service is used for dhcp

## Examples

### Instance Private Network IP
### IPAM IP ID

```hcl
```terraform
# Get info by ipam ip id
data "scaleway_ipam_ip" "by_id" {
ipam_ip_id = "11111111-1111-1111-1111-111111111111"
}
```

### Instance Private Network IP

Get Instance IP in a private network.

# Get Instance IP in a private network
```terraform
# Connect your instance to a private network using a private nic.
resource "scaleway_instance_private_nic" "nic" {
server_id = scaleway_instance_server.server.id
private_network_id = scaleway_vpc_private_network.pn.id
Expand All @@ -38,6 +44,12 @@ data "scaleway_ipam_ip" "by_id" {
type = "ipv4"
}


```

### RDB instance

```terraform
# Find the private IPv4 using resource name
resource "scaleway_vpc_private_network" "pn" {}

Expand All @@ -61,7 +73,6 @@ data "scaleway_ipam_ip" "by_name" {
}
type = "ipv4"
}

```

## Argument Reference
Expand Down