Skip to content
This repository was archived by the owner on Nov 19, 2025. It is now read-only.

Commit 7e97846

Browse files
authored
Support region cn-north-1 (#280)
* Update aws-sdk-go * cn-north-1 AMI * CN endpoint for instance trust policy
1 parent b202cf4 commit 7e97846

File tree

28 files changed

+2837
-458
lines changed

28 files changed

+2837
-458
lines changed

ecs-cli/Godeps/Godeps.json

Lines changed: 73 additions & 70 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

ecs-cli/modules/clients/aws/cloudformation/template.go

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// not use this file except in compliance with the License. A copy of the
55
// License is located at
66
//
7-
// http://aws.amazon.com/apache2.0/
7+
// http://aws.amazon.com/apache2.0/
88
//
99
// or in the "license" file accompanying this file. This file is distributed
1010
// on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
@@ -153,6 +153,9 @@ var template = `
153153
}
154154
},
155155
"Conditions": {
156+
"IsCNRegion": {
157+
"Fn::Equals": [ { "Ref": "AWS::Region" }, "cn-north-1" ]
158+
},
156159
"CreateVpcResources": {
157160
"Fn::Equals": [
158161
{
@@ -163,7 +166,7 @@ var template = `
163166
},
164167
"CreateSecurityGroup": {
165168
"Fn::Equals": [
166-
{
169+
{
167170
"Fn::Join": [
168171
"",
169172
{
@@ -389,7 +392,11 @@ var template = `
389392
"Effect": "Allow",
390393
"Principal": {
391394
"Service": [
392-
"ec2.amazonaws.com"
395+
"Fn::If": [
396+
"IsCNRegion",
397+
"ec2.amazonaws.com.cn",
398+
"ec2.amazonaws.com"
399+
]
393400
]
394401
},
395402
"Action": [

0 commit comments

Comments
 (0)