Forum Discussion

bhushangawale's avatar
bhushangawale
Copper Contributor
Dec 05, 2023

Mult-subscription Terraform deployment and Azure DevOps Service Connections

While it is understood that Terraform templates can facilitate multi-subscription deployment through the 'alias' concept, as outlined in the documentation here, how does this integration function within the framework of Azure DevOps pipelines?

 

To illustrate, consider the scenario where you aim to execute the 'terraform apply' command for a template using AZ CLI, deploying resources across multiple subscriptions. AZ CLI requires a service connection object mapped to a specific Azure subscription, leading to deployment failures in other subscriptions, even if the same service connection has access. Is there a better approach to address this issue or what is the recommendation in terms of creating service connections so that such template deployment could work?

Resources