Closed artur-tekieli closed 2 years ago
@artur-tekieli I think you can solve it without an enhancement doing something like this:
resource "dnacenter_site" "example" {
provider = dnacenter
parameters {
site {
building {
name = "testBuilding"
address = "255 China Basin Street, San Francisco, California 94158, United States"
parent_name = "Global"
latitude = 37.77178651716143
longitude = -122.39062051589885
}
}
type = "building"
}
}
resource "dnacenter_reserve_ip_subpool" "example" {
provider = dnacenter
depends_on = [ dnacenter_site.example ]
parameters {
...
name = "Cape_Town_Corp_VN"
site_id = dnacenter_site.example.item.0.id //<=====
type = "Generic"
}
}
Try it and let us know if works and it's what you want.
@fmunozmiranda - Yes that's exactly what I wanted - Thanks!
Prerequisites
Describe the bug Its not really a bug but more of a question maybe an enhancement. When reserving an IP pools I need to reference site_id, but site_id are only after a DNAC site is configured. So it makes the automation a bit more difficult to achieve:
Is it not possible to reference "site_name_hierarchy" = "Global/SouthAfrica/CapeTown" - instead of site_id ?
This would make it much more easier to use.