From cca9872efbc2eecb20d7126b4051454b5633f47f Mon Sep 17 00:00:00 2001 From: The Magician Date: Fri, 8 Nov 2024 14:01:18 -0800 Subject: [PATCH] Add IDPF support for the google_compute_instance and google_compute_image.guest_os_features (#12256) (#20250) [upstream:f1195ea345722ec1ee5ddc1db5d3021a78ac9e5f] Signed-off-by: Modular Magician --- .changelog/12256.txt | 6 ++++++ google/services/compute/resource_compute_image.go | 4 ++-- google/services/compute/resource_compute_instance.go | 4 ++-- website/docs/r/compute_image.html.markdown | 2 +- website/docs/r/compute_instance.html.markdown | 2 +- 5 files changed, 12 insertions(+), 6 deletions(-) create mode 100644 .changelog/12256.txt diff --git a/.changelog/12256.txt b/.changelog/12256.txt new file mode 100644 index 00000000000..95f3263002a --- /dev/null +++ b/.changelog/12256.txt @@ -0,0 +1,6 @@ +```release-note:enhancement +compute: Added the `IDPF` tag to the list of `guestOsFeatures` +``` +```release-note:enhancement +compute: Added `IDPF` as a possible `nic_type` for the `google_compute_instance.network_interface` +``` \ No newline at end of file diff --git a/google/services/compute/resource_compute_image.go b/google/services/compute/resource_compute_image.go index fe070bd6693..a63fdb14491 100644 --- a/google/services/compute/resource_compute_image.go +++ b/google/services/compute/resource_compute_image.go @@ -291,8 +291,8 @@ func computeImageGuestOsFeaturesSchema() *schema.Resource { Type: schema.TypeString, Required: true, ForceNew: true, - ValidateFunc: verify.ValidateEnum([]string{"MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE", "SEV_LIVE_MIGRATABLE_V2"}), - Description: `The type of supported feature. Read [Enabling guest operating system features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) to see a list of available options. Possible values: ["MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE", "SEV_LIVE_MIGRATABLE_V2"]`, + ValidateFunc: verify.ValidateEnum([]string{"MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "IDPF", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE", "SEV_LIVE_MIGRATABLE_V2"}), + Description: `The type of supported feature. Read [Enabling guest operating system features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) to see a list of available options. Possible values: ["MULTI_IP_SUBNET", "SECURE_BOOT", "SEV_CAPABLE", "UEFI_COMPATIBLE", "VIRTIO_SCSI_MULTIQUEUE", "WINDOWS", "GVNIC", "IDPF", "SEV_LIVE_MIGRATABLE", "SEV_SNP_CAPABLE", "SUSPEND_RESUME_COMPATIBLE", "TDX_CAPABLE", "SEV_LIVE_MIGRATABLE_V2"]`, }, }, } diff --git a/google/services/compute/resource_compute_instance.go b/google/services/compute/resource_compute_instance.go index e555cf2e2ed..4b9512daf54 100644 --- a/google/services/compute/resource_compute_instance.go +++ b/google/services/compute/resource_compute_instance.go @@ -448,8 +448,8 @@ func ResourceComputeInstance() *schema.Resource { Type: schema.TypeString, Optional: true, ForceNew: true, - ValidateFunc: validation.StringInSlice([]string{"GVNIC", "VIRTIO_NET"}, false), - Description: `The type of vNIC to be used on this interface. Possible values:GVNIC, VIRTIO_NET`, + ValidateFunc: validation.StringInSlice([]string{"GVNIC", "VIRTIO_NET", "IDPF"}, false), + Description: `The type of vNIC to be used on this interface. Possible values:GVNIC, VIRTIO_NET, IDPF`, }, "access_config": { Type: schema.TypeList, diff --git a/website/docs/r/compute_image.html.markdown b/website/docs/r/compute_image.html.markdown index ab5c7eb9fdb..b459a80178a 100644 --- a/website/docs/r/compute_image.html.markdown +++ b/website/docs/r/compute_image.html.markdown @@ -254,7 +254,7 @@ The following arguments are supported: * `type` - (Required) The type of supported feature. Read [Enabling guest operating system features](https://cloud.google.com/compute/docs/images/create-delete-deprecate-private-images#guest-os-features) to see a list of available options. - Possible values are: `MULTI_IP_SUBNET`, `SECURE_BOOT`, `SEV_CAPABLE`, `UEFI_COMPATIBLE`, `VIRTIO_SCSI_MULTIQUEUE`, `WINDOWS`, `GVNIC`, `SEV_LIVE_MIGRATABLE`, `SEV_SNP_CAPABLE`, `SUSPEND_RESUME_COMPATIBLE`, `TDX_CAPABLE`, `SEV_LIVE_MIGRATABLE_V2`. + Possible values are: `MULTI_IP_SUBNET`, `SECURE_BOOT`, `SEV_CAPABLE`, `UEFI_COMPATIBLE`, `VIRTIO_SCSI_MULTIQUEUE`, `WINDOWS`, `GVNIC`, `IDPF`, `SEV_LIVE_MIGRATABLE`, `SEV_SNP_CAPABLE`, `SUSPEND_RESUME_COMPATIBLE`, `TDX_CAPABLE`, `SEV_LIVE_MIGRATABLE_V2`. The `image_encryption_key` block supports: diff --git a/website/docs/r/compute_instance.html.markdown b/website/docs/r/compute_instance.html.markdown index ccd6d6b7b44..1521b7ee2cd 100644 --- a/website/docs/r/compute_instance.html.markdown +++ b/website/docs/r/compute_instance.html.markdown @@ -395,7 +395,7 @@ is desired, you will need to modify your state file manually using array of alias IP ranges for this network interface. Can only be specified for network interfaces on subnet-mode networks. Structure [documented below](#nested_alias_ip_range). -* `nic_type` - (Optional) The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET. +* `nic_type` - (Optional) The type of vNIC to be used on this interface. Possible values: GVNIC, VIRTIO_NET, IDPF. * `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}`.