builder/googlecompute: Selectively set default network

If a network is not specified, it should only be set to "default" if a
subnetwork is also not specified.
This commit is contained in:
Evan Brown 2017-09-13 14:13:47 -07:00
parent 1b3eb1c34d
commit bada7b73c1
1 changed files with 1 additions and 1 deletions

View File

@ -82,7 +82,7 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
var errs *packer.MultiError
// Set defaults.
if c.Network == "" {
if c.Network == "" && c.Subnetwork == "" {
c.Network = "default"
}