Last active
June 16, 2017 11:54
-
-
Save alxschwarz/a5cf764c119edc5c49d4ff269d63125d to your computer and use it in GitHub Desktop.
test
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
pb := &compute.Instance{ | |
Name: name, | |
Description: "compute sample instance", | |
MachineType: prefix + "/zones/" + zone + "/machineTypes/" + mtype, | |
Disks: []*compute.AttachedDisk{ | |
{ | |
AutoDelete: true, | |
Boot: true, | |
Type: "PERSISTENT", | |
InitializeParams: &compute.AttachedDiskInitializeParams{ | |
SourceImage: "projects/" + project + "/global/images/family/" + family, | |
}, | |
}, | |
}, | |
NetworkInterfaces: []*compute.NetworkInterface{ | |
&compute.NetworkInterface{ | |
AccessConfigs: []*compute.AccessConfig{ | |
&compute.AccessConfig{ | |
Type: "ONE_TO_ONE_NAT", | |
Name: "External NAT", | |
}, | |
}, | |
Network: prefix + "/global/networks/" + network, | |
//Subnetwork: "regions/us-east1/subnetworks/" + subnet, | |
}, | |
}, | |
ServiceAccounts: []*compute.ServiceAccount{ | |
{ | |
Email: "default", | |
Scopes: []string{ | |
compute.DevstorageFullControlScope, | |
compute.ComputeScope, | |
}, | |
}, | |
}, | |
Metadata: &compute.Metadata{ | |
Items: []*compute.MetadataItems{ | |
{ | |
Key: "id", | |
Value: id, | |
}, | |
{ | |
Key: metadata["key"], | |
Value: metadata["value"], | |
}, | |
}, | |
}, | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment