mirror of https://github.com/kubernetes/kops.git
Scope route53 permissions to DNS_ZONE only
This commit is contained in:
parent
bceed6dfaf
commit
f50f010d2f
|
@ -83,21 +83,23 @@ func (b *IAMPolicyBuilder) BuildAWSIAMPolicy() (*IAMPolicy, error) {
|
|||
Resource: []string{"*"},
|
||||
})
|
||||
|
||||
// No longer needed in 1.3
|
||||
//p.Statement = append(p.Statement, &IAMStatement{
|
||||
// Effect: IAMStatementEffectAllow,
|
||||
// Action: []string{ "ec2:AttachVolume" },
|
||||
// Resource: []string{"*"},
|
||||
//})
|
||||
//p.Statement = append(p.Statement, &IAMStatement{
|
||||
// Effect: IAMStatementEffectAllow,
|
||||
// Action: []string{ "ec2:DetachVolume" },
|
||||
// Resource: []string{"*"},
|
||||
//})
|
||||
p.Statement = append(p.Statement, &IAMStatement{
|
||||
Effect: IAMStatementEffectAllow,
|
||||
Action: []string{"route53:ChangeResourceRecordSets",
|
||||
"route53:ListResourceRecordSets",
|
||||
"route53:GetHostedZone"},
|
||||
Resource: []string{"arn:aws:route53:::hostedzone/" + b.Cluster.Spec.DNSZone},
|
||||
})
|
||||
|
||||
p.Statement = append(p.Statement, &IAMStatement{
|
||||
Effect: IAMStatementEffectAllow,
|
||||
Action: []string{"route53:*"},
|
||||
Action: []string{"route53:GetChange"},
|
||||
Resource: []string{"arn:aws:route53:::change/*"},
|
||||
})
|
||||
|
||||
p.Statement = append(p.Statement, &IAMStatement{
|
||||
Effect: IAMStatementEffectAllow,
|
||||
Action: []string{"route53:ListHostedZones"},
|
||||
Resource: []string{"*"},
|
||||
})
|
||||
}
|
||||
|
@ -128,9 +130,22 @@ func (b *IAMPolicyBuilder) BuildAWSIAMPolicy() (*IAMPolicy, error) {
|
|||
Resource: []string{"*"},
|
||||
})
|
||||
|
||||
p.Statement = append(p.Statement, &IAMStatement{
|
||||
Effect: IAMStatementEffectAllow,
|
||||
Action: []string{"route53:ChangeResourceRecordSets",
|
||||
"route53:ListResourceRecordSets",
|
||||
"route53:GetHostedZone"},
|
||||
Resource: []string{"arn:aws:route53:::hostedzone/" + b.Cluster.Spec.DNSZone},
|
||||
})
|
||||
p.Statement = append(p.Statement, &IAMStatement{
|
||||
Effect: IAMStatementEffectAllow,
|
||||
Action: []string{"route53:*"},
|
||||
Action: []string{"route53:GetChange"},
|
||||
Resource: []string{"arn:aws:route53:::change/*"},
|
||||
})
|
||||
|
||||
p.Statement = append(p.Statement, &IAMStatement{
|
||||
Effect: IAMStatementEffectAllow,
|
||||
Action: []string{"route53:ListHostedZones"},
|
||||
Resource: []string{"*"},
|
||||
})
|
||||
|
||||
|
|
Loading…
Reference in New Issue