Skip to content

Commit

Permalink
fix(lb):clean up documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Laure-di committed Feb 27, 2024
1 parent cefe448 commit 72d69e6
Showing 1 changed file with 32 additions and 37 deletions.
69 changes: 32 additions & 37 deletions docs/resources/lb.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,46 +92,47 @@ resource "scaleway_vpc_private_network" "main" {
resource "scaleway_vpc_private_network" "second" {
name = "private network with DHCP config"
}
```
## Private Network with static config

```terraform
resource "scaleway_lb_ip" "main" {
}
resource "scaleway_vpc_private_network" "main" {
name = "MyTest"
}
### Scaleway Load Balancer with multiple private_network
resource "scaleway_lb" "main" {
ip_id = scaleway_lb_ip.main.id
name = "MyTest"
type = "LB-S"
release_ip = false
private_network {
private_network_id = scaleway_vpc_private_network.main.id
static_config = ["172.16.0.100"]
}
private_network {
private_network_id = scaleway_vpc_private_network.second.id
dhcp_config = true
}
depends_on = [scaleway_vpc_public_gateway.main]
}
```

## Private Network with static config
### Scaleway Load Balancer with multiple private_network

```terraform
resource "scaleway_lb_ip" "main" {
}
resource "scaleway_vpc_private_network" "main" {
name = "MyTest"
}
resource "scaleway_lb" "main" {
ip_id = scaleway_lb_ip.main.id
name = "MyTest"
type = "LB-S"
release_ip = false
private_network {
private_network_id = scaleway_vpc_private_network.main.id
static_config = ["172.16.0.100"]
}
private_network {
private_network_id = scaleway_vpc_private_network.second.id
dhcp_config = true
}
depends_on = [scaleway_vpc_public_gateway.main]
}
```

Expand All @@ -149,7 +150,15 @@ The following arguments are supported:

- `name` - (Optional) The name of the load-balancer.

- `private_network` - (Optional) List of private network to connect with your load balancer. Private Network documented below.
- `private_network` - (Optional) List of private network to connect with your load balancer.
- `private_network_id` - (Required) The ID of the Private Network to associate.

~> **Important:** Updates to `private_network` will recreate the attachment.

- `static_config` - (Optional) Define a local ip address of your choice for the load balancer instance. See
- `dhcp_config` - (Optional) Set to true if you want to let DHCP assign IP addresses.

~> **Important:** Only one of static_config and dhcp_config may be set.

- `project_id` - (Defaults to [provider](../index.md#project_id) `project_id`) The ID of the project the load-balancer is associated with.

Expand All @@ -166,17 +175,7 @@ The following arguments are supported:

### Argument documentation for private_network block

- `private_network_id` - (Required) The ID of the Private Network to associate.

- ~> **Important:** Updates to `private_network` will recreate the attachment.

- `static_config` - (Optional) Define a local ip address of your choice for the load balancer instance. See below.

- `dhcp_config` - (Optional) Set to true if you want to let DHCP assign IP addresses. See below.

~> **Important:** Only one of static_config and dhcp_config may be set.

- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the private network was created.

## Attributes Reference

Expand All @@ -190,17 +189,13 @@ In addition to all arguments above, the following attributes are exported:

- `organization_id` - The organization ID the load-balancer is associated with.

- `private_network` - List of private network to connect with your load balancer. Private Network documented below.
- `private_network` - List of private network to connect with your load balancer.
- `status` - The status of the private network connection.
- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the private network was created.

~> **Important:** `release_ip` will not be supported. This prevents the destruction of the IP from releasing a LBs.
The `resource_lb_ip` will be the only resource that handles those IPs.

### Attributes documentation for private_network block

- `status` - The status of the private network connection.

- `zone` - (Defaults to [provider](../index.md#zone) `zone`) The [zone](../guides/regions_and_zones.md#zones) in which the private network was created.

## Migration

In order to migrate to other types you can check the migration up or down via our CLI `scw lb lb-types list`.
Expand Down

0 comments on commit 72d69e6

Please sign in to comment.