diff --git a/upup/pkg/fi/cloudup/gcetasks/network.go b/upup/pkg/fi/cloudup/gcetasks/network.go index d10d936784..0bcc2a7766 100644 --- a/upup/pkg/fi/cloudup/gcetasks/network.go +++ b/upup/pkg/fi/cloudup/gcetasks/network.go @@ -133,6 +133,11 @@ func (_ *Network) RenderGCE(t *gce.GCEAPITarget, a, e, changes *Network) error { case "custom": network.AutoCreateSubnetworks = false + // The boolean default value of "false" is omitted when the struct + // is serialized, which results in the network being created with + // the auto-create subnetworks default of "true". Explicitly send + // the default value. + network.ForceSendFields = []string{"AutoCreateSubnetworks"} } _, err := t.Cloud.Compute().Networks().Insert(t.Cloud.Project(), network) if err != nil {