Exemplo n.º 1
0
def route_to_virtual_network(stem, route_table_name, address_prefix):
    r_vn = network.Route(
        f'{stem}-r-',
        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
Exemplo n.º 2
0
def route_to_internet(stem, route_table_name):
    r_i = network.Route(
        f'{stem}-r-',
        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),
    )
    return r_i
Exemplo n.º 3
0
def route_to_internet(stem, route_table_name):
    r_i = network.Route(
        f'{stem}{s}r',
        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
Exemplo n.º 4
0
def route_to_virtual_appliance(
    stem,
    route_table_name,
    address_prefix,
    next_hop_in_ip_address,
):
    r_va = network.Route(
        f'{stem}-r-',
        resource_group_name=resource_group_name,
        address_prefix=address_prefix,
        next_hop_type='VirtualAppliance',
        next_hop_in_ip_address=next_hop_in_ip_address,
        route_table_name=route_table_name,
        opts=ResourceOptions(parent=self),
    )
    return r_va