Terraform module to Implement NAT64 based on ALB for Alibaba Cloud
English | 简体中文
Faced with the requirements of IPv6 transformation, some enterprises will adopt the "NAT64" solution. This involves converting IPv6 access requests from clients into the IPv4 protocol and forwarding them to the server, helping application systems quickly and easily gain IPv6 access capability.
This Module deploy a dual-stack version of the ALB to provide "NAT64” capabilities for cloud-based application systems.
Architecture Diagram:
provider "alicloud" {
region = "cn-shanghai"
}
module "complete" {
source = "alibabacloud-automation/nat64-based-on-alb/alicloud"
vpc_config = {
cidr_block = "10.0.0.0/8"
ipv6_isp = "BGP"
}
alb_vswitches = [{
vswitch_name = "ipv6-alb-vsw1"
ipv6_cidr_block_mask = 1
zone_id = "cn-shanghai-g"
cidr_block = "10.0.0.0/25"
}, {
vswitch_name = "ipv6-alb-vsw2"
ipv6_cidr_block_mask = 2
zone_id = "cn-shanghai-l"
cidr_block = "10.0.0.128/25"
}]
app_vswitches = [{
vswitch_name = "ipv6-app-vsw3"
ipv6_cidr_block_mask = 3
zone_id = "cn-shanghai-g"
cidr_block = "10.0.1.0/24"
}, {
vswitch_name = "ipv6-app-vsw4"
ipv6_cidr_block_mask = 4
zone_id = "cn-shanghai-l"
cidr_block = "10.0.2.0/24"
}]
}| Name | Version |
|---|---|
| terraform | >= 1.3 |
| Name | Version |
|---|---|
| alicloud | n/a |
No modules.
| Name | Type |
|---|---|
| alicloud_alb_listener.default | resource |
| alicloud_alb_load_balancer.default | resource |
| alicloud_alb_server_group.default | resource |
| alicloud_common_bandwidth_package.default | resource |
| alicloud_instance.default | resource |
| alicloud_security_group.default | resource |
| alicloud_vpc.default | resource |
| alicloud_vpc_ipv6_gateway.default | resource |
| alicloud_vswitch.alb | resource |
| alicloud_vswitch.app | resource |
| 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 |
| alb_vswitches | The vswitches used for nlb. | list(object({ |
n/a | yes |
| app_vswitches | The vswitches used for application server. | list(object({ |
n/a | yes |
| common_bandwidth_package | The parameters of common bandwidth package. | object({ |
{} |
no |
| create_common_bandwidth_package | Whether to create common bandwidth package. | bool |
true |
no |
| ecs_config | The parameters of ecs instance. | object({ |
{} |
no |
| exsiting_common_bandwidth_package_id | The id of existing common bandwidth package. If create_common_bandwidth_package is false, this value is required. |
string |
null |
no |
| security_group_name | The name of security group. | string |
null |
no |
| vpc_config | The parameters of vpc and vswitches. | object({ |
n/a | yes |
| vpc_ipv6_gateway_name | The name of vpc ipv6 gateway. | string |
null |
no |
| Name | Description |
|---|---|
| alb_listener_id | 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. |
| alb_vswitch_ids | The IDs of the ALB VSwitches. |
| app_vswitch_ids | The IDs of the App VSwitches. |
| bandwidth_package_id | The ID of the common bandwidth package. |
| instance_ids | The IDs of the ECS instances. |
| ipv6_gateway_id | The ID of the IPv6 gateway. |
| security_group_id | The ID of the security group. |
| vpc_id | The ID of the VPC. |
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.
