Skip to content

Commit 05f9702

Browse files
committed
compute: Add IDPF as a possible nic_type
Closes: hashicorp/terraform-provider-google#19671 Signed-off-by: Norbert Kamiński <[email protected]>
1 parent bf4f29c commit 05f9702

File tree

3 files changed

+10
-3
lines changed

3 files changed

+10
-3
lines changed

mmv1/third_party/terraform/services/compute/resource_compute_instance.go.tmpl

+2-2
Original file line numberDiff line numberDiff line change
@@ -465,8 +465,8 @@ func ResourceComputeInstance() *schema.Resource {
465465
Type: schema.TypeString,
466466
Optional: true,
467467
ForceNew: true,
468-
ValidateFunc: validation.StringInSlice([]string{"GVNIC", "VIRTIO_NET"}, false),
469-
Description: `The type of vNIC to be used on this interface. Possible values:GVNIC, VIRTIO_NET`,
468+
ValidateFunc: validation.StringInSlice([]string{"GVNIC", "VIRTIO_NET", "IDPF"}, false),
469+
Description: `The type of vNIC to be used on this interface. Possible values:GVNIC, VIRTIO_NET, IDPF`,
470470
},
471471
"access_config": {
472472
Type: schema.TypeList,

mmv1/third_party/terraform/services/compute/resource_compute_instance_test.go.tmpl

+7
Original file line numberDiff line numberDiff line change
@@ -1857,6 +1857,13 @@ func TestAccComputeInstance_nictype_update(t *testing.T) {
18571857
t, "google_compute_instance.foobar", &instance),
18581858
),
18591859
},
1860+
{
1861+
Config: testAccComputeInstance_nictype(instanceName, "IDPF"),
1862+
Check: resource.ComposeTestCheckFunc(
1863+
testAccCheckComputeInstanceExists(
1864+
t, "google_compute_instance.foobar", &instance),
1865+
),
1866+
},
18601867
},
18611868
})
18621869
}

mmv1/third_party/terraform/website/docs/r/compute_instance.html.markdown

+1-1
Original file line numberDiff line numberDiff line change
@@ -395,7 +395,7 @@ is desired, you will need to modify your state file manually using
395395
array of alias IP ranges for this network interface. Can only be specified for network
396396
interfaces on subnet-mode networks. Structure [documented below](#nested_alias_ip_range).
397397

398-
* `nic_type` - (Optional) The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET.
398+
* `nic_type` - (Optional) The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET, IDPF.
399399

400400
* `network_attachment` - (Optional) [Beta](https://terraform.io/docs/providers/google/guides/provider_versions.html) The URL of the network attachment that this interface should connect to in the following format: `projects/{projectNumber}/regions/{region_name}/networkAttachments/{network_attachment_name}`.
401401

0 commit comments

Comments
 (0)