Every infra engineer knows the drill. You build a beautiful Azure environment, craft perfect templates, and then CI/CD becomes the bottleneck. Permissions, tokens, deployments… it all slows to a crawl when Azure Resource Manager (ARM) and TeamCity refuse to play nice. The fix is not magic, it is understanding how ARM’s role-based access fits into TeamCity’s automation model.
Azure Resource Manager handles the what and where of your infrastructure, defining everything as declarative templates. TeamCity covers the when and how, orchestrating continuous integration and delivery pipelines. Together, they can deliver rapid and repeatable infrastructure provisioning, but not until identity, state, and policy are properly mapped.
Integrating ARM with TeamCity starts with identity. TeamCity needs to authenticate with Azure using a service principal or a managed identity. That principal must have tightly scoped permissions in ARM—enough to deploy resources, nothing more. Once you wire in the credentials, you can pass parameters to your ARM templates and let TeamCity trigger full deployments automatically after each build.
A simple rule: never store Azure credentials directly in TeamCity. Use environment variables or a secrets manager with rotation policies. When pipelines call Azure APIs, confirm that access is logged under your CI identity. This single audit trail simplifies compliance with frameworks like SOC 2 or ISO 27001.
Common mistakes include over-privileged service principals or forgotten token expirations. The cleanest fix is to automate key rotation and map roles through Azure AD RBAC groups rather than static assignments. If a developer leaves, they lose access with one directory update instead of ten pipeline edits.