Add Azure deployment examples and enhance configuration management
- Update .gitignore to exclude Terraform files - Enhance README with Azure deployment instructions - Refactor publish.sh to use a container for changelog parsing - Add Azure example files including Terraform configurations - Create cloud-init templates for PKI and default configurations - Implement workload VM setup for testing routing
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
locals {
|
||||
remote_cidr_list = [for c in split(",", var.remote_cidrs) : trimspace(c) if trimspace(c) != ""]
|
||||
}
|
||||
|
||||
resource "azurerm_route_table" "router" {
|
||||
name = "rt-${var.name}"
|
||||
resource_group_name = azurerm_resource_group.this.name
|
||||
location = azurerm_resource_group.this.location
|
||||
}
|
||||
|
||||
resource "azurerm_route" "to_remote" {
|
||||
for_each = toset(local.remote_cidr_list)
|
||||
|
||||
name = "to-${replace(each.value, "/", "-")}"
|
||||
resource_group_name = azurerm_resource_group.this.name
|
||||
route_table_name = azurerm_route_table.router.name
|
||||
address_prefix = each.value
|
||||
next_hop_type = "VirtualAppliance"
|
||||
next_hop_in_ip_address = azurerm_network_interface.int.private_ip_address
|
||||
}
|
||||
|
||||
resource "azurerm_subnet_route_table_association" "workload" {
|
||||
subnet_id = azurerm_subnet.workload.id
|
||||
route_table_id = azurerm_route_table.router.id
|
||||
}
|
||||
Reference in New Issue
Block a user