Skip to content

Commit

Permalink
Fix aws-samples#16 by adding trust entity maps for regions
Browse files Browse the repository at this point in the history
  • Loading branch information
henrysher authored Dec 30, 2017
1 parent 9b02651 commit 22d25c8
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion cform/ecs.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,40 @@ Parameters:
- sc1
- st1
ConstraintDescription: Must be a valid EC2 volume type.
Mappings:
TrustEntityMaps:
cn-north-1:
"autoscaling": "autoscaling.amazonaws.com.cn"
us-east-1:
"autoscaling": "autoscaling.amazonaws.com"
us-east-2:
"autoscaling": "autoscaling.amazonaws.com"
us-west-1:
"autoscaling": "autoscaling.amazonaws.com"
us-west-2:
"autoscaling": "autoscaling.amazonaws.com"
ap-south-1:
"autoscaling": "autoscaling.amazonaws.com"
ap-northeast-1:
"autoscaling": "autoscaling.amazonaws.com"
ap-northeast-2:
"autoscaling": "autoscaling.amazonaws.com"
ap-southeast-1:
"autoscaling": "autoscaling.amazonaws.com"
ap-southeast-2:
"autoscaling": "autoscaling.amazonaws.com"
ca-central-1:
"autoscaling": "autoscaling.amazonaws.com"
eu-central-1:
"autoscaling": "autoscaling.amazonaws.com"
eu-west-1:
"autoscaling": "autoscaling.amazonaws.com"
eu-west-2:
"autoscaling": "autoscaling.amazonaws.com"
eu-west-3:
"autoscaling": "autoscaling.amazonaws.com"
sa-east-1:
"autoscaling": "autoscaling.amazonaws.com"
Conditions:
CreateEC2LCWithKeyPair:
!Not [!Equals [!Ref KeyName, '']]
Expand Down Expand Up @@ -363,7 +397,7 @@ Resources:
Effect: "Allow"
Principal:
Service:
- "autoscaling.amazonaws.com"
- !FindInMap [AutoScalingTrustEntityMaps, !Ref "AWS::Region", "autoscaling"]
Action:
- "sts:AssumeRole"
ManagedPolicyArns:
Expand Down

0 comments on commit 22d25c8

Please sign in to comment.