hashicorp / packer-plugin-googlecompute

Packer plugin for Google Compute Builder
https://www.packer.io/docs/builders/googlecompute
Mozilla Public License 2.0
23 stars 51 forks source link

Allow adding additional NICs to instance creation #176

Open woodne opened 11 months ago

woodne commented 11 months ago

Please search the existing issues for relevant feature requests, and use the reaction feature (https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to add upvotes to pre-existing requests.

Community Note

Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request. Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request. If you are interested in working on this issue or have submitted a pull request, please leave a comment.

Description

Allow adding additional NICs when Packer is provisioning the virtual machine used to create the image.

Use Case(s)

Some software I am trying to install in an image requires having multiple nics (attached to different subnets) on the machine, and without them, it causes problems. I was wondering if it is possible to have multiple NICs attached to the instance that packer creates so the software installs properly. It might be too niche of a use case, but the current software causes problems when installed with a single nic, so that when you try to boot the image that packer produces, it cannot be reached.

Potential configuration

Perhaps something like

source "googlecompute" "windows-ssh-example" {
  project_id = "MY_PROJECT"
  ...

  network_interface {
    ...
  }

  network_interface {
    ...
  }
}

Potential References

This is supported in terraform when creating a google_compute_instance, but it is not clear to me if this would even be possible in packer.