r/devops • u/_Ark___ • Sep 05 '26
Troubleshooting AZURE KEYVAULT KEY DEPLOYMENT ERROR 400 BAD REQUEST
Azure Key Vault Key Deployment – 400 Bad Request
If you’re receiving a vague 400 Bad Request while deploying a key in Azure Key Vault, check how many tags you’re passing to the key.
Azure Key Vault keys support a maximum of 15 tags. I spent almost three hours on Friday evening troubleshooting permissions, networking, and the Terraform configuration before realizing that too many tags were causing the request to fail.
This may be an easy one to spot for some people, but the error message wasn’t very helpful, so I’m leaving this here in case someone runs into the same issue.
3
u/ArieHein Sep 05 '26
I dont believe its 15 on the actual resource. There is a limit of usually 50 tags per object, so on subscriptions, on resource group and on resource and they dont stack for the limit.
I remmeber there was a limit in unique key value overall but it was always a big number that well never reach.
You might have a policy in the tenant that limits or potentually an old version of tf and/or azurerm provider.
There's a ms learn page that tallks about resource limitations iirc.
9
u/memesearches Sep 05 '26
Yup. Azure’s errors are always not helpful!
1
u/_Ark___ Sep 05 '26
For additional context, our pipeline triggers the Terraform plan, which runs on a Terraform Cloud agent hosted in an AKS cluster. The plan is saved in Terraform Cloud, and the service principal configured for the workspace is used to deploy the resources to Azure.