2020-06-08 04:43:13 -07:00
|
|
|
# Network Endpoint Group Module
|
|
|
|
|
|
|
|
This modules allows creating zonal network endpoint groups.
|
|
|
|
|
|
|
|
Note: this module will integrated into a general-purpose load balancing module in the future.
|
|
|
|
|
|
|
|
## Example
|
|
|
|
```hcl
|
|
|
|
module "neg" {
|
2022-12-17 09:54:18 -08:00
|
|
|
source = "./fabric/modules/__experimental/net-neg/"
|
2020-06-08 04:43:13 -07:00
|
|
|
project_id = "myproject"
|
|
|
|
name = "myneg"
|
2022-12-17 09:54:18 -08:00
|
|
|
network = var.vpc.self_link
|
|
|
|
subnetwork = var.subnet.self_link
|
2020-06-08 04:43:13 -07:00
|
|
|
zone = "europe-west1-b"
|
|
|
|
endpoints = [
|
|
|
|
for instance in module.vm.instances :
|
|
|
|
{
|
|
|
|
instance = instance.name
|
|
|
|
port = 80
|
|
|
|
ip_address = instance.network_interface[0].network_ip
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
2022-12-17 09:54:18 -08:00
|
|
|
# tftest skip
|
2020-06-08 04:43:13 -07:00
|
|
|
```
|
|
|
|
<!-- BEGIN TFDOC -->
|
2021-12-20 23:51:51 -08:00
|
|
|
|
2020-06-08 04:43:13 -07:00
|
|
|
## Variables
|
|
|
|
|
|
|
|
| name | description | type | required | default |
|
2021-12-20 23:51:51 -08:00
|
|
|
|---|---|:---:|:---:|:---:|
|
2022-11-18 08:48:16 -08:00
|
|
|
| [endpoints](variables.tf#L17) | List of (instance, port, address) of the NEG. | <code title="list(object({ instance = string port = number ip_address = string }))">list(object({…}))</code> | ✓ | |
|
|
|
|
| [name](variables.tf#L26) | NEG name. | <code>string</code> | ✓ | |
|
|
|
|
| [network](variables.tf#L31) | Name or self link of the VPC used for the NEG. Use the self link for Shared VPC. | <code>string</code> | ✓ | |
|
|
|
|
| [project_id](variables.tf#L36) | NEG project id. | <code>string</code> | ✓ | |
|
|
|
|
| [subnetwork](variables.tf#L41) | VPC subnetwork name or self link. | <code>string</code> | ✓ | |
|
|
|
|
| [zone](variables.tf#L46) | NEG zone. | <code>string</code> | ✓ | |
|
2020-06-08 04:43:13 -07:00
|
|
|
|
|
|
|
## Outputs
|
|
|
|
|
|
|
|
| name | description | sensitive |
|
|
|
|
|---|---|:---:|
|
2022-01-31 01:45:34 -08:00
|
|
|
| [id](outputs.tf#L17) | Network endpoint group ID. | |
|
2022-11-18 08:48:16 -08:00
|
|
|
| [self_lnk](outputs.tf#L22) | Network endpoint group self link. | |
|
|
|
|
| [size](outputs.tf#L27) | Size of the network endpoint group. | |
|
2021-12-20 23:51:51 -08:00
|
|
|
|
2020-06-08 04:43:13 -07:00
|
|
|
<!-- END TFDOC -->
|