When the server is created with both the interfaces all the addresses is (known after apply) i.e.
+ network_interface {
+ bootable = false
+ ip_address = (known after apply)
+ ip_address_family = "IPv4"
+ ip_address_floating = (known after apply)
+ mac_address = (known after apply)
+ network = (known after apply)
+ source_ip_filtering = true
+ type = "private"
}
+ network_interface {
+ bootable = false
+ ip_address = (known after apply)
+ ip_address_family = "IPv4"
+ ip_address_floating = (known after apply)
+ mac_address = (known after apply)
+ network = (known after apply)
+ source_ip_filtering = true
+ type = "public"
}
However, if you create the server with only one interface and then add the public interface after the server is created, the ip_address field doesn't get set.
This causes some dependencies to not properly work right away since this means that ip_address is set to null.
So you need to run the script again for the ip_address to have been assigned and thus usable.
Expected behaviour
I'd expect the ip_address field to always be (known after apply) even when you add the interface to the server after initial creation such that dependencies will wait for the ip_address to be assigned before it's updated.
Environment info
Tested on module version v5.9.1 and v5.10.1 using terraform v1.6.3 and v1.9.6
The problem
I'm having the following script in a
upcloud_server
When the server is created with both the interfaces all the addresses is
(known after apply)
i.e.However, if you create the server with only one interface and then add the public interface after the server is created, the
ip_address
field doesn't get set.This causes some dependencies to not properly work right away since this means that
ip_address
is set to null. So you need to run the script again for theip_address
to have been assigned and thus usable.Expected behaviour
I'd expect the
ip_address
field to always be(known after apply)
even when you add the interface to the server after initial creation such that dependencies will wait for theip_address
to be assigned before it's updated.Environment info
Tested on module version
v5.9.1
andv5.10.1
using terraformv1.6.3
andv1.9.6