diff --git a/docs/data-sources/datacenter_systems.md b/docs/data-sources/datacenter_systems.md index f92f0f54..42694b19 100644 --- a/docs/data-sources/datacenter_systems.md +++ b/docs/data-sources/datacenter_systems.md @@ -15,19 +15,26 @@ Optional `filter` attribute filters the result list so that it only contains IDs ## Example Usage ```terraform -# This example outputs a set of graph db node IDs representing all spine -# switches with tag 'junos' and tag 'qfx' -data "apstra_datacenter_systems" "juniper_spines" { +# This example outputs a set of graph db node IDs representing +# non-prod leaf switches in pod 2. +data "apstra_datacenter_systems" "pod2_nonprod_leafs" { blueprint_id = apstra_datacenter_blueprint.example.id - filter = { - role = "spine" - system_type = "switch" - tag_ids = ["junos", "qfx"] - } + filters = [ + { + role = "leaf" + system_type = "switch" + tag_ids = ["pod2", "dev"] + }, + { + role = "leaf" + system_type = "switch" + tag_ids = ["pod2", "test"] + }, + ] } -output "qfx_spines" { - value = data.apstra_datacenter_systems.juniper_spines.ids +output "pod2_nonprod_leafs" { + value = data.apstra_datacenter_systems.pod2_nonprod_leafs.ids } ``` diff --git a/examples/data-sources/apstra_datacenter_systems/example.tf b/examples/data-sources/apstra_datacenter_systems/example.tf index 6c84cb7e..b212e3fb 100644 --- a/examples/data-sources/apstra_datacenter_systems/example.tf +++ b/examples/data-sources/apstra_datacenter_systems/example.tf @@ -1,14 +1,21 @@ -# This example outputs a set of graph db node IDs representing all spine -# switches with tag 'junos' and tag 'qfx' -data "apstra_datacenter_systems" "juniper_spines" { +# This example outputs a set of graph db node IDs representing +# non-prod leaf switches in pod 2. +data "apstra_datacenter_systems" "pod2_nonprod_leafs" { blueprint_id = apstra_datacenter_blueprint.example.id - filter = { - role = "spine" - system_type = "switch" - tag_ids = ["junos", "qfx"] - } + filters = [ + { + role = "leaf" + system_type = "switch" + tag_ids = ["pod2", "dev"] + }, + { + role = "leaf" + system_type = "switch" + tag_ids = ["pod2", "test"] + }, + ] } -output "qfx_spines" { - value = data.apstra_datacenter_systems.juniper_spines.ids +output "pod2_nonprod_leafs" { + value = data.apstra_datacenter_systems.pod2_nonprod_leafs.ids }