https://github.com/libre-devops/terraform-azurerm-public-lb
A module which tries to follow the "KISS" design model to deploying a Public Azure Load Balancer. Will created 1 LBs, a Public IP, a backend pool and a rule based on some parameters :knife:
https://github.com/libre-devops/terraform-azurerm-public-lb
azure azurerm azurerm-terraform-provider module terraform terraform-module
Last synced: 2 months ago
JSON representation
A module which tries to follow the "KISS" design model to deploying a Public Azure Load Balancer. Will created 1 LBs, a Public IP, a backend pool and a rule based on some parameters :knife:
- Host: GitHub
- URL: https://github.com/libre-devops/terraform-azurerm-public-lb
- Owner: libre-devops
- License: mit
- Created: 2022-04-21T17:22:25.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-17T21:44:46.000Z (almost 3 years ago)
- Last Synced: 2024-12-26T16:12:12.539Z (4 months ago)
- Topics: azure, azurerm, azurerm-terraform-provider, module, terraform, terraform-module
- Language: HCL
- Homepage:
- Size: 23.4 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
```hcl
module "rg" {
source = "registry.terraform.io/libre-devops/rg/azurerm"rg_name = "rg-${var.short}-${var.loc}-${terraform.workspace}-build" // rg-ldo-euw-dev-build
location = local.location // compares var.loc with the var.regions var to match a long-hand name, in this case, "euw", so "westeurope"
tags = local.tags# lock_level = "CanNotDelete" // Do not set this value to skip lock
}module "public_lb" {
source = "registry.terraform.io/libre-devops/public-lb/azurerm"rg_name = module.rg.rg_name
location = module.rg.rg_location
tags = module.rg.rg_tagspip_name = "pip-lbe-${var.short}-${var.loc}-${terraform.workspace}-01"
pip_sku = "Standard"
availability_zone = ["1"]lb_name = "lbe-${var.short}-${var.loc}-${terraform.workspace}-01"
lb_bpool_name = "bpool-${module.public_lb.lb_name}"
lb_ip_configuration_name = "lbe-${var.short}-${var.loc}-${terraform.workspace}-01-ipconfig"enable_outbound_rule = true
outbound_rule_name = "rule-out-${module.public_lb.lb_name}"
outbound_protocol = "Tcp"
allocated_outbound_ports = 1024
}
```For a full example build, check out the [Libre DevOps Website](https://www.libredevops.org/quickstart/utils/terraform/using-lbdo-tf-modules-example.html)
## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| [azurerm](#provider\_azurerm) | n/a |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [azurerm_lb.pub_lb](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb) | resource |
| [azurerm_lb_backend_address_pool.public_lb_bpool](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_backend_address_pool) | resource |
| [azurerm_lb_outbound_rule.outbound_rule](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_outbound_rule) | resource |
| [azurerm_public_ip.pip](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/public_ip) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [allocated\_outbound\_ports](#input\_allocated\_outbound\_ports) | The number of ports allocated for the outbound rule | `number` | n/a | yes |
| [allocation\_method](#input\_allocation\_method) | Defines how an IP address is assigned. Options are Static or Dynamic. | `string` | `"Dynamic"` | no |
| [availability\_zone](#input\_availability\_zone) | The availability zone for the PIP to be created to | `list(any)` | n/a | yes |
| [enable\_outbound\_rule](#input\_enable\_outbound\_rule) | Whether an outbound rule should be made | `bool` | n/a | yes |
| [lb\_bpool\_name](#input\_lb\_bpool\_name) | The name for the backend pool for the Load Balancer | `string` | n/a | yes |
| [lb\_ip\_configuration\_name](#input\_lb\_ip\_configuration\_name) | The name of the frontend IP Configuration name | `string` | n/a | yes |
| [lb\_name](#input\_lb\_name) | The name of the LB | `string` | n/a | yes |
| [lb\_sku\_name](#input\_lb\_sku\_name) | The SKU of the lb | `string` | `"Standard"` | no |
| [location](#input\_location) | The location for this resource to be put in | `string` | n/a | yes |
| [outbound\_protocol](#input\_outbound\_protocol) | The protocol for the outbound rule | `string` | n/a | yes |
| [outbound\_rule\_name](#input\_outbound\_rule\_name) | The name of the outbound rule | `string` | n/a | yes |
| [pip\_custom\_dns\_label](#input\_pip\_custom\_dns\_label) | If you are using a public IP and wish to assign a custom DNS label, set here, otherwise, the VM host name will be used | `any` | `null` | no |
| [pip\_name](#input\_pip\_name) | If you are using a Public IP, set the name in this variable | `string` | `null` | no |
| [pip\_sku](#input\_pip\_sku) | If you wish to assign a public IP directly, set this to Standard | `string` | `null` | no |
| [rg\_name](#input\_rg\_name) | The name of the resource group, this module does not create a resource group, it is expecting the value of a resource group already exists | `string` | n/a | yes |
| [tags](#input\_tags) | A map of the tags to use on the resources that are deployed with this module. | `map(string)` |{| no |
"source": "terraform"
}## Outputs
| Name | Description |
|------|-------------|
| [bpool\_id](#output\_bpool\_id) | The id of the backend pool |
| [bpool\_name](#output\_bpool\_name) | The name of the backend pool |
| [lb\_id](#output\_lb\_id) | The ID of the load balancer |
| [lb\_ip\_configuration](#output\_lb\_ip\_configuration) | The frontend ip configuration object |
| [lb\_name](#output\_lb\_name) | The Name of the load balancer |
| [outbound\_allocated\_outbound\_ports](#output\_outbound\_allocated\_outbound\_ports) | The allocated ports of the outbound rule if created |
| [outbound\_rule\_id](#output\_outbound\_rule\_id) | The id of the outbound rule if created |
| [outbound\_rule\_name](#output\_outbound\_rule\_name) | The name of the outbound rule if created |
| [outbound\_rule\_protocol](#output\_outbound\_rule\_protocol) | The protocl of the outbound rule if created |
| [pip\_id](#output\_pip\_id) | The id of the public ip |
| [pip\_ip\_address](#output\_pip\_ip\_address) | The address of the public ip |
| [pip\_name](#output\_pip\_name) | The name of the public ip |