Skip to content
Snippets Groups Projects
Commit 1cdc1bf8 authored by Elmar Kampel's avatar Elmar Kampel
Browse files

Apply Google VM labels also to attached disks

parent f9f7b5f2
No related branches found
No related tags found
No related merge requests found
...@@ -386,6 +386,7 @@ func (c *ComputeUtil) createInstance(d *Driver) error { ...@@ -386,6 +386,7 @@ func (c *ComputeUtil) createInstance(d *Driver) error {
// The maximum supported disk size is 1000GB, the cast should be fine. // The maximum supported disk size is 1000GB, the cast should be fine.
DiskSizeGb: int64(d.DiskSize), DiskSizeGb: int64(d.DiskSize),
DiskType: c.diskType(), DiskType: c.diskType(),
Labels: parseLabels(d),
} }
} else { } else {
instance.Disks[0].Source = c.zoneURL + "/disks/" + c.instanceName + "-disk" instance.Disks[0].Source = c.zoneURL + "/disks/" + c.instanceName + "-disk"
......
...@@ -227,7 +227,7 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag { ...@@ -227,7 +227,7 @@ func (d *Driver) GetCreateFlags() []mcnflag.Flag {
}, },
mcnflag.StringSliceFlag{ mcnflag.StringSliceFlag{
Name: "google-label", Name: "google-label",
Usage: "Label to set on the VM (format: key:value). Repeat the flag to set more labels", Usage: "Label to set on the VM and its disks (format: key:value). Repeat the flag to set more labels",
}, },
mcnflag.StringSliceFlag{ mcnflag.StringSliceFlag{
Name: "google-metadata", Name: "google-metadata",
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment