Terraform AzureRM provider "PublicIPCountLimitReached" in CI
Azure returned PublicIPCountLimitReached: the subscription already holds the maximum number of public IP addresses allowed in the Region, so the new IP cannot be created until you raise the quota or free some.
What this error means
terraform apply fails with Code="PublicIPCountLimitReached" Message="Cannot create more than N public IP addresses for this subscription in this region."
Terraform
Error: creating Public IP: network.PublicIPAddressesClient#CreateOrUpdate:
... Code="PublicIPCountLimitReached" Message="Cannot create more than 20
public IP addresses for this subscription in this region."Common causes
The Region public IP quota is exhausted
The subscription already has as many public IPs as the Region allows, so any new one is rejected.
Leaked IPs from failed or partial runs
Earlier failed applies left public IPs allocated, consuming the quota without being in use.
How to fix it
Request a quota increase
- Check current usage against the Region limit.
- Raise the public IP quota for the subscription and Region.
- Re-run apply once the new limit is granted.
Terminal
az network list-usages --location eastus \
--query "[?contains(name.value, 'PublicIPAddresses')]"Free unused public IPs
Delete leaked or unused public IP addresses to reclaim quota, especially ones left by failed runs.
How to prevent it
- Track public IP usage against the Region limit.
- Clean up IPs from failed applies so quota is not leaked.
- Request quota ahead of provisioning many IPs.
Related guides
Terraform AzureRM provider role assignment "does not have authorization" in CIFix Terraform AzureRM "authorization.RoleAssignmentsClient ... does not have authorization to perform action"…
Terraform AzureRM provider "QuotaExceeded" / Sku capacity in CIFix Terraform AzureRM Code="QuotaExceeded" in CI - the requested VM size or vCPU count exceeds the subscripti…
Terraform Google provider "Error 403: Quota exceeded" in CIFix Terraform Google provider "googleapi: Error 403: Quota ... exceeded" / RESOURCE_EXHAUSTED in CI - the req…