Terraform module to add on-premises servers to ALB for Alibaba Cloud
English | 简体中文
This Module designs a cloud-based delivery network for IDC seven-layer applications, including:
- Building a high-availability dedicated network between the cloud and IDC through ECR (Express Connect Router)
- Enabling the migration of seven-layer public network entry points of IDC servers to the cloud through ALB (Application Load Balancer).
Architecture Diagram:
provider "alicloud" {
region = "cn-hangzhou"
}
data "alicloud_express_connect_physical_connections" "example" {
name_regex = "^preserved-NODELETING"
}
module "complete" {
source = "alibabacloud-automation/add-on-premises-servers-to-alb/alicloud"
vpc_config = {
cidr_block = "10.0.0.0/16"
}
vswitches = [{
zone_id = "cn-hangzhou-i"
cidr_block = "10.0.1.0/24"
}, {
zone_id = "cn-hangzhou-j"
cidr_block = "10.0.2.0/24"
}]
alb_server_group = {
server_group_name = "idc"
servers = [{
server_type = "Ip"
server_id = "172.16.1.5"
server_ip = "172.16.1.5"
weight = 10
port = 80
remote_ip_enabled = true
}]
}
ecr_alibaba_side_asn = 64512
vbr_config = [
{
physical_connection_id = data.alicloud_express_connect_physical_connections.example.connections[0].id
vlan_id = 104
local_gateway_ip = "192.168.0.1"
peer_gateway_ip = "192.168.0.2"
peering_subnet_mask = "255.255.255.252"
},
{
physical_connection_id = data.alicloud_express_connect_physical_connections.example.connections[1].id
vlan_id = 105
local_gateway_ip = "192.168.1.1"
peer_gateway_ip = "192.168.1.2"
peering_subnet_mask = "255.255.255.252"
}
]
vbr_bgp_group = {
peer_asn = 45000
}
tags = {
"Created" = "Terraform"
}
}
Name | Version |
---|---|
terraform | >= 0.13 |
Name | Version |
---|---|
alicloud | n/a |
No modules.
Name | Type |
---|---|
alicloud_alb_listener.this | resource |
alicloud_alb_load_balancer.this | resource |
alicloud_alb_server_group.this | resource |
alicloud_express_connect_router_express_connect_router.this | resource |
alicloud_express_connect_router_vbr_child_instance.this | resource |
alicloud_express_connect_router_vpc_association.this | resource |
alicloud_express_connect_virtual_border_router.this | resource |
alicloud_vpc.this | resource |
alicloud_vpc_bgp_group.this | resource |
alicloud_vpc_bgp_peer.this | resource |
alicloud_vswitch.this | resource |
alicloud_regions.default | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
alb_listener | The parameters of alb listener. | object({ |
{ |
no |
alb_load_balancer | The parameters of alb load balancer. | object({ |
{ |
no |
alb_server_group | The parameters of alb server group. | object({ |
{ |
no |
ecr_alibaba_side_asn | The alibaba side asn for ECR. | number |
null |
no |
resource_group_id | The resource group id. | string |
null |
no |
tags | The tags of resources. | map(string) |
{} |
no |
vbr_bgp_group | The parameters of the bgp group. The attribute 'peer_asn' is required. | object({ |
{ |
no |
vbr_bgp_peer | The parameters of the bgp peer. The default value of 'bfd_multi_hop' is 255. The default value of 'enable_bfd' is 'false'. The default value of 'ip_version' is 'IPV4'. | object({ |
{} |
no |
vbr_config | The list parameters of VBR. The attributes 'physical_connection_id', 'vlan_id', 'local_gateway_ip','peer_gateway_ip','peering_subnet_mask' are required. | list(object({ |
[ |
no |
vpc_config | The parameters of vpc. The attribute 'cidr_block' is required. | object({ |
{ |
no |
vswitches | The parameters of vswitches. The attributes 'zone_id', 'cidr_block' are required. | list(object({ |
[ |
no |
Name | Description |
---|---|
alb_listener | The ID of the ALB Listener. |
alb_load_balancer_id | The ID of the ALB Load Balancer. |
alb_server_group_id | The ID of the ALB Server Group. |
bgp_group_id | The id of BGP group. |
bgp_peer_id | The id of BGP peer. |
ecr_id | The id of Express Connect Router. |
ecr_vpc_association_id | The association ID of Express Connect Router and VPC. |
vbr_id | The id of VBR. |
vpc_id | The ID of the VPC. |
vswitch_ids | The IDs of the VSwitches. |
If you have any problems when using this module, please opening a provider issue and let us know.
Note: There does not recommend opening an issue on this repo.
Created and maintained by Alibaba Cloud Terraform Team([email protected]).
MIT Licensed. See LICENSE for full details.