Merge pull request #6607 from hashicorp/gcp_min_cpu_platform

GCP: min cpu platform
pull/6618/head
Megan Marsh 8 years ago committed by GitHub
commit bb319fb1e8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -42,6 +42,7 @@ type Config struct {
Labels map[string]string `mapstructure:"labels"`
MachineType string `mapstructure:"machine_type"`
Metadata map[string]string `mapstructure:"metadata"`
MinCpuPlatform string `mapstructure:"min_cpu_platform"`
Network string `mapstructure:"network"`
NetworkProjectId string `mapstructure:"network_project_id"`
OmitExternalIP bool `mapstructure:"omit_external_ip"`

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

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

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

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

@ -1656,10 +1656,10 @@
"revisionTime": "2017-07-04T19:41:35Z"
},
{
"checksumSHA1": "NbZXrCwb2NvwV+g6yF0NXSG63A0=",
"checksumSHA1": "oK9IOgVH0CByZ8YSAswfZT7StuE=",
"path": "google.golang.org/api/compute/v1",
"revision": "e381d638237fe32daa8eaa3321cf8db7b8203965",
"revisionTime": "2017-07-07T17:19:04Z"
"revision": "e21acd801f91da814261b938941d193bb036441a",
"revisionTime": "2018-08-18T00:05:03Z"
},
{
"checksumSHA1": "EooPqEpEyY/7NCRwHDMWhhlkQNw=",

@ -260,6 +260,10 @@ builder.
- `metadata` (object of key/value strings) - Metadata applied to the launched
instance.
- `min_cpu_platform` (string) - A Minimum CPU Platform for VM Instance.
The avalability and default CPU platforms varies across zones, based on
the hardware available in each GCP zone. [Details](https://cloud.google.com/compute/docs/instances/specify-min-cpu-platform)
- `network` (string) - The Google Compute network id or URL to use for the
launched instance. Defaults to `"default"`. If the value is not a URL, it
will be interpolated to `projects/((network_project_id))/global/networks/((network))`.

Loading…
Cancel
Save