Skip to content

Commit

Permalink
Fix guard on instance type overrides when requirements present
Browse files Browse the repository at this point in the history
  • Loading branch information
AustinSiu committed Jul 15, 2022
1 parent 6832f6d commit d4bfe15
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -557,7 +557,7 @@ func (m *asgCache) buildAsgFromAWS(g *autoscaling.Group) (*asg, error) {
instanceRequirementsOverrides: getInstanceTypeRequirements(g.MixedInstancesPolicy.LaunchTemplate.Overrides),
}

if asg.MixedInstancesPolicy.instanceTypesOverrides != nil && asg.MixedInstancesPolicy.instanceRequirementsOverrides != nil {
if len(asg.MixedInstancesPolicy.instanceTypesOverrides) != 0 && asg.MixedInstancesPolicy.instanceRequirementsOverrides != nil {
return nil, fmt.Errorf("invalid setup of both instance type and instance requirements overrides configured")
}
}
Expand Down

0 comments on commit d4bfe15

Please sign in to comment.