GCP: Allow to set MinCpuPlatform

This commit is contained in:
Adrien Delorme 2018-08-21 10:09:30 +02:00
parent e37f126cf1
commit b038cd10f5
3 changed files with 4 additions and 1 deletions

View File

@ -69,6 +69,7 @@ type InstanceConfig struct {
Labels map[string]string Labels map[string]string
MachineType string MachineType string
Metadata map[string]string Metadata map[string]string
MinCpuPlatform string
Name string Name string
Network string Network string
NetworkProjectId string NetworkProjectId string

View File

@ -377,7 +377,8 @@ func (d *driverGCE) RunInstance(c *InstanceConfig) (<-chan error, error) {
Metadata: &compute.Metadata{ Metadata: &compute.Metadata{
Items: metadata, Items: metadata,
}, },
Name: c.Name, MinCpuPlatform: c.MinCpuPlatform,
Name: c.Name,
NetworkInterfaces: []*compute.NetworkInterface{ NetworkInterfaces: []*compute.NetworkInterface{
{ {
AccessConfigs: []*compute.AccessConfig{accessconfig}, AccessConfigs: []*compute.AccessConfig{accessconfig},

View File

@ -111,6 +111,7 @@ func (s *StepCreateInstance) Run(_ context.Context, state multistep.StateBag) mu
Labels: c.Labels, Labels: c.Labels,
MachineType: c.MachineType, MachineType: c.MachineType,
Metadata: metadata, Metadata: metadata,
MinCpuPlatform: c.MinCpuPlatform,
Name: name, Name: name,
Network: c.Network, Network: c.Network,
NetworkProjectId: c.NetworkProjectId, NetworkProjectId: c.NetworkProjectId,