ALIYUN::SLB::LoadBalancer リソースタイプを使用して、SLB インスタンスを作成します。
構文
{
"Type": "ALIYUN::SLB::LoadBalancer",
"Properties": {
"DeletionProtection": Boolean,
"AddressType": String,
"Tags": List,
"InternetChargeType": String,
"Bandwidth": Integer,
"SlaveZoneId": String,
"ResourceGroupId": String,
"VpcId": String,
"LoadBalancerName": String,
"VSwitchId": String,
"LoadBalancerSpec": String,
"MasterZoneId": String,
"ModificationProtectionReason": String,
"ModificationProtectionStatus": String,
"AddressIPVersion": String,
"InstanceChargeType": String
}
}プロパティ
プロパティ名 | 型 | 必須 | 更新可否 | 説明 | 制約 |
ResourceGroupId | String | いいえ | はい | リソースグループの ID。 | なし |
DeletionProtection | Boolean | いいえ | はい | 削除保護を有効にするかどうかを指定します。 | 有効な値:
|
VpcId | String | いいえ | いいえ | VPC の ID。 | なし |
SlaveZoneId | String | いいえ | いいえ | SLB インスタンスのゾーン ID。 | なし |
Bandwidth | Integer | いいえ | はい | 帯域幅課金方式で課金されるパブリックインスタンスのピーク帯域幅。 | 有効な値:1 ~ 10000。 単位:Mbit/s。 デフォルト値:1。 VPC インスタンスの場合、このパラメーターはデフォルトでトラフィック課金方式に設定されます。
|
AddressType | String | いいえ | いいえ | SLB インスタンスのアドレスタイプ。 | 有効な値:
|
VSwitchId | String | いいえ | いいえ | vSwitch の ID。 | なし |
LoadBalancerName | String | いいえ | はい | SLB インスタンスの名前。 | 長さ:1 ~ 80 文字。使用可能な文字は、英字、数字、ハイフン(-)、スラッシュ(/)、ピリオド(.)、アンダースコア(_)です。 このパラメーターを指定しない場合、システムが自動的に名前を割り当てます。 |
InternetChargeType | String | いいえ | はい | パブリックインスタンスの課金方法。 | 有効な値:
|
MasterZoneId | String | いいえ | いいえ | インスタンスのプライマリゾーン ID。 | なし |
Tags | List | いいえ | はい | SLB インスタンスのタグ。 | 最大 5 つのタグを追加できます。 詳細については、「タグプロパティ」をご参照ください。 |
LoadBalancerSpec | String | いいえ | はい | SLB インスタンスの仕様。 | 有効な値:
サポートされる仕様はリージョンによって異なります。各仕様の詳細については、「保証性能インスタンス」をご参照ください。 |
ModificationProtectionStatus | String | いいえ | はい | 保護ステータスを変更できます。 | 有効な値:
|
ModificationProtectionReason | String | いいえ | はい | 変更保護を有効にする理由。 | 長さ:1 ~ 80 文字。英字または漢字で始める必要があります。使用可能な文字は、英字、漢字、数字、ピリオド(.)、ハイフン(-)です。 |
AddressIPVersion | String | いいえ | いいえ | IP バージョン。 | 有効な値:
|
InstanceChargeType | String | いいえ | はい | インスタンスの課金方法。 | 有効な値:
|
タグの構文
"Tags": [
{
"Key": String,
"Value": String
}
]タグプロパティ
プロパティ名 | 型 | 必須 | 更新可否 | 説明 | 制約 |
Key | String | はい | いいえ | タグキー。 | 長さ:1 ~ 64 文字。先頭に |
Value | String | いいえ | いいえ | タグ値。 | 長さ:0 ~ 128 文字。先頭に |
戻り値
Fn::GetAtt
LoadBalancerId:SLB インスタンスの ID。
NetworkType:SLB インスタンスのネットワークタイプ。
AddressType:SLB インスタンスのアドレスタイプ。
IpAddress:SLB インスタンスの IP アドレス。
OrderId:注文 ID。
Bandwidth:ピーク帯域幅。
AddressIPVersion:SLB インスタンスの IP バージョン。
SlaveZoneId:SLB インスタンスのセカンダリゾーン ID。
MasterZoneId:SLB インスタンスのプライマリゾーン ID。
LoadBalancerName:SLB インスタンスの名前。
ResourceGroupId:リソースグループの ID。
LoadBalancerSpec:SLB インスタンスの仕様。
VpcId:SLB インスタンスが属する VPC の ID。
VSwitchId:SLB インスタンスが属する vSwitch の ID。
PayType:インスタンスの課金方法。
例
シナリオ 1: SLB インスタンスの作成
ROSTemplateFormatVersion: '2015-09-01'
Description: Test SLB LoadBalancer
Parameters:
MasterZoneId:
Type: String
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
Resources:
LoadBalance:
Type: ALIYUN::SLB::LoadBalancer
Properties:
AddressType: internet
LoadBalancerSpec: slb.s1.small
MasterZoneId:
Ref: MasterZoneId
LoadBalancerName: mytest
Outputs: {}{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": "Test SLB LoadBalancer",
"Parameters": {
"MasterZoneId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
}
},
"Resources": {
"LoadBalance": {
"Type": "ALIYUN::SLB::LoadBalancer",
"Properties": {
"AddressType": "internet",
"LoadBalancerSpec": "slb.s1.small",
"MasterZoneId": {
"Ref": "MasterZoneId"
},
"LoadBalancerName": "mytest"
}
}
},
"Outputs": {
}
}シナリオ 2: ECS インスタンスグループを作成し、SLB インスタンスにアタッチする
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: Create an ECS instance group with flexible configuration and automatically bind to three SLB instances to achieve load balancing.
en: 柔軟な構成で ECS インスタンスグループを作成し、3 つの SLB インスタンスに自動的にバインドして、負荷分散を実現します。
Parameters:
ZoneId:
Type: String
Default: null
Required: true
Label:
en: 可用性ゾーン
zh-cn: Available zone
AssociationProperty: ALIYUN::ECS::Instance::ZoneId
AssociationPropertyMetadata:
AutoSelectFirst: true
VpcId:
Type: String
AssociationProperty: ALIYUN::ECS::VPC::VPCId
VSwitchId:
Type: String
AssociationProperty: ALIYUN::ECS::VSwitch::VSwitchId
AssociationPropertyMetadata:
ZoneId: ${ZoneId}
VpcId: ${VpcId}
SecurityGroupId:
Type: String
Label:
en: ビジネスセキュリティグループ ID
zh-cn: Business security group ID
AssociationProperty: ALIYUN::ECS::SecurityGroup::SecurityGroupId
AssociationPropertyMetadata:
VpcId: ${VpcId}
InstanceType:
Type: String
Label: ECS インスタンスタイプ
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: ZoneId
Password:
Type: String
Label: ECS インスタンスパスワード
AssociationProperty: ALIYUN::ECS::Instance::Password
SlbInstanceId:
AssociationProperty: ALIYUN::SLB::LoadBalancer::LoadBalancerId
Type: String
Resources:
InstanceGroup:
Type: ALIYUN::ECS::InstanceGroup
Properties:
VpcId:
Ref: VpcId
VSwitchId:
Ref: VSwitchId
SecurityGroupId:
Ref: SecurityGroupId
ImageId: centos_7
AllocatePublicIP: 'false'
MaxAmount: 2
Password:
Ref: Password
InstanceType:
Ref: InstanceType
SystemDiskCategory: cloud_essd
UserData:
Fn::Join:
- ''
- - '#!/bin/sh
'
- 'ip_addr=`ifconfig eth0 | awk ''/inet /{print $2}''`
'
- 'host_name=`hostname`
'
- 'echo "$ip_addr $host_name" >> /etc/hosts
'
AttachmentECSToSLB:
Type: ALIYUN::SLB::BackendServerAttachment
Properties:
LoadBalancerId:
Ref: SlbInstanceId
BackendServerList:
Fn::GetAtt:
- InstanceGroup
- InstanceIds
BackendServerWeightList:
- '100'
Outputs:
InstanceIds:
Description: 作成された ECS インスタンスのインスタンス ID リスト。
Value:
Fn::GetAtt:
- InstanceGroup
- InstanceIds
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"zh-cn": "柔軟な構成で ECS インスタンスグループを作成し、3 つの SLB インスタンスに自動的にバインドしてロードバランスを実現します。",
"en": "Create an ECS instance group with flexible configuration and automatically bind to three SLB instances to achieve load balancing."
},
"Parameters": {
"ZoneId": {
"Type": "String",
"Default": null,
"Required": true,
"Label": {
"en": "Availability Zone",
"zh-cn": "Available zone"
},
"AssociationProperty": "ALIYUN::ECS::Instance::ZoneId",
"AssociationPropertyMetadata": {
"AutoSelectFirst": true
}
},
"VpcId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::VPC::VPCId"
},
"VSwitchId": {
"Type": "String",
"AssociationProperty": "ALIYUN::ECS::VSwitch::VSwitchId",
"AssociationPropertyMetadata": {
"ZoneId": "${ZoneId}",
"VpcId": "${VpcId}"
}
},
"SecurityGroupId": {
"Type": "String",
"Label": {
"en": "Business Security Group ID",
"zh-cn": "Business security group ID"
},
"AssociationProperty": "ALIYUN::ECS::SecurityGroup::SecurityGroupId",
"AssociationPropertyMetadata": {
"VpcId": "${VpcId}"
}
},
"InstanceType": {
"Type": "String",
"Label": "ECS Instance Type",
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
"AssociationPropertyMetadata": {
"ZoneId": "ZoneId"
}
},
"Password": {
"Type": "String",
"Label": "ECS Instance Password",
"AssociationProperty": "ALIYUN::ECS::Instance::Password"
},
"SlbInstanceId": {
"AssociationProperty": "ALIYUN::SLB::LoadBalancer::LoadBalancerId",
"Type": "String"
}
},
"Resources": {
"InstanceGroup": {
"Type": "ALIYUN::ECS::InstanceGroup",
"Properties": {
"VpcId": {
"Ref": "VpcId"
},
"VSwitchId": {
"Ref": "VSwitchId"
},
"SecurityGroupId": {
"Ref": "SecurityGroupId"
},
"ImageId": "centos_7",
"AllocatePublicIP": "false",
"MaxAmount": 2,
"Password": {
"Ref": "Password"
},
"InstanceType": {
"Ref": "InstanceType"
},
"SystemDiskCategory": "cloud_essd",
"UserData": {
"Fn::Join": [
"",
[
"#!/bin/sh\n",
"ip_addr=`ifconfig eth0 | awk '/inet /{print $2}'`\n",
"host_name=`hostname`\n",
"echo \"$ip_addr $host_name\" >> /etc/hosts\n"
]
]
}
}
},
"AttachmentECSToSLB": {
"Type": "ALIYUN::SLB::BackendServerAttachment",
"Properties": {
"LoadBalancerId": {
"Ref": "SlbInstanceId"
},
"BackendServerList": {
"Fn::GetAtt": [
"InstanceGroup",
"InstanceIds"
]
},
"BackendServerWeightList": [
"100"
]
}
}
},
"Outputs": {
"InstanceIds": {
"Description": "The instance id list of created ecs instance.",
"Value": {
"Fn::GetAtt": [
"InstanceGroup",
"InstanceIds"
]
}
}
}
}シナリオ 3: E コマースサイト保護計画の作成
ROSTemplateFormatVersion: '2015-09-01'
Description:
zh-cn: Virtual Private Cloud (VPC)、Elastic Compute Service (ECS)、Server Load Balancer (SLB)、Relational Database Service (RDS) のリソースを活用した E コマースサイト保護計画を開発します。転売業者がキャンペーンを悪用することを防止し、サービスの安定性と割引の正当性を確保します。冗長性および高可用性を実現するために、複数の可用性ゾーンに展開します。
en: Develop an e-commerce website protection plan, encompassing Virtual Private Cloud (VPC), Elastic Compute Service (ECS), Server Load Balancer (SLB), and Relational Database Service (RDS) resources. Implement measures to prevent scalpers from exploiting promotions, ensuring service stability and the authenticity of discounts. Deploy across multiple availability zones for redundancy and high availability.
Parameters:
VpcCidrBlock:
Type: String
Label:
en: VPC CIDR Block
zh-cn: VPC CIDR block
Description:
en: 'The IP address range of the VPC in the CIDR Block form;
You can use the following IP address ranges: <br><font color=''green''>[10.0.0.0/8]</font><br><font color=''green''>[172.16.0.0/12]</font><br><font color=''green''>[192.168.0.0/16]</font>'
zh-cn: The IP address range of the VPC in CIDR notation.<br>You can use the following IP address ranges:<br><font color='green'>[10.0.0.0/8]</font><br><font color='green'>[172.16.0.0/12]</font><br><font color='green'>[192.168.0.0/16]</font>
Default: 192.168.0.0/16
AllowedValues:
- 10.0.0.0/8
- 172.16.0.0/12
- 192.168.0.0/16
VSwitchZoneId:
Type: String
Label:
en: Master Zone
zh-cn: Primary zone
Description:
en: 'Availability Zone ID;<br><b>Note: <font color=''blue''>Before selecting an availability zone, verify that it supports the required specifications for creating SLB, RDS, and ECS resources.</font>'
zh-cn: The availability zone ID.<br/><b>Note: <font color='blue'>Before selecting an availability zone, verify that it supports the required specifications for creating SLB, RDS, and ECS resources.</font>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
VswCidrBlock:
Type: String
Label:
en: Master Zone CIDR Block
zh-cn: Primary zone CIDR block
Description:
en: Must be a subnet segment that belongs to the VPC and is not occupied by another vSwitch.
zh-cn: Must be a subnet segment that belongs to the VPC and is not occupied by another vSwitch.
Default: 192.168.1.0/24
VSwitchZoneId2:
Type: String
Label:
en: Slave Zone
zh-cn: Secondary zone
Description:
en: 'Availability Zone ID,<br/><b>Note: <font color=''blue''>Before selecting an availability zone, verify that it supports the required specifications for creating SLB resources and differs from the primary zone.</font>'
zh-cn: The availability zone ID.<br/><b>Note: <font color='blue'>Before selecting an availability zone, verify that it supports the required specifications for creating SLB resources and differs from the primary zone.</font>
AssociationProperty: ALIYUN::ECS::Instance:ZoneId
VswCidrBlock2:
Type: String
Label:
en: Slave Zone CIDR Block
zh-cn: Secondary zone CIDR block
Description:
en: Must be a subnet segment that belongs to the VPC and is not occupied by another vSwitch.
zh-cn: Must be a subnet segment that belongs to the VPC and is not occupied by another vSwitch.
Default: 192.168.2.0/24
EcsInstanceType:
Type: String
Label:
en: Instance Type
zh-cn: Instance type
Description:
en: 'Enter the instance types available in the vSwitch availability zone.</font>
General-purpose instance types: <font color=''red''><b>ecs.g5.xlarge</font><br/>Note: Some zones do not support general-purpose instance types.<br>For details, see <a href=''https://www.alibabacloud.com/help/en/doc-detail/25378.html'' target=''_blank''><b><font color=''blue''>Instance family</font></a>'
zh-cn: Enter the instance types available in the vSwitch availability zone.<br/>General-purpose instance types: <font color='red'><b>ecs.g5.xlarge</font><br/>Note: Some zones do not support general-purpose instance types.<br>For details, see <a href='https://www.alibabacloud.com/help/document_detail/25378.html' target='_blank'><b><font color='blue'>instance family</font></a>
AssociationProperty: ALIYUN::ECS::Instance::InstanceType
AssociationPropertyMetadata:
ZoneId: VSwitchZoneId
ECSImageId:
Type: String
Label:
en: Application Server Image
zh-cn: Application server image
Description:
en: 'Server instance image ID.
[Shanghai: <font color=''green''>m-uf6j125b6mhvg27jo58a</font>]<br>[Hangzhou: <font color=''green''>m-bp1h0ys627i2ke0dx0t1</font>]<br>[Beijing: <font color=''green''>m-2zeir96eip2yw414w1jd</font>]<br>[Qingdao: <font color=''green''>m-m5e81ywnfuk84x1r7v0n</font>]<br>[Shenzhen: <font color=''green''>m-wz98u1criwvafhq3ctfm</font>]<br>[Zhangjiakou: <font color=''green''>m-8vbg3h5yp5ncag0q31lt</font>]<br>[Hohhot: <font color=''green''>m-hp34cnncgeiowbkzpmic</font>]<br>[Hong Kong: <font color=''green''>m-j6c0e5hkfmzk6d8bfss1</font>]<br>[US (Silicon Valley): <font color=''green''>m-rj981ywnfuk84x1r7v0p</font>]<br>Note: For more images, see <b><a href=''https://marketplace.alibabacloud.com/products?keywords=magento'' target=''_blank''><font color=''blue''>Magento image</font></a>'
zh-cn: Server instance image ID.<br/>Alibaba Cloud Marketplace image name: Magento Open Source E-commerce System (LAMP | Chinese package)<br><b>Sample values:<br/>[Shanghai: <font color='green'>m-uf6j125b6mhvg27jo58a</font>]<br>[Hangzhou: <font color='green'>m-bp1h0ys627i2ke0dx0t1</font>]<br>[Beijing: <font color='green'>m-2zeir96eip2yw414w1jd</font>]<br>[Qingdao: <font color='green'>m-m5e81ywnfuk84x1r7v0n</font>]<br>[Shenzhen: <font color='green'>m-wz98u1criwvafhq3ctfm</font>]<br>[Zhangjiakou: <font color='green'>m-8vbg3h5yp5ncag0q31lt</font>]<br>[Hohhot: <font color='green'>m-hp34cnncgeiowbkzpmic</font>]<br>[Hong Kong: <font color='green'>m-j6c0e5hkfmzk6d8bfss1</font>]<br>[US (Silicon Valley): <font color='green'>m-rj981ywnfuk84x1r7v0p</font>]<br>Note: For more images, see <b><a href='https://market.aliyun.com/products/53616009/cmjj00038197.html' target='_blank'><font color='blue'>Magento image</font></a>
SystemDiskCategory:
Type: String
Label:
en: Disk Type
zh-cn: Disk type
Description:
en: '<font color=''blue''><b>Valid values:</font>
[cloud_efficiency: <font color=''green''>Ultra disk</font>]<br>[cloud_ssd: <font color=''green''>Standard SSD</font>]<br>[cloud_essd: <font color=''green''>Enterprise SSD</font>]<br>[cloud: <font color=''green''>Basic disk</font>]<br>[ephemeral_ssd: <font color=''green''>Local SSD</font>]'
zh-cn: '<font color=''blue''><b>Valid values:</font><br/>[cloud_efficiency: <font color=''green''>Ultra disk</font>]<br>[cloud_ssd: <font color=''green''>Standard SSD</font>]<br>[cloud_essd: <font color=''green''>Enterprise SSD</font>]<br>[cloud: <font color=''green''>Basic disk</font>]<br>[ephemeral_ssd: <font color=''green''>Local SSD</font>]'
Default: cloud_efficiency
AllowedValues:
- cloud_efficiency
- cloud_ssd
- cloud
- cloud_essd
- ephemeral_ssd
SystemDiskSize:
Type: Number
Label:
en: System Disk Size
zh-cn: System disk size
Description:
en: 'System disk size. Valid values: 40 to 500. Unit: GB.'
zh-cn: System disk size. Valid values: 40 to 500. Unit: GB.
ConstraintDescription:
en: 'Valid values: 40 to 500. Unit: GB.'
zh-cn: Valid values: 40 to 500. Unit: GB.
Default: 40
MinValue: 40
MaxValue: 500
EcsPassword:
Type: String
Label:
en: Login Password
zh-cn: Logon password
Description:
en: 'Server logon password. Length: 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters ()`~!@#$%^&*_-+=| {}[]:;' <>,.? / .'
zh-cn: Server logon password. Length: 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/.
ConstraintDescription:
en: 'Length: 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters ()`~!@#$%^&*_-+=| {}[]:;' <>,.? / .'
zh-cn: Length: 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/.
AssociationProperty: 'ALIYUN::ECS::Instance::Password'
LoadBalancerName:
Type: String
Label:
en: Instance Name
zh-cn: Instance name
Description:
en: 'Length: 1 to 80 characters. Valid characters include letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).'
zh-cn: Length: 1 to 80 characters. Valid characters include letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_).
Default: slb001
LoadBalancerSpec:
Type: String
Label:
en: Specifications
zh-cn: Specifications
Description:
en: 'Instance specifications.</br>For details, see <a href=''https://www.alibabacloud.com/help/doc-detail/85939.html'' target=''_blank''><b><font color=''blue''>Guaranteed-performance instance</font></a>'
zh-cn: Instance specifications.</br>For details, see <a href='https://www.alibabacloud.com/help/document_detail/85939.html' target='_blank'><b><font color='blue'>guaranteed-performance instance</font></a>
Default: slb.s1.small
DBInstanceEngineAndVersion:
Type: String
Label:
en: Type And Version
zh-cn: Type and version
Description:
en: Database engine type and version number.
zh-cn: Database engine type and version number.
Default: MySQL-5.6
AllowedValues:
- MySQL-5.5
- MySQL-5.6
- MySQL-5.7
- MySQL-8.0
DBInstanceClass:
Type: String
Label:
en: Specifications
zh-cn: Specifications
Description:
en: 'Select the instance specification based on the database engine type and region support.
For details, see <a href=''https://www.alibabacloud.com/help/doc-detail/26312.html'' target=''_blank''><b><font color=''blue''>Instance specification sheet</font></a>'
zh-cn: Select the instance specification based on the database engine type and region support.<br/>For details, see <a href='https://www.alibabacloud.com/help/document_detail/26312.html' target='_blank'><b><font color='blue'>instance specification sheet</font></a>
Default: rds.mysql.s2.large
DBInstanceStorage:
Type: Number
Label:
en: Storage Space
zh-cn: Storage space
Description:
en: 'Database storage space. Unit: GB. Increments: 5 GB. Valid values: 5 to 1000.'
zh-cn: Database storage space. Unit: GB. Increments: 5 GB. Valid values: 5 to 1000.
ConstraintDescription:
en: 'Database storage space. Unit: GB. Increments: 5 GB. Valid values: 5 to 1000.'
zh-cn: Database storage space. Unit: GB. Increments: 5 GB. Valid values: 5 to 1000.
Default: 5
MinValue: 5
MaxValue: 1000
RdsUserPassword:
Type: String
Label:
en: Password
zh-cn: Password
Description:
en: 'The privileged account password for the database instance. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters !@#$%^&*()_+-=. Length: 8 to 32 characters.'
zh-cn: The privileged account password for the database instance. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters !@#$%^&*()_+-=. Length: 8 to 32 characters.
AssociationProperty: ALIYUN::RDS::Instance::AccountPassword
ConstraintDescription:
en: 'Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters !@#$%^&*()_+-=. Length: 8 to 32 characters.'
zh-cn: Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters !@#$%^&*()_+-=. Length: 8 to 32 characters.
MinLength: 8
MaxLength: 32
NoEcho: true
DBName:
Type: String
Label:
en: Database Name
zh-cn: Database name
Description:
en: 'Database name. Consists of lowercase letters, digits, and hyphens (-) or underscores (_). Must start with a letter and end with a letter or digit. Maximum length: 64 characters.'
zh-cn: Database name. Consists of lowercase letters, digits, and hyphens (-) or underscores (_). Must start with a letter and end with a letter or digit. Maximum length: 64 characters.
Default: db_magento
RdsUserType:
Type: String
Label:
en: Account Type
zh-cn: Account type
Description:
en: '<b>Database account type. <font color=''blue''>Valid values:</font><br/>[Normal: <font color=''green''>Standard account</font>]<br>[Super: <font color=''green''>Privileged account</font>]'
zh-cn: '<b>Database account type. <font color=''blue''>Valid values:</font><br>[Normal: <font color=''green''>Standard account</font>]<br>[Super: <font color=''green''>Privileged account</font>]'
Default: Normal
AllowedValues:
- Super
- Normal
RdsUserName:
Type: String
Label:
en: Database Account
zh-cn: Database account
Description:
en: 'Database account name. Consists of lowercase letters, digits, and underscores (_). Must start with a letter and end with a letter or digit. Length: 2 to 16 characters.'
zh-cn: Database account name. Consists of lowercase letters, digits, and underscores (_). Must start with a letter and end with a letter or digit. Length: 2 to 16 characters.
Default: account_magento
MinLength: 2
MaxLength: 16
Resources:
Vpc:
Type: ALIYUN::ECS::VPC
Properties:
CidrBlock:
Ref: VpcCidrBlock
VpcName:
Fn::Join:
- '-'
- - Stack
- Ref: ALIYUN::StackId
SecurityGroup:
Type: ALIYUN::ECS::SecurityGroup
Properties:
VpcId:
Ref: Vpc
SecurityGroupIngress:
- IpProtocol: tcp
Policy: accept
PortRange: 3389/3389
Priority: 1
SourceCidrIp: 0.0.0.0/0
Tags:
- Key: best_practice
Value: '065'
VSwitch:
Type: ALIYUN::ECS::VSwitch
Properties:
ZoneId:
Ref: VSwitchZoneId
VpcId:
Ref: Vpc
CidrBlock:
Ref: VswCidrBlock
VSwitchName:
Fn::Join:
- '-'
- - Stack
- Ref: ALIYUN::StackId
- Fn::Select:
- '2'
- Fn::Split:
- '-'
- Ref: VSwitchZoneId
ECS:
Type: ALIYUN::ECS::Instance
Properties:
ZoneId:
Ref: VSwitchZoneId
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
SecurityGroupId:
Ref: SecurityGroup
ImageId:
Ref: ECSImageId
AllocatePublicIP: true
HostName: APP001
InstanceName: APP001
InstanceType:
Ref: EcsInstanceType
InternetChargeType: PayByTraffic
Password:
Ref: EcsPassword
SystemDiskCategory:
Ref: SystemDiskCategory
SystemDiskSize:
Ref: SystemDiskSize
Tags:
- Key: '065'
Value: best_practice
SLBLoadBalance:
Type: ALIYUN::SLB::LoadBalancer
Properties:
VpcId:
Ref: Vpc
AddressType: internet
InternetChargeType: paybytraffic
LoadBalancerName:
Ref: LoadBalancerName
LoadBalancerSpec:
Ref: LoadBalancerSpec
MasterZoneId:
Ref: VSwitchZoneId
PayType: PayOnDemand
SlaveZoneId:
Ref: VSwitchZoneId2
Tags:
- Key: '065'
Value: best_practice
BackendServerAttachment:
Type: ALIYUN::SLB::BackendServerAttachment
Properties:
BackendServerList:
- Ref: ECS
BackendServerWeightList:
- 100
LoadBalancerId:
Ref: SLBLoadBalance
DependsOn:
- ECS
- SLBLoadBalance
Listener:
Type: ALIYUN::SLB::Listener
Properties:
BackendServerPort: 80
Bandwidth: -1
ListenerPort: 80
LoadBalancerId:
Ref: SLBLoadBalance
Protocol: http
DependsOn: SLBLoadBalance
RdsDBInstance:
Type: ALIYUN::RDS::DBInstance
Properties:
VpcId:
Ref: Vpc
VSwitchId:
Ref: VSwitch
DBInstanceClass:
Ref: DBInstanceClass
DBInstanceStorage:
Ref: DBInstanceStorage
DBMappings:
- CharacterSetName: utf8
DBName:
Ref: DBName
Engine:
Fn::Select:
- '0'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
EngineVersion:
Fn::Select:
- '1'
- Fn::Split:
- '-'
- Ref: DBInstanceEngineAndVersion
MasterUserPassword:
Ref: RdsUserPassword
MasterUserType:
Ref: RdsUserType
MasterUsername:
Ref: RdsUserName
MultiAZ: true
SecurityIPList:
Ref: VpcCidrBlock
Tags:
Key: best_practice
Value: '065'
Outputs:
ECSPublicIP:
Description: Public IP address of the Magento server
Value:
Fn::GetAtt:
- ECS
- PublicIp
Metadata:
ALIYUN::ROS::Interface:
ParameterGroups:
- Parameters:
- VpcCidrBlock
- VSwitchZoneId
- VswCidrBlock
- VSwitchZoneId2
- VswCidrBlock2
Label:
default: VPC
- Parameters:
- EcsInstanceType
- ECSImageId
- SystemDiskCategory
- SystemDiskSize
- EcsPassword
Label:
default: ECS
- Parameters:
- LoadBalancerName
- LoadBalancerSpec
Label:
default: SLB
- Parameters:
- DBInstanceEngineAndVersion
- DBInstanceClass
- DBInstanceStorage
- RdsUserPassword
- DBName
- RdsUserType
- RdsUserName
Label:
default: RDS
TemplateTags:
- acs:solution:security&compliance:e-commerce website business security<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
{
"ROSTemplateFormatVersion": "2015-09-01",
"Description": {
"zh-cn": "E コマース Web サイトの保護計画を作成します。Virtual Private Cloud (VPC)、Elastic Compute Service (ECS)、Server Load Balancer (SLB)、Relational Database Service (RDS) の各リソースを含みます。転売業者がプロモーションを悪用するのを防ぐための対策を実装し、サービスの安定性と割引の真正性を確保します。冗長性および高可用性を実現するために、複数のアベイラビリティゾーンにデプロイします。",
"en": "Develop an e-commerce website protection plan, encompassing Virtual Private Cloud (VPC), Elastic Compute Service (ECS), Server Load Balancer (SLB), and Relational Database Service (RDS) resources. Implement measures to prevent scalpers from exploiting promotions, ensuring service stability and the authenticity of discounts. Deploy across multiple availability zones for redundancy and high availability."
},
"Parameters": {
"VpcCidrBlock": {
"Type": "String",
"Label": {
"en": "VPC CIDR ブロック",
"zh-cn": "VPC CIDR block"
},
"Description": {
"en": "CIDR ブロック形式の VPC の IP アドレス範囲。<br/>以下の IP アドレス範囲を使用できます:<br/><font color='green'>[10.0.0.0/8]</font><br/><font color='green'>[172.16.0.0/12]</font><br/><font color='green'>[192.168.0.0/16]</font>",
"zh-cn": "The IP address range of the VPC in CIDR notation.<br>You can use the following IP address ranges:<br><font color='green'>[10.0.0.0/8]</font><br><font color='green'>[172.16.0.0/12]</font><br><font color='green'>[192.168.0.0/16]</font>"
},
"Default": "192.168.0.0/16",
"AllowedValues": [
"10.0.0.0/8",
"172.16.0.0/12",
"192.168.0.0/16"
]
},
"VSwitchZoneId": {
"Type": "String",
"Label": {
"en": "プライマリゾーン",
"zh-cn": "Primary zone"
},
"Description": {
"en": "アベイラビリティゾーン ID。<br/><b>注:<font color='blue'>アベイラビリティゾーンを選択する前に、SLB、RDS、ECS リソースの作成に必要な仕様がそのゾーンでサポートされていることを確認してください。</font>",
"zh-cn": "The availability zone ID.<br/><b>Note: <font color='blue'>Before selecting an availability zone, verify that it supports the required specifications for creating SLB、RDS、ECS resources.</font>"
},
"AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
},
"VswCidrBlock": {
"Type": "String",
"Label": {
"en": "プライマリゾーン CIDR ブロック",
"zh-cn": "Primary zone CIDR block"
},
"Description": {
"en": "VPC に属し、他の vSwitch によって使用されていないサブネットセグメントである必要があります。",
"zh-cn": "Must be a subnet segment that belongs to the VPC and is not occupied by another vSwitch."
},
"Default": "192.168.1.0/24"
},
"VSwitchZoneId2": {
"Type": "String",
"Label": {
"en": "セカンダリゾーン",
"zh-cn": "Secondary zone"
},
"Description": {
"en": "アベイラビリティゾーン ID。<br/><b>注:<font color='blue'>アベイラビリティゾーンを選択する前に、SLB リソースの作成に必要な仕様がそのゾーンでサポートされていることを確認し、プライマリゾーンとは異なるゾーンを選択してください。</font>",
"zh-cn": "The availability zone ID.<br/><b>Note: <font color='blue'>Before selecting an availability zone, verify that it supports the required specifications for creating SLB resources and differs from the primary zone.</font>"
},
"AssociationProperty": "ALIYUN::ECS::Instance:ZoneId"
},
"VswCidrBlock2": {
"Type": "String",
"Label": {
"en": "セカンダリゾーン CIDR ブロック",
"zh-cn": "Secondary zone CIDR block"
},
"Description": {
"en": "VPC に属し、他の vSwitch によって使用されていないサブネットセグメントである必要があります。",
"zh-cn": "Must be a subnet segment that belongs to the VPC and is not occupied by another vSwitch."
},
"Default": "192.168.2.0/24"
},
"EcsInstanceType": {
"Type": "String",
"Label": {
"en": "インスタンスタイプ",
"zh-cn": "Instance type"
},
"Description": {
"en": "vSwitch のアベイラビリティゾーンで使用可能な仕様を入力してください。<br/>汎用インスタンスタイプ:<font color='red'><b>ecs.g5.xlarge</font><br/>注:一部のゾーンでは汎用インスタンスタイプがサポートされていません。<br/>詳細については、「<a href='https://www.alibabacloud.com/help/en/doc-detail/25378.html' target='_blank'><b><font color='blue'>インスタンスファミリー</font></a>」をご参照ください。",
"zh-cn": "Enter the instance types available in the vSwitch availability zone.<br/>General-purpose instance types: <font color='red'><b>ecs.g5.xlarge</font><br/>Note: Some zones do not support general-purpose instance types.<br>For details, see <a href='https://www.alibabacloud.com/help/document_detail/25378.html' target='_blank'><b><font color='blue'>instance family</font></a>"
},
"AssociationProperty": "ALIYUN::ECS::Instance::InstanceType",
"AssociationPropertyMetadata": {
"ZoneId": "VSwitchZoneId"
}
},
"ECSImageId": {
"Type": "String",
"Label": {
"en": "アプリケーションサーバーイメージ",
"zh-cn": "Application server image"
},
"Description": {
"en": "サーバーインスタンスのイメージ ID。<br/>Alibaba Cloud Marketplace のイメージ名:Magento Open Source E コマースシステム(LAMP | 中国語パッケージ)<br/><b>サンプル値:<br/>[上海:<font color='green'>m-uf6j125b6mhvg27jo58a</font>]<br>[杭州:<font color='green'>m-bp1h0ys627i2ke0dx0t1</font>]<br>[北京:<font color='green'>m-2zeir96eip2yw414w1jd</font>]<br>[青島:<font color='green'>m-m5e81ywnfuk84x1r7v0n</font>]<br>[深セン:<font color='green'>m-wz98u1criwvafhq3ctfm</font>]<br>[張家口:<font color='green'>m-8vbg3h5yp5ncag0q31lt</font>]<br>[フフホト:<font color='green'>m-hp34cnncgeiowbkzpmic</font>]<br>[香港:<font color='green'>m-j6c0e5hkfmzk6d8bfss1</font>]<br>[米国(シリコンバレー):<font color='green'>m-rj981ywnfuk84x1r7v0p</font>]<br>注:その他のイメージについては、「<b><a href='https://marketplace.alibabacloud.com/products?keywords=magento' target='_blank'><font color='blue'>Magento イメージ</font></a>」をご参照ください。",
"zh-cn": "Server instance image ID.<br/>Alibaba Cloud Marketplace image name: Magento Open Source E-commerce System (LAMP | Chinese package)<br><b>Sample values:<br/>[Shanghai: <font color='green'>m-uf6j125b6mhvg27jo58a</font>]<br>[Hangzhou: <font color='green'>m-bp1h0ys627i2ke0dx0t1</font>]<br>[Beijing: <font color='green'>m-2zeir96eip2yw414w1jd</font>]<br>[Qingdao: <font color='green'>m-m5e81ywnfuk84x1r7v0n</font>]<br>[Shenzhen: <font color='green'>m-wz98u1criwvafhq3ctfm</font>]<br>[Zhangjiakou: <font color='green'>m-8vbg3h5yp5ncag0q31lt</font>]<br>[Hohhot: <font color='green'>m-hp34cnncgeiowbkzpmic</font>]<br>[Hong Kong: <font color='green'>m-j6c0e5hkfmzk6d8bfss1</font>]<br>[US (Silicon Valley): <font color='green'>m-rj981ywnfuk84x1r7v0p</font>]<br>Note: For more images, see <b><a href='https://market.aliyun.com/products/53616009/cmjj00038197.html' target='_blank'><font color='blue'>Magento image</font></a>"
}
},
"SystemDiskCategory": {
"Type": "String",
"Label": {
"en": "ディスクタイプ",
"zh-cn": "Disk type"
},
"Description": {
"en": "<font color='blue'><b>有効な値:</font><br>[cloud_efficiency: <font color='green'>Ultra disk</font>]<br>[cloud_ssd: <font color='green'>Standard SSD</font>]<br>[cloud_essd: <font color='green'>Enterprise SSD</font>]<br>[cloud: <font color='green'>Basic disk</font>]<br>[ephemeral_ssd: <font color='green'>Local SSD</font>]",
"zh-cn": "<font color='blue'><b>Valid values:</font><br/>[cloud_efficiency: <font color='green'>Ultra disk</font>]<br>[cloud_ssd: <font color='green'>Standard SSD</font>]<br>[cloud_essd: <font color='green'>Enterprise SSD</font>]<br>[cloud: <font color='green'>Basic disk</font>]<br>[ephemeral_ssd: <font color='green'>Local SSD</font>]"
},
"Default": "cloud_efficiency",
"AllowedValues": [
"cloud_efficiency",
"cloud_ssd",
"cloud",
"cloud_essd",
"ephemeral_ssd"
]
},
"SystemDiskSize": {
"Type": "Number",
"Label": {
"en": "システムディスクサイズ",
"zh-cn": "System disk size"
},
"Description": {
"en": "システムディスクサイズ。有効値:40 ~ 500。単位:GB。",
"zh-cn": "System disk size, valid values: 40 to 500. Unit: GB."
},
"ConstraintDescription": {
"en": "有効値:40 ~ 500。単位:GB。",
"zh-cn": "Valid values: 40 to 500. Unit: GB."
},
"Default": 40,
"MinValue": 40,
"MaxValue": 500
},
"EcsPassword": {
"Type": "String",
"Label": {
"en": "ログインパスワード",
"zh-cn": "Logon password"
},
"Description": {
"en": "サーバーのログインパスワード。長さ:8 ~ 30 文字。大文字、小文字、数字、特殊文字 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ のうち、少なくとも 3 種類を含む必要があります。",
"zh-cn": "Server logon password, length: 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/."
},
"ConstraintDescription": {
"en": "長さ:8 ~ 30 文字。大文字、小文字、数字、特殊文字 ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/ のうち、少なくとも 3 種類を含む必要があります。",
"zh-cn": "Length: 8 to 30 characters. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters ()`~!@#$%^&*_-+=|{}[]:;'<>,.?/."
},
"AssociationProperty": "ALIYUN::ECS::Instance::Password"
},
"LoadBalancerName": {
"Type": "String",
"Label": {
"en": "インスタンス名",
"zh-cn": "Instance name"
},
"Description": {
"en": "長さ:1 ~ 80 文字。英字、数字、ハイフン (-)、スラッシュ (/)、ピリオド (.)、アンダースコア (_) を使用できます。",
"zh-cn": "Length: 1 to 80 characters. Valid characters include letters, digits, hyphens (-), forward slashes (/), periods (.), and underscores (_)."
},
"Default": "slb001"
},
"LoadBalancerSpec": {
"Type": "String",
"Label": {
"en": "仕様",
"zh-cn": "Specifications"
},
"Description": {
"en": "インスタンスの仕様。<br/>詳細については、「<a href='https://www.alibabacloud.com/help/doc-detail/85939.html' target='_blank'><b><font color='blue'>保証パフォーマンスインスタンス</font></a>」をご参照ください。",
"zh-cn": "Instance specifications.</br>For details, see <a href='https://www.alibabacloud.com/help/document_detail/85939.html' target='_blank'><b><font color='blue'>guaranteed-performance instance</font></a>"
},
"Default": "slb.s1.small"
},
"DBInstanceEngineAndVersion": {
"Type": "String",
"Label": {
"en": "タイプおよびバージョン",
"zh-cn": "Type and version"
},
"Description": {
"en": "データベースエンジンの種類およびバージョン番号。",
"zh-cn": "Database engine type and version number."
},
"Default": "MySQL-5.6",
"AllowedValues": [
"MySQL-5.5",
"MySQL-5.6",
"MySQL-5.7",
"MySQL-8.0"
]
},
"DBInstanceClass": {
"Type": "String",
"Label": {
"en": "仕様",
"zh-cn": "Specifications"
},
"Description": {
"en": "データベースエンジンの種類およびリージョンのサポートに基づいて、インスタンスの仕様を選択してください。<br/>詳細については、「<a href='https://www.alibabacloud.com/help/doc-detail/26312.html' target='_blank'><b><font color='blue'>インスタンス仕様一覧</font></a>」をご参照ください。",
"zh-cn": "Select the instance specification based on the database engine type and region support.<br/>For details, see <a href='https://www.alibabacloud.com/help/document_detail/26312.html' target='_blank'><b><font color='blue'>instance specification sheet</font></a>"
},
"Default": "rds.mysql.s2.large"
},
"DBInstanceStorage": {
"Type": "Number",
"Label": {
"en": "ストレージ容量",
"zh-cn": "Storage space"
},
"Description": {
"en": "データベースのストレージ容量。単位:GB。増分:5 GB。有効値:5 ~ 1000。",
"zh-cn": "Database storage space. Unit: GB. Increments: 5 GB. Valid values: 5 to 1000."
},
"ConstraintDescription": {
"en": "データベースのストレージ容量。単位:GB。増分:5 GB。有効値:5 ~ 1000。",
"zh-cn": "Database storage space. Unit: GB. Increments: 5 GB. Valid values: 5 to 1000."
},
"Default": 5,
"MinValue": 5,
"MaxValue": 1000
},
"RdsUserPassword": {
"Type": "String",
"Label": {
"en": "パスワード",
"zh-cn": "Password"
},
"Description": {
"en": "データベースインスタンスの特権アカウントのパスワード。大文字、小文字、数字、特殊文字 !@#$%^&*()_+-= のうち、少なくとも 3 種類を含む必要があります。長さ:8 ~ 32 文字。",
"zh-cn": "The privileged account password for the database instance. Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters !@#$%^&*()_+-=. Length: 8 to 32 characters."
},
"AssociationProperty": "ALIYUN::RDS::Instance::AccountPassword",
"ConstraintDescription": {
"en": "大文字、小文字、数字、特殊文字 !@#$%^&*()_+-= のうち、少なくとも 3 種類を含む必要があります。長さ:8 ~ 32 文字。",
"zh-cn": "Must contain at least three of the following: uppercase letters, lowercase letters, digits, and special characters !@#$%^&*()_+-=. Length: 8 to 32 characters."
},
"MinLength": 8,
"MaxLength": 32,
"NoEcho": true
},
"DBName": {
"Type": "String",
"Label": {
"en": "データベース名",
"zh-cn": "Database name"
},
"Description": {
"en": "データベース名。小文字、数字、ハイフン (-)、アンダースコア (_) で構成されます。先頭は英字で始まり、末尾は英字または数字で終わる必要があります。最大長:64 文字。",
"zh-cn": "Database name. Consists of lowercase letters, digits, and hyphens (-) or underscores (_). Must start with a letter and end with a letter or digit. Maximum length: 64 characters."
},
"Default": "db_magento"
},
"RdsUserType": {
"Type": "String",
"Label": {
"en": "アカウントタイプ",
"zh-cn": "Account type"
},
"Description": {
"en": "<b>データベースアカウントのタイプ。<font color='blue'>有効な値:</font><br>[Normal: <font color='green'>標準アカウント</font>]<br>[Super: <font color='green'>特権アカウント</font>]",
"zh-cn": "<b>Database account type. <font color='blue'>Valid values:</font><br>[Normal: <font color='green'>Standard account</font>]<br>[Super: <font color='green'>Privileged account</font>]"
},
"Default": "Normal",
"AllowedValues": [
"Super",
"Normal"
]
},
"RdsUserName": {
"Type": "String",
"Label": {
"en": "データベースアカウント",
"zh-cn": "Database account"
},
"Description": {
"en": "データベースアカウント名。小文字、数字、アンダースコア (_) で構成されます。先頭は英字で始まり、末尾は英字または数字で終わる必要があります。長さ:2 ~ 16 文字。",
"zh-cn": "Database account name. Consists of lowercase letters, digits, and underscores (_). Must start with a letter and end with a letter or digit. Length: 2 to 16 characters."
},
"Default": "account_magento",
"MinLength": 2,
"MaxLength": 16
}
},
"Resources": {
"Vpc": {
"Type": "ALIYUN::ECS::VPC",
"Properties": {
"CidrBlock": {
"Ref": "VpcCidrBlock"
},
"VpcName": {
"Fn::Join": [
"-",
[
"Stack",
{
"Ref": "ALIYUN::StackId"
}
]
]
}
}
},
"SecurityGroup": {
"Type": "ALIYUN::ECS::SecurityGroup",
"Properties": {
"VpcId": {
"Ref": "Vpc"
},
"SecurityGroupIngress": [
{
"IpProtocol": "tcp",
"Policy": "accept",
"PortRange": "3389/3389",
"Priority": 1,
"SourceCidrIp": "0.0.0.0/0"
}
],
"Tags": [
{
"Key": "best_practice",
"Value": "065"
}
]
}
},
"VSwitch": {
"Type": "ALIYUN::ECS::VSwitch",
"Properties": {
"ZoneId": {
"Ref": "VSwitchZoneId"
},
"VpcId": {
"Ref": "Vpc"
},
"CidrBlock": {
"Ref": "VswCidrBlock"
},
"VSwitchName": {
"Fn::Join": [
"-",
[
"Stack",
{
"Ref": "ALIYUN::StackId"
},
{
"Fn::Select": [
"2",
{
"Fn::Split": [
"-",
{
"Ref": "VSwitchZoneId"
}
]
}
]
}
]
]
}
}
},
"ECS": {
"Type": "ALIYUN::ECS::Instance",
"Properties": {
"ZoneId": {
"Ref": "VSwitchZoneId"
},
"VpcId": {
"Ref": "Vpc"
},
"VSwitchId": {
"Ref": "VSwitch"
},
"SecurityGroupId": {
"Ref": "SecurityGroup"
},
"ImageId": {
"Ref": "ECSImageId"
},
"AllocatePublicIP": true,
"HostName": "APP001",
"InstanceName": "APP001",
"InstanceType": {
"Ref": "EcsInstanceType"
},
"InternetChargeType": "PayByTraffic",
"Password": {
"Ref": "EcsPassword"
},
"SystemDiskCategory": {
"Ref": "SystemDiskCategory"
},
"SystemDiskSize": {
"Ref": "SystemDiskSize"
},
"Tags": [
{
"Key": "065",
"Value": "best_practice"
}
]
}
},
"SLBLoadBalance": {
"Type": "ALIYUN::SLB::LoadBalancer",
"Properties": {
"VpcId": {
"Ref": "Vpc"
},
"AddressType": "internet",
"InternetChargeType": "paybytraffic",
"LoadBalancerName": {
"Ref": "LoadBalancerName"
},
"LoadBalancerSpec": {
"Ref": "LoadBalancerSpec"
},
"MasterZoneId": {
"Ref": "VSwitchZoneId"
},
"PayType": "PayOnDemand",
"SlaveZoneId": {
"Ref": "VSwitchZoneId2"
},
"Tags": [
{
"Key": "065",
"Value": "best_practice"
}
]
}
},
"BackendServerAttachment": {
"Type": "ALIYUN::SLB::BackendServerAttachment",
"Properties": {
"BackendServerList": [
{
"Ref": "ECS"
}
],
"BackendServerWeightList": [
100
],
"LoadBalancerId": {
"Ref": "SLBLoadBalance"
}
},
"DependsOn": [
"ECS",
"SLBLoadBalance"
]
},
"Listener": {
"Type": "ALIYUN::SLB::Listener",
"Properties": {
"BackendServerPort": 80,
"Bandwidth": -1,
"ListenerPort": 80,
"LoadBalancerId": {
"Ref": "SLBLoadBalance"
},
"Protocol": "http"
},
"DependsOn": "SLBLoadBalance"
},
"RdsDBInstance": {
"Type": "ALIYUN::RDS::DBInstance",
"Properties": {
"VpcId": {
"Ref": "Vpc"
},
"VSwitchId": {
"Ref": "VSwitch"
},
"DBInstanceClass": {
"Ref": "DBInstanceClass"
},
"DBInstanceStorage": {
"Ref": "DBInstanceStorage"
},
"DBMappings": [
{
"CharacterSetName": "utf8",
"DBName": {
"Ref": "DBName"
}
}
],
"Engine": {
"Fn::Select": [
"0",
{
"Fn::Split": [
"-",
{
"Ref": "DBInstanceEngineAndVersion"
}
]
}
]
},
"EngineVersion": {
"Fn::Select": [
"1",
{
"Fn::Split": [
"-",
{
"Ref": "DBInstanceEngineAndVersion"
}
]
}
]
},
"MasterUserPassword": {
"Ref": "RdsUserPassword"
},
"MasterUserType": {
"Ref": "RdsUserType"
},
"MasterUsername": {
"Ref": "RdsUserName"
},
"MultiAZ": true,
"SecurityIPList": {
"Ref": "VpcCidrBlock"
},
"Tags": {
"Key": "best_practice",
"Value": "065"
}
}
}
},
"Outputs": {
"ECSPublicIP": {
"Description": "Magento サーバーのパブリック IP アドレス",
"Value": {
"Fn::GetAtt": [
"ECS",
"PublicIp"
]
}
}
},
"Metadata": {
"ALIYUN::ROS::Interface": {
"ParameterGroups": [
{
"Parameters": [
"VpcCidrBlock",
"VSwitchZoneId",
"VswCidrBlock",
"VSwitchZoneId2",
"VswCidrBlock2"
],
"Label": {
"default": "VPC"
}
},
{
"Parameters": [
"EcsInstanceType",
"ECSImageId",
"SystemDiskCategory",
"SystemDiskSize",
"EcsPassword"
],
"Label": {
"default": "ECS"
}
},
{
"Parameters": [
"LoadBalancerName",
"LoadBalancerSpec"
],
"Label": {
"default": "SLB"
}
},
{
"Parameters": [
"DBInstanceEngineAndVersion",
"DBInstanceClass",
"DBInstanceStorage",
"RdsUserPassword",
"DBName",
"RdsUserType",
"RdsUserName"
],
"Label": {
"default": "RDS"
}
}
],
"TemplateTags": [
"acs:solution:security&compliance:e-commerce website business security"
]
}
}
}<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>その他の例については、「このリソースを含むパブリックテンプレート」をご参照ください。