upup: enable subnet changes on ASG

For kube-up upgrade
This commit is contained in:
Justin Santa Barbara 2016-06-15 22:56:19 -04:00
parent 1a7f157fcb
commit 3040676a3b
1 changed files with 8 additions and 0 deletions

View File

@ -176,6 +176,14 @@ func (_ *AutoscalingGroup) RenderAWS(t *awsup.AWSAPITarget, a, e, changes *Autos
request.MaxSize = e.MaxSize
changes.MaxSize = nil
}
if changes.Subnets != nil {
var subnetIDs []string
for _, s := range e.Subnets {
subnetIDs = append(subnetIDs, *s.ID)
}
request.VPCZoneIdentifier = aws.String(strings.Join(subnetIDs, ","))
changes.Subnets = nil
}
empty := &AutoscalingGroup{}
if !reflect.DeepEqual(empty, changes) {