hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.51k stars 4.6k forks source link

Support for routing-property 'labels' in vpn_gateway_connection #13668

Open nbachm opened 2 years ago

nbachm commented 2 years ago

Community Note

Description

New or Affected Resource(s)

It should be possible to configure the "labels" within the routing {} block of the azurerm_vpn_gateway_connection resource. Would be great if that can be implemented.

Potential Terraform Configuration

resource "azurerm_vpn_gateway_connection" "example" {
  name               = "example"
  vpn_gateway_id     = azurerm_vpn_gateway.example.id
  remote_vpn_site_id = azurerm_vpn_site.example.id

  routing {
      associated_route_table = "/subscriptions/12345678-1234-4b6e-8ad9-123456789012/resourceGroups/rg-vwan-we-dev/providers/Microsoft.Network/virtualHubs/vhub-vwan-we-dev/hubRouteTables/defaultRouteTable"
      propagated_route_tables =  ["/subscriptions/12345678-1234-4b6e-8ad9-123456789012/resourceGroups/rg-vwan-we-dev/providers/Microsoft.Network/virtualHubs/vhub-vwan-we-dev/hubRouteTables/defaultRouteTable"]
      labels = ["default", "hub-northeurope", "hub-xyz"]
  }
}

References

osten33 commented 2 years ago

@nbachm looks like they did implement the option in #14371 but the propagated_route_table block has the route_table_ids field as required so one cannot only propagate to labels like the expressroute connections can be set to do. Ref; https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/vpn_gateway_connection#route_table_ids