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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(vm): add VLAN trunk support #1086

Merged
merged 5 commits into from
Mar 3, 2024
Merged

Conversation

jackhodgkiss
Copy link
Contributor

Contributor's Note

I have been using the provider to create a series of Proxmox VMs that require multiple VLANs on a single interface. The approach I have taken is to use trunks to pass through multiple tagged VLANs for which interfaces can be created post deployment such as eth0.10.

Trunks whilst missing from the UI within Proxmox are supported and documented.

I have been using this small change without issue for a couple months.

  • I have added / updated documentation in /docs for any user-facing features or additions.
  • I have added / updated templates in /example for any new or updated resources / data sources.
  • I have ran make example to verify that the change works as expected.

Proof of Work

The screenshot below shows a network interface with the trunks property containing 10;20;30 as trunked VLANs which can the be utilised within the VM after any OS specific network configuration is applied.

Screenshot 2024-03-02 at 19-17-26 proxmox-mgmt - Proxmox Virtual Environment

Community Note

  • Please vote on this pull request by adding a 馃憤 reaction to the original pull request comment to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for pull request followers and do not help prioritize the request

Closes #0000 | Relates #0000

Signed-off-by: Jack Hodgkiss <identity@jackhodgkiss.uk>
Comment on lines 3087 to 3089
if err != nil {
// Error parsing VLAN trunks.
os.Exit(1)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would appreciate help on how best to handle errors.

I am new to golang.

@bpg
Copy link
Owner

bpg commented Mar 3, 2024

Thanks so much for contribution @jackhodgkiss!

I'll take a look today / tomorrow.

bpg added 4 commits March 3, 2024 13:15
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
Signed-off-by: Pavel Boldyrev <627562+bpg@users.noreply.github.com>
@pull-request-size pull-request-size bot added size/L and removed size/M labels Mar 3, 2024
Copy link
Owner

@bpg bpg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work, thanks @jackhodgkiss!

I've update the error handling code and also add trunks to the automated acceptance test. The acceptance tests are still somewhat experimental, but i'm planning to use them more, esp. for new functionality.

LGTM! 馃殌

@bpg bpg merged commit cb5fc27 into bpg:main Mar 3, 2024
7 of 8 checks passed
@jackhodgkiss jackhodgkiss deleted the add-trunk-support branch March 3, 2024 19:02
@bpg
Copy link
Owner

bpg commented Mar 3, 2024

@all-contributors please add @jackhodgkiss for code

Copy link
Contributor

@bpg

I've put up a pull request to add @jackhodgkiss! 馃帀

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

Successfully merging this pull request may close these issues.

None yet

2 participants