-
Notifications
You must be signed in to change notification settings - Fork 32
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
Allow the VM resource's wait_for_ip
functionality to validate it matches a particular prefix
#300
Comments
Listed below are the solutions I've investigated with some brief details on their pros and cons:
Prior art in other terraform provider implementations:
I'm going to start with option 1 since it seems like the cleanest approach. While I think handling multiple network interfaces is likely uncommon, it also will support those use cases well. |
3 tasks
This is completed and available in v0.29.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This discussion on the XO forum explains that the VM resource's
wait_for_ip
functionality has a race condition with DHCP. It's possible that a VM will use a link local address prior to receiving its DHCP lease. This causes incorrect behavior because it's expected that the link local address is temporary.This issue tracks adding a mechanism for deferring finalizing VM creation until DHCP is complete. The following terraform config below would wait until the VM's NICs received an IP that matched the indicated cidr range (or error if it doesn't converge):
One thing to note is that it's possible for a VM to have multiple network interfaces and each interface can have multiple ip addresses. I know how to account for this yet, but it seems that having a single cidr range like the example above will not be flexible enough or it could cause the network interface of interest to be ignored (if 2 network interfaces are expected to have the same cidr range and one resolves earlier).
The text was updated successfully, but these errors were encountered: