Add a `check_capacity.py` script
Opened this issue · 2 comments
A script like https://github.com/equinix/terraform-metal-anthos-on-vsphere/blob/main/check_capacity.py would be helpful here, to determine capacity prior to attempting to apply the terraform configuration.
The packet cli can also be used: https://github.com/packethost/packet-cli/blob/master/docs/packet_capacity_check.md
There's an open issue on the Terraform provider that would allow for the selection of matching facilities when there is no preference or the checking for availability in a chosen facility: equinix/terraform-provider-equinix#180
We can now get these assurances from https://registry.terraform.io/providers/equinix/metal/latest/docs/data-sources/facility and https://registry.terraform.io/providers/equinix/metal/latest/docs/data-sources/metro which can error out if the facility or metro does not report the necessary capacity.
I'm just noting that the capability is present in the Terraform provider now. This module is not taking advantage of this yet.