builder/googlecompute: Set default network_project_id

If network_project_id is not specified in the GCE builder config, it
should default to the project_id.
This commit is contained in:
Evan Brown 2017-09-13 14:12:03 -07:00
parent b49ead6225
commit 1b3eb1c34d
1 changed files with 4 additions and 0 deletions

View File

@ -86,6 +86,10 @@ func NewConfig(raws ...interface{}) (*Config, []string, error) {
c.Network = "default"
}
if c.NetworkProjectId == "" {
c.NetworkProjectId = c.ProjectId
}
if c.DiskSizeGb == 0 {
c.DiskSizeGb = 10
}