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
When working with networks, we usually depend on the parent network and require the users to add an extra depends to wait for the subnet to be deployed before taking actions. For example:
resource"hcloud_load_balancer_network""load_balancer" {
load_balancer_id=hcloud_load_balancer.load_balancer.idnetwork_id=hcloud_network.network.idip="10.0.1.5"# **Note**: the depends_on is important when directly attaching the# server to a network. Otherwise Terraform will attempt to create# server and sub-network in parallel. This may result in the server# creation failing randomly.depends_on=[
hcloud_network_subnet.srvnetwork
]
}
I propose to require the subnet_id instead of the network_id, which allows us to remove the depends on and perform an additional validation for the ip, since the subnet ID also holds both the network ID and the ip_range in a CIDR notation.
Alternatively, we could require both network id and subnet id, similar to how the hcloud_server_network resource is working, which makes it even more explicit.
This will probably be a breaking change, but the field may be added first without being required, and once we release a new major version, we mark the field as required.
The text was updated successfully, but these errors were encountered:
What whould you like to see?
When working with networks, we usually depend on the parent
network
and require the users to add an extra depends to wait for thesubnet
to be deployed before taking actions. For example:I propose to require the subnet_id instead of the network_id, which allows us to remove the
depends on
and perform an additional validation for the ip, since the subnet ID also holds both the network ID and the ip_range in a CIDR notation.Alternatively, we could require both network id and subnet id, similar to how the
hcloud_server_network
resource is working, which makes it even more explicit.This will probably be a breaking change, but the field may be added first without being required, and once we release a new major version, we mark the field as required.
The text was updated successfully, but these errors were encountered: