Skip to content

Commit

Permalink
(eksconfig): update valid ec2 service principals
Browse files Browse the repository at this point in the history
  • Loading branch information
cmdallas authored Nov 6, 2020
1 parent 6f195f4 commit 1191e27
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions eksconfig/add-on-node-groups.go
Original file line number Diff line number Diff line change
Expand Up @@ -208,10 +208,13 @@ func (cfg *Config) validateAddOnNodeGroups() error {
})
*/
found := false
validSps := []string{"ec2.amazonaws.com", "ec2.amazonaws.com.cn", "ec2.c2s.ic.gov", "ec2.sc2s.sgov.gov"}
for _, pv := range cfg.AddOnNodeGroups.RoleServicePrincipals {
if pv == "ec2.amazonaws.com" || pv == "ec2.amazonaws.com.cn" {
found = true
break
for _, vsp := range validSps {
if pv == vsp {
found = true
break
}
}
}
if !found {
Expand Down

0 comments on commit 1191e27

Please sign in to comment.