https://github.com/libre-devops/terraform-azurerm-route-table
A module used to deploy a route table and some routes :knife:
https://github.com/libre-devops/terraform-azurerm-route-table
Last synced: 2 months ago
JSON representation
A module used to deploy a route table and some routes :knife:
- Host: GitHub
- URL: https://github.com/libre-devops/terraform-azurerm-route-table
- Owner: libre-devops
- License: mit
- Created: 2022-05-14T11:41:10.000Z (almost 3 years ago)
- Default Branch: main
- Last Pushed: 2022-05-17T21:44:53.000Z (almost 3 years ago)
- Last Synced: 2024-12-26T16:12:06.019Z (4 months ago)
- Language: HCL
- Homepage:
- Size: 21.5 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-01
subnet_service_endpoints = {
"sn1-${module.network.vnet_name}" = ["Microsoft.Storage"] // Adds extra subnet endpoints to sn1-vnet-ldo-euw-dev-01
"sn2-${module.network.vnet_name}" = ["Microsoft.Storage", "Microsoft.Sql"], // Adds extra subnet endpoints to sn2-vnet-ldo-euw-dev-01
"sn3-${module.network.vnet_name}" = ["Microsoft.AzureActiveDirectory"] // Adds extra subnet endpoints to sn3-vnet-ldo-euw-dev-01
}
}module "rt" {
source = "registry.terraform.io/libre-devops/route-table/azurerm"rg_name = module.rg.rg_name
location = module.rg.rg_location
tags = module.rg.rg_tagsroute_table_name = "rt-${var.short}-${var.loc}-${terraform.workspace}-01"
enable_force_tunneling = true
force_tunnel_route_name = "udr-${var.short}-${var.loc}-${terraform.workspace}-ForceInternetTunnel"
disable_bgp_route_propagation = trueassociate_with_subnet = true
subnet_id_to_associate = element(values(module.network.subnets_ids), 0)
}```
## Requirements
No requirements.
## Providers
| Name | Version |
|------|---------|
| [azurerm](#provider\_azurerm) | n/a |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [azurerm_route.force_tunneling](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/route) | resource |
| [azurerm_route_table.rt](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/route_table) | resource |
| [azurerm_subnet_route_table_association.rt_snet_association](https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/subnet_route_table_association) | resource |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [associate\_with\_subnet](#input\_associate\_with\_subnet) | If this route table should be assosciated with a subnet, defaults to true | `bool` | `true` | no |
| [disable\_bgp\_route\_propagation](#input\_disable\_bgp\_route\_propagation) | Whether or not to enable or disable BGP routes | `bool` | n/a | yes |
| [enable\_force\_tunneling](#input\_enable\_force\_tunneling) | Whether or not force tunneling is enabled, defaults to true | `bool` | `true` | no |
| [force\_tunnel\_next\_hope\_type](#input\_force\_tunnel\_next\_hope\_type) | The next hop type if a forced tunnel is created, defaults to VirtualNetworkGateway | `string` | `"VirtualNetworkGateway"` | no |
| [force\_tunnel\_route\_name](#input\_force\_tunnel\_route\_name) | The name of the force tunnel route name if used | `string` | `null` | 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 |
| [route\_table\_name](#input\_route\_table\_name) | The name of the route table | `string` | n/a | yes |
| [routes](#input\_routes) | The map block for the routes | `any` | `null` | no |
| [subnet\_id\_to\_associate](#input\_subnet\_id\_to\_associate) | If you wish to associate with a subnet, the ID of it | `string` | `null` | no |
| [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 |
|------|-------------|
| [force\_tunnel\_route\_id](#output\_force\_tunnel\_route\_id) | If force tunneling is enabled, the id of the route |
| [force\_tunnel\_route\_name](#output\_force\_tunnel\_route\_name) | If force tunneling is enabled, the name of the route |
| [rt\_id](#output\_rt\_id) | The id of the route table |
| [rt\_name](#output\_rt\_name) | The name of the route table |
| [rt\_subnets](#output\_rt\_subnets) | The subnets the route table is attitude to |