Skip to content

default ipv4 address for an instance #802

Answered by elias314
Romeriz asked this question in Q&A
Discussion options

You must be logged in to vote

I found I can use the ipv4_addresses attribute on the proxmox_virtual_environment_vm resource. It produces a list of lists which is a little awkward, so I flatten() it, and then use setsubtract() to remove localhost:

setsubtract(flatten(proxmox_virtual_environment_vm.control_plane[0].ipv4_addresses), ["127.0.0.1"])

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Answer selected by Romeriz
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #800 on December 14, 2023 02:11.