User Tools

Site Tools


burim:azure:bgp

links

sample config

To define BGP peers using the caf module, you need to specify the configure_connectivity_resources argument in the module block. This argument is a map that contains the configuration options for the connectivity resources, such as virtual networks, VPN gateways, and BGP settings. For example, you can use something like this:

module "caf-enterprise-scale" {
source  = "Azure/caf-enterprise-scale/azurerm"
version = "1.1.0"

providers = {
azurerm              = azurerm
azurerm.connectivity = azurerm
azurerm.management   = azurerm
}

root_parent_id                = data.azurerm_client_config.core.tenant_id
subscription_id_management    = "ourMgmtSub"
subscription_id_connectivity  = "ourCommsSub"
deploy_core_landing_zones     = false
deploy_connectivity_resources = true
default_location              = local.default_location

configure_connectivity_resources = {
settings = {
# Configure the BGP settings for the VPN gateway
bgp = {
asn = 65000 # The BGP autonomous system number of the VPN gateway
peering_addresses = [
{
name = "primary" # The name of the primary peering address
ip_configuration_name = "vnetGatewayConfig" # The name of the IP configuration for the VPN gateway
default_bgp_ip_address = true # Use the default BGP IP address
}
]
}
}
# Define the BGP peers for the VPN gateway
bgp_connections = {
peer1 = {
name = "peer1" # The name of the BGP peer
remote_address = "10.0.0.1" # The IP address of the remote BGP peer
peer_asn = 65001 # The BGP autonomous system number of the remote BGP peer
virtual_network_gateway_id = module.caf-enterprise-scale.outputs.connectivity.vpn_gateway.id # The ID of the VPN gateway
}
peer2 = {
name = "peer2" # The name of the BGP peer
remote_address = "10.0.0.2" # The IP address of the remote BGP peer
peer_asn = 65002 # The BGP autonomous system number of the remote BGP peer
virtual_network_gateway_id = module.caf-enterprise-scale.outputs.connectivity.vpn_gateway.id # The ID of the VPN gateway
}
}
}
}
burim/azure/bgp.txt · Last modified: 2023/12/04 13:13 by burim

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki