Template ID
6DG34M62ELQZW75T
Address: https://bpstudio.console.alibabacloud.com/bpStudio/topo?TemplateId=6DG34M62ELQZW75T
Supported regions
Hangzhou, Beijing, Shanghai, Shenzhen, Guangzhou, and Chengdu
Template architecture

Variables
The parameter type can be STRING, INTEGER, BOOLEAN, MAP, or other types. You can configure the values of the variables.
If the value of a variable is not configured, the default value is used. For information about how to modify the template variables, see Configure template variables.
No. | Variable | Type | Default value | Description |
1 | ${alb-name} | String | prod-alb | The name of the Network Load Balancer (NLB) instance. |
2 | ${alb-network-type} | String | Internet | The network type. |
3 | ${instance-tags} | Map | {"createBy":"cadt"} | The resource tags. |
4 | ${resourcegroupId} | String | The ID of the resource group. | |
5 | ${cbwp-name} | String | alb-cbwp | The name of the Internet Shared Bandwidth instance. |
6 | ${cbwp-bandwidth} | Integer | 1 | The bandwidth. Unit: Mbit/s. |
7 | ${alb-listener} | String | alb_listener | The listener of the NLB instance. |
8 | ${alb-listener-port} | Integer | 80 | The listening port. |
9 | ${alb-vservergroup-01} | String | alb_servergroup | The vServer group. |
10 | ${alb-sg-backend-port} | List<Map> | [{"backend_port":"80","weight":100}] | The port configurations for the vServer group. |
CLI-based debugging
The following sample code provides an example of parameter configurations, including the default VPC, vSwitch, and Internet Shared Bandwidth instance, in a YAML file:
template_id: 6DG34M62ELQZW75T
area_id: "cn-hangzhou"
instances:
# - node_type: vpc
# node_name: vpc-01
# id: vpc-bp**********ws
# - node_type: vswitch
# node_name: vswitch-01
# id: vsw-bp**********0ex
# - node_type: vswitch
# node_name: vswitch-02
# id: vsw-bp**********1ek
# By default, a VPC and a vSwitch are created. The related parameters are commented on. When you reuse an existing VPC and vSwitch, uncomment the related parameters and replace the id value with the required ID.
variables:
${alb-name}: "ali-prod-alb"
${alb-network-type}: "Internet"
# Private network: Intranet, public network: Internet
${cbwp-name}: "ali-alb-cbwp"
${cbwp-bandwidth}: "1"
# The default bandwidth is 1 Mbit/s, and the NLB instance is automatically added to the Internet Shared Bandwidth instance.
${alb-listener}: "listener_HTTP_80"
${alb-listener-port}: "80"
${alb-vservergroup-01}: "SG_HTTP_01"
${alb-sg-backend-port}: "[{\"backend_port\":\"80\",\"weight\":\"100\"}]"
${instance-tags}: "{\"env\":\"test\",\"createBy\":\"cadt\"}"
#${resourcegroupId}: "rg-ac*****y"
configuration:
enableMonitor: "0"
enableReport: "0"
output:
alb:
- Address
- Port
eip:
- IpAddress
- RegionId
gateway:
-EcrIdNote:
1. If you want to change the region, change the value of the area_id field. For example, change cn-hangzhou to cn-shanghai.
For more information, see Regions and zones.
2. If you want to modify the configurations, such as VPC and vSwitch, change the value of the id field for a specific resource.
instances:
- node_type: vpc
node_name: vpc-01
id: vpc-bp**********ws
- node_type: vswitch
node_name: vswitch-01
id: vsw-bp**********0ex
- node_type: vswitch
node_name: vswitch-02
id: vsw-bp**********1ek