From 9e9c0c105b1b66c22d9ec706d896bb728060a912 Mon Sep 17 00:00:00 2001 From: Sergio Ballesteros Date: Wed, 25 Jan 2017 10:12:05 +0100 Subject: [PATCH] Add autoscaling policy to master role --- pkg/model/iam/iam_builder.go | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkg/model/iam/iam_builder.go b/pkg/model/iam/iam_builder.go index 758fdd8675..01d833c1b6 100644 --- a/pkg/model/iam/iam_builder.go +++ b/pkg/model/iam/iam_builder.go @@ -140,6 +140,17 @@ func (b *IAMPolicyBuilder) BuildAWSIAMPolicy() (*IAMPolicy, error) { Resource: []string{"*"}, }) + p.Statement = append(p.Statement, &IAMStatement{ + Effect: IAMStatementEffectAllow, + Action: []string{ + "autoscaling:DescribeAutoScalingGroups", + "autoscaling:DescribeAutoScalingInstances", + "autoscaling:SetDesiredCapacity", + "autoscaling:TerminateInstanceInAutoScalingGroup", + }, + Resource: []string{"*"}, + }) + // Restrict the KMS permissions to only the keys that are being used kmsKeyIDs := sets.NewString() for _, e := range b.Cluster.Spec.EtcdClusters {