You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the wait_for_network argument when set to true will wait for the instance to have an IPv4 address. This means that you can only use this argument reliably in networks where IPv4 is available, which makes it a little harder to do things like updating DNS records with the output of an instance creation on IPv6-only networks, or where IPv6 is the network you're actually relying on.
Example code:
resource "incus_instance" "this" {
count = 10
type = "container"
name = "instance-${count.index}"
image = "images:debian/12/cloud"
wait_for_network = true
config = {
"boot.autostart" = true
}
}
output "instance_ips" {
value = { for idx, instance in incus_instance.this : instance.name => instance.ipv6_address }
}
Expected results:
instance_ip = {
"instance-0" = "..."
...
}
Actual results:
incus_instance.this[8]: Creating...
incus_instance.this[4]: Creating...
incus_instance.this[5]: Creating...
incus_instance.this[6]: Creating...
incus_instance.this[2]: Creating...
incus_instance.this[7]: Creating...
incus_instance.this[9]: Creating...
incus_instance.this[3]: Creating...
incus_instance.this[1]: Creating...
incus_instance.this[4]: Still creating... [10s elapsed]
...
incus_instance.this[6]: Still creating... [3m10s elapsed]
╷
│ Error: Failed to wait for instance "instance-4" to get an IP address
│
│ with incus_instance.this[4],
│ on main.tf line 74, in resource "incus_instance" "this":
│ 74: resource "incus_instance" "this" {
│
│ timeout while waiting for state to become 'OK' (last state: 'Waiting for network',
│ timeout: 3m0s)
╵
╷
│ Error: Failed to wait for instance "instance-9" to get an IP address
│
│ with incus_instance.this[9],
│ on main.tf line 74, in resource "incus_instance" "this":
│ 74: resource "incus_instance" "this" {
│
│ timeout while waiting for state to become 'OK' (last state: 'Waiting for network',
│ timeout: 3m0s)
╵
╷
│ Error: Failed to wait for instance "instance-1" to get an IP address
│
│ with incus_instance.this[1],
│ on main.tf line 74, in resource "incus_instance" "this":
│ 74: resource "incus_instance" "this" {
│
│ timeout while waiting for state to become 'OK' (last state: 'Waiting for network',
│ timeout: 3m0s)
╵
╷
│ Error: Failed to wait for instance "instance-6" to get an IP address
│
│ with incus_instance.this[6],
│ on main.tf line 74, in resource "incus_instance" "this":
│ 74: resource "incus_instance" "this" {
│
│ timeout while waiting for state to become 'OK' (last state: 'Waiting for network',
│ timeout: 3m0s)
╵
╷
│ Error: Failed to wait for instance "instance-2" to get an IP address
│
│ with incus_instance.this[2],
│ on main.tf line 74, in resource "incus_instance" "this":
│ 74: resource "incus_instance" "this" {
│
│ timeout while waiting for state to become 'OK' (last state: 'Waiting for network',
│ timeout: 3m0s)
╵
╷
│ Error: Failed to wait for instance "instance-3" to get an IP address
│
│ with incus_instance.this[3],
│ on main.tf line 74, in resource "incus_instance" "this":
│ 74: resource "incus_instance" "this" {
│
│ timeout while waiting for state to become 'OK' (last state: 'Waiting for network',
│ timeout: 3m0s)
╵
╷
│ Error: Failed to wait for instance "instance-5" to get an IP address
│
│ with incus_instance.this[5],
│ on main.tf line 74, in resource "incus_instance" "this":
│ 74: resource "incus_instance" "this" {
│
│ timeout while waiting for state to become 'OK' (last state: 'Waiting for network',
│ timeout: 3m0s)
╵
╷
│ Error: Failed to wait for instance "instance-8" to get an IP address
│
│ with incus_instance.this[8],
│ on main.tf line 74, in resource "incus_instance" "this":
│ 74: resource "incus_instance" "this" {
│
│ timeout while waiting for state to become 'OK' (last state: 'Waiting for network',
│ timeout: 3m0s)
╵
╷
│ Error: Failed to wait for instance "instance-7" to get an IP address
│
│ with incus_instance.this[7],
│ on main.tf line 74, in resource "incus_instance" "this":
│ 74: resource "incus_instance" "this" {
│
│ timeout while waiting for state to become 'OK' (last state: 'Waiting for network',
│ timeout: 3m0s)
The text was updated successfully, but these errors were encountered:
Currently the
wait_for_network
argument when set to true will wait for the instance to have an IPv4 address. This means that you can only use this argument reliably in networks where IPv4 is available, which makes it a little harder to do things like updating DNS records with the output of an instance creation on IPv6-only networks, or where IPv6 is the network you're actually relying on.Example code:
Expected results:
Actual results:
The text was updated successfully, but these errors were encountered: