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
I would love to see this implemented in some form, and will gladly offer to help where possible.
From looking at the API docs, I can see that it's quite easy to get the subnets from the network endpoint, so the subnets could basically be included in the network datasource quite easily.
But, a problem is, as @apricote says above, that there is no actual ID (or any type of identifier at all) on the subnets.
This makes any practical use of the subnets hard in my eyes.
Is there any possibility to add either labels or a name to the subnets in the API (and database I would guess)? A unique id might be somewhat useful (especially if you provision the subnet and resources in the same project), but I would personally want to be able to identify the subnet with something not automatically generated (so I can select a specific subnet from the bunch).
If the API had that, the labels or name could be included in the value in the network resource and/or a new datasource could be created (which would fetch the subnet from the network through the API):
data "hcloud_network_subnet" "my-subnet" {
network_id = data.hcloud_network.my-network.id
name = "my-core-network"
# or
with_selector = "some-label=my-network-label"
}
What whould you like to see?
A data resource similar to
hcloud_network
for obtaining subnet details based on its ID. Thank youThe text was updated successfully, but these errors were encountered: