From d4eef657d664994db62f88806f4cbcce9f85b9a4 Mon Sep 17 00:00:00 2001 From: Fabricio Toresan Date: Sat, 18 Nov 2017 09:17:07 -0200 Subject: [PATCH] Changing the prefix of the ResourceTag condition to match the one specified in the ASG documentation --- pkg/model/iam/iam_builder.go | 2 +- pkg/model/iam/tests/iam_builder_master_strict.json | 2 +- pkg/model/iam/tests/iam_builder_master_strict_ecr.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/pkg/model/iam/iam_builder.go b/pkg/model/iam/iam_builder.go index 4fae20cad6..b513bc3f33 100644 --- a/pkg/model/iam/iam_builder.go +++ b/pkg/model/iam/iam_builder.go @@ -661,7 +661,7 @@ func addMasterASPolicies(p *Policy, resource stringorslice.StringOrSlice, legacy Resource: resource, Condition: Condition{ "StringEquals": map[string]string{ - "ec2:ResourceTag/KubernetesCluster": clusterName, + "autoscaling:ResourceTag/KubernetesCluster": clusterName, }, }, }, diff --git a/pkg/model/iam/tests/iam_builder_master_strict.json b/pkg/model/iam/tests/iam_builder_master_strict.json index cbe42c8199..b2195d5583 100644 --- a/pkg/model/iam/tests/iam_builder_master_strict.json +++ b/pkg/model/iam/tests/iam_builder_master_strict.json @@ -75,7 +75,7 @@ ], "Condition": { "StringEquals": { - "ec2:ResourceTag/KubernetesCluster": "iam-builder-test.k8s.local" + "autoscaling:ResourceTag/KubernetesCluster": "iam-builder-test.k8s.local" } } }, diff --git a/pkg/model/iam/tests/iam_builder_master_strict_ecr.json b/pkg/model/iam/tests/iam_builder_master_strict_ecr.json index 4f07b78fda..628fc7f82b 100644 --- a/pkg/model/iam/tests/iam_builder_master_strict_ecr.json +++ b/pkg/model/iam/tests/iam_builder_master_strict_ecr.json @@ -75,7 +75,7 @@ ], "Condition": { "StringEquals": { - "ec2:ResourceTag/KubernetesCluster": "iam-builder-test.k8s.local" + "autoscaling:ResourceTag/KubernetesCluster": "iam-builder-test.k8s.local" } } },