Use default subnet when creating IG

We had this logic before, but I accidentally bypassed it in #2124.
This commit is contained in:
Justin Santa Barbara 2017-12-02 00:31:16 -05:00
parent 7bd0a6a703
commit 65bcbe7729
1 changed files with 2 additions and 6 deletions

View File

@ -150,19 +150,15 @@ func RunCreateInstanceGroup(f *util.Factory, cmd *cobra.Command, args []string,
}
ig.Spec.Role = role
if len(options.Subnets) == 0 {
return fmt.Errorf("cannot create instance group without subnets; specify --subnet flag(s)")
}
ig.Spec.Subnets = options.Subnets
ig, err = cloudup.PopulateInstanceGroupSpec(cluster, ig, channel)
ig.AddInstanceGroupNodeLabel()
if err != nil {
return err
}
ig.AddInstanceGroupNodeLabel()
if options.DryRun {
if options.Output == "" {