Fix ASG scaling by adding in ec2:DescribeRegions permission

This commit is contained in:
Mikael Knutsson 2018-01-22 17:11:49 +08:00
parent 752c7bd96d
commit 1dbd435019
4 changed files with 7 additions and 4 deletions

View File

@ -519,7 +519,7 @@ func addNodeEC2Policies(p *Policy, resource stringorslice.StringOrSlice) {
p.Statement = append(p.Statement, &Statement{ p.Statement = append(p.Statement, &Statement{
Sid: "kopsK8sEC2NodePerms", Sid: "kopsK8sEC2NodePerms",
Effect: StatementEffectAllow, Effect: StatementEffectAllow,
Action: stringorslice.Slice([]string{"ec2:DescribeInstances"}), Action: stringorslice.Slice([]string{"ec2:DescribeInstances", "ec2:DescribeRegions"}),
Resource: resource, Resource: resource,
}) })
} }

View File

@ -5,7 +5,8 @@
"Sid": "kopsK8sEC2NodePerms", "Sid": "kopsK8sEC2NodePerms",
"Effect": "Allow", "Effect": "Allow",
"Action": [ "Action": [
"ec2:DescribeInstances" "ec2:DescribeInstances",
"ec2:DescribeRegions"
], ],
"Resource": [ "Resource": [
"*" "*"

View File

@ -5,7 +5,8 @@
"Sid": "kopsK8sEC2NodePerms", "Sid": "kopsK8sEC2NodePerms",
"Effect": "Allow", "Effect": "Allow",
"Action": [ "Action": [
"ec2:DescribeInstances" "ec2:DescribeInstances",
"ec2:DescribeRegions"
], ],
"Resource": [ "Resource": [
"*" "*"

View File

@ -5,7 +5,8 @@
"Sid": "kopsK8sEC2NodePerms", "Sid": "kopsK8sEC2NodePerms",
"Effect": "Allow", "Effect": "Allow",
"Action": [ "Action": [
"ec2:DescribeInstances" "ec2:DescribeInstances",
"ec2:DescribeRegions"
], ],
"Resource": [ "Resource": [
"*" "*"