https://github.com/libre-devops/terraform-azurerm-private-lb
A module which tries to follow the "KISS" design model to deploying a Private Azure Load Balancer. Will created 1 LBs and a backend pool based on some parameters :knife:
https://github.com/libre-devops/terraform-azurerm-private-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 Private Azure Load Balancer. Will created 1 LBs and a backend pool based on some parameters :knife:
- Host: GitHub
- URL: https://github.com/libre-devops/terraform-azurerm-private-lb
- Owner: libre-devops
- License: mit
- Created: 2022-04-23T13:25:09.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-17T21:44:42.000Z (almost 3 years ago)
- Last Synced: 2024-12-26T16:12:12.246Z (4 months ago)
- Topics: azure, azurerm, azurerm-terraform-provider, module, terraform, terraform-module
- Language: HCL
- Homepage:
- Size: 18.6 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 "network" {
source = "registry.terraform.io/libre-devops/network/azurerm"rg_name = module.rg.rg_name // rg-ldo-euw-dev-build
location = module.rg.rg_location
tags = local.tagsvnet_name = "vnet-${var.short}-${var.loc}-${terraform.workspace}-01" // vnet-ldo-euw-dev-01
vnet_location = module.network.vnet_locationaddress_space = ["10.0.0.0/16"]
subnet_prefixes = ["10.0.1.0/24", "10.0.2.0/24", "10.0.3.0/24"]
subnet_names = ["sn1-${module.network.vnet_name}", "sn2-${module.network.vnet_name}", "sn3-${module.network.vnet_name}"] //sn1-vnet-ldo-euw-dev-01subnet_service_endpoints = {
subnet2 = ["Microsoft.Storage", "Microsoft.Sql"], // Adds extra subnet endpoints
subnet3 = ["Microsoft.AzureActiveDirectory"]
}
}module "private_lb" {
source = "registry.terraform.io/libre-devops/private-lb/azurerm"rg_name = module.rg.rg_name
location = module.rg.rg_location
tags = module.rg.rg_tagslb_frontend_ip_configurations = {
"lbi-${var.short}-${var.loc}-${terraform.workspace}-01-ipconfig" = {
subnet_id = element(values(module.network.subnets_ids), 2),
private_ip_address_allocation = "Dynamic"
},
}lb_name = "lbi-${var.short}-${var.loc}-${terraform.workspace}-01" // lbi-ldo-euw-dev-01
lb_bpool_name = "bpool-${module.private_lb.lb_name}"
}
```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.priv_lb](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb) | resource |
| [azurerm_lb_backend_address_pool.private_lb_bpool](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/lb_backend_address_pool) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [lb\_bpool\_name](#input\_lb\_bpool\_name) | The name for the backend pool for the Load Balancer | `string` | n/a | yes |
| [lb\_frontend\_ip\_configurations](#input\_lb\_frontend\_ip\_configurations) | Load Balancer frontend config | `map(any)` | `{}` | no |
| [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 |
| [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 |