Example #1
0
def route_to_virtual_network(stem, route_table_name, address_prefix):
    r_vn = network.Route(
        f'{stem}{s}r',
        route_name=f'{stem}{s}r{s}{suffix}',
        resource_group_name=resource_group_name,
        address_prefix=address_prefix,
        next_hop_type='VnetLocal',
        route_table_name=route_table_name,
        opts=ResourceOptions(parent=self),
    )
    return r_vn
Example #2
0
def route_to_internet(stem, route_table_name):
    r_i = network.Route(
        f'{stem}{s}r',
        route_name='FirewallDefaultRoute',  # name required
        resource_group_name=resource_group_name,
        address_prefix='0.0.0.0/0',
        next_hop_type='Internet',
        route_table_name=route_table_name,
        opts=ResourceOptions(parent=self, delete_before_replace=True),
    )
    return r_i
Example #3
0
def route_to_virtual_appliance(
    stem,
    route_table_name,
    address_prefix,
    next_hop_ip_address,
):
    r_va = network.Route(
        f'{stem}{s}r',
        route_name=f'{stem}{s}r{s}{suffix}',
        resource_group_name=resource_group_name,
        address_prefix=address_prefix,
        next_hop_type='VirtualAppliance',
        next_hop_ip_address=next_hop_ip_address,
        route_table_name=route_table_name,
        opts=ResourceOptions(parent=self),
    )
    return r_va