Skip to content

Commit

Permalink
Document maas_network_interface_link resource
Browse files Browse the repository at this point in the history
  • Loading branch information
Ionut Balutoiu committed May 4, 2021
1 parent ff25bf5 commit 6dd7988
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,3 +263,31 @@ Parameters:
| ---- | ---- | -------- | -----------
| `name` | `string` | `true` | The new tag name. Because the name will be used in urls, it should be short.
| `machine_ids` | `[]string` | `false` | List of MAAS machines' ids that will be tagged.

### `maas_network_interface_link`

Configures a machine network interface with an IP address from a given subnet.

Example:

```hcl
resource "maas_network_interface_link" "virsh_vm1_nic1" {
machine_id = maas_machine.virsh_vm1.id
network_interface_id = maas_network_interface_physical.virsh_vm1_nic1.id
subnet_id = data.maas_subnet.pxe.id
mode = "STATIC"
ip_address = "10.121.10.29"
default_gateway = true
}
```

Parameters:

| Name | Type | Required | Description
| ---- | ---- | -------- | -----------
| `machine_id` | `string` | `true` | Machine system id.
| `network_interface_id` | `int` | `true` | Network interface id.
| `subnet_id` | `int` | `true` | Subnet id.
| `mode` | `string` | `false` | Connection mode to subnet. It defaults to `AUTO`. Valid options are: `AUTO` (random static IP address from the subnet), `DHCP` (DHCP on the given subnet), `STATIC` (use `ip_address` as static IP address).
| `ip_address` | `string` | `false` | IP address for the interface in the given subnet. Only used when `mode` is `STATIC`.
| `default_gateway` | `bool` | `false` | When enabled, it sets the subnet gateway IP address as the default gateway for the machine this interface belongs to. This option can only be used with the `AUTO` and `STATIC` modes.

0 comments on commit 6dd7988

Please sign in to comment.