Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

resource apstra_datacenter_routing_zone does not allocates Leaf Loopback ip's #672

Closed
Walter-Smet-at-delen opened this issue May 27, 2024 · 3 comments · Fixed by #675
Closed

Comments

@Walter-Smet-at-delen
Copy link

inherit from blueprint or create a resource apstra_datacenter_routing_zone_resource_pool_allocation

@Walter-Smet-at-delen
Copy link
Author

creating a routing zone with this code:

resource "apstra_datacenter_routing_zone" "routing_zone" {
  name              = var.routing_zone_name
  blueprint_id      = apstra_datacenter_blueprint.this.id
  vlan_id           = var.routing_zone_vlan_id
  vni               = var.routing_zone_vni
}

does not allocates leaf loopback ip's.

possible solutions:

  • add a parameter to apstra_datacenter_routing_zone
  • inherit from blueprint
  • foresee a resource apstra_datacenter_routing_zone_resource_pool_allocation

@chrismarget-j
Copy link
Collaborator

As in the Web UI, a resource pool needs to be allocated for assigning loopback addresses within each routing zone.

You can do this using the apstra_datacenter_resource_pool_allocation resource with the optional routing_zone_id attribute:

resource "apstra_datacenter_resource_pool_allocation" "routing_zone" {
  blueprint_id    = apstra_datacenter_blueprint.this.id
  routing_zone_id = apstra_datacenter_routing_zone.routing_zone.id
  role            = "leaf_loopback_ips"
  pool_ids        = [ apstra_ipv4_pool.something.id ]
}

Including routing_zone_id makes the apstra_datacenter_resource_pool_allocation resource behave the way you probably imagined apstra_datacenter_routing_zone_resource_pool_allocation would behave.

@Walter-Smet-at-delen
Copy link
Author

Hello,

Thanks for the quick response. Exactly what I need!

Maybe you can add a notice in the documentation regarding this setting on:
https://registry.terraform.io/providers/Juniper/apstra/latest/docs/resources/datacenter_routing_zone

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants