An open API service indexing awesome lists of open source software.

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:

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.tags

vnet_name = "vnet-${var.short}-${var.loc}-${terraform.workspace}-01" // vnet-ldo-euw-dev-01
vnet_location = module.network.vnet_location

address_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-01

subnet_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_tags

lb_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)` |

{
"source": "terraform"
}
| no |

## 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 |