From 1b3eb1c34dca0c6b2b4f82914e6b2171de1fc5ee Mon Sep 17 00:00:00 2001 From: Evan Brown Date: Wed, 13 Sep 2017 14:12:03 -0700 Subject: [PATCH] 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. --- builder/googlecompute/config.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/builder/googlecompute/config.go b/builder/googlecompute/config.go index 9605f2f4c..b09f1814e 100644 --- a/builder/googlecompute/config.go +++ b/builder/googlecompute/config.go @@ -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 }