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
{{ message }}
Repository navigation
Offer a data source for stackit_networks of a project #1600
In our project we are building a platform to enable migration teams to migrate existing applications into the cloud. For this we manage STACKIT projects and their networks centrally as a platform team, the application teams then can build their resources on top of that and are only allowed to put e.g. their VMs into the provided network.
Now, as they don't create/manage their stackit_network resource by themselves, but need the respective stackit_network_id to actually put NICs in that network, they need a way to lookup the existing network of their project. As it is built right now, the respective stackit_network data source unfortunately always needs the networkId to be set in order to fetch the details for a given network.
Proposed solution
To solve this a data source to actually list all the networks of a given project would be very helpful (basically calling the GET stackit_network API Endpoint without setting a network id), so basically this:
data "stackit_networks""my_networks { project_id = "xxx"}
Alternative solutions (optional)
Optionally, it would also be very helpful to include some filtering possibilities, to maybe query a network by name (maybe even supporting wildcards to look for specific substrings etc.) or labels etc.
thanks for your proposal, I've created an internal issue to create a networks data source. The endpoint to list networks in a project supports filtering by labels, would this be sufficient for your usecase?
Activity
cgoetz-inovex commentedon Jul 22, 2026
Hi @ffasulo,
thanks for your proposal, I've created an internal issue to create a networks data source. The endpoint to list networks in a project supports filtering by labels, would this be sufficient for your usecase?
ffasulo commentedon Jul 28, 2026
Possibilities to filter by name would be perfect, but we could also manage to work with labels instead i guess.
ffasulo commentedon Jul 28, 2026
Maybe https://registry.terraform.io/providers/stackitcloud/stackit/latest/docs/data-sources/service_accounts can serve as an example...there you have the possibility to pass a regex to filter the mail in that case, in our case it would be the network name accordingly
thorbenbelow commentedon Jul 29, 2026
Hi @cgoetz-inovex, I've created a PR to address this issue.
feat(iaas): onboarding of networks datasource (#1839)