Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for Google Virtual Network Interface (gVNIC) in gcp_compute_instance #645

Open
rahulkausale opened this issue Aug 14, 2024 · 0 comments

Comments

@rahulkausale
Copy link

Feature Request

Use Case

We need to create instances with gVNIC interfaces as mentioned here https://cloud.google.com/compute/docs/instances/create-vm-with-gvnic.

Proposed Solution

Possible playbook

  google.cloud.gcp_compute_instance:
    name: "vm1"
    machine_type: "n1-standard-4"
    can_ip_forward: true
    disks:
      - auto_delete: 'true'
        boot: 'true'
        source: "{{ disk }}"
    network_interfaces:
      - network: "{{ mgmt_network.resources[0] }}"
        subnetwork: "{{ mgmt_subnet.resources[0] }}"
        nic_type: 'gvnic'
    zone: "{{ gcp_zone }}"
    project: "{{ gcp_project }}"
    auth_kind: "{{ gcp_cred_kind }}"
    service_account_file: "{{ gcp_cred_file }}"
    state: present

As part of request hashicorp/terraform-provider-google#7699, module gcp_compute_image was modified to support guest_os_features of type GVNIC. But gcp_compute_instance module still doesnt have any option to request vNICs of type gVNIC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant