mirror of https://github.com/kubernetes/kops.git
				
				
				
			Merge pull request #11457 from nicktrav/nickt.force-send
upup: gcetasks: force send AutoCreateSubnetworks field when set to false
This commit is contained in:
		
						commit
						3d5a4127b8
					
				|  | @ -133,6 +133,11 @@ func (_ *Network) RenderGCE(t *gce.GCEAPITarget, a, e, changes *Network) error { | ||||||
| 
 | 
 | ||||||
| 		case "custom": | 		case "custom": | ||||||
| 			network.AutoCreateSubnetworks = false | 			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) | 		_, err := t.Cloud.Compute().Networks().Insert(t.Cloud.Project(), network) | ||||||
| 		if err != nil { | 		if err != nil { | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue