Open JoelCanteroGCO opened 1 month ago
I'm getting the same issue now. Is there chance of an update ?
Hi, the task does not currently support Service Connection configured with Management Group scope as that type does not populate subscription ID. To solve this we would need to an option to supply the subscription id manually.
OK, well for myself, this was working fine up to 14/08/2024 then started failing 15/08/2024. Was there a change that can be attributed to the failure since 15/08/2024? Also, what alternatives are there? TIA.
So I managed to fix this with the help of a colleague by adding a subscription_id = xxx to the azurerm provider block.
That's great! thanks for updating the issue.
I'm encountering an issue when running a Terraform pipeline in Azure DevOps with a service connection that has a Management Group scope. The error message indicates that Terraform is unable to determine the subscription ID, which seems to be an issue when using Management Group scope.
Terraform Configuration:
Error Message:
Planning failed. Terraform encountered an error while generating this plan.
Details:
Terraform Version: 1.9.14
Azure Provider Version:
Azure DevOps Configuration: 3.114.0
Service Connection: Configured with Management Group scope
Service Principal Permissions: Owner
Steps to Reproduce:
Configure the Azure DevOps pipeline with a service connection scoped to a Management Group (Azure Resource Manager using Workload Identity federation with OpenID Connect (automatic))
Use the azurerm provider in Terraform with the configuration provided.
Run terraform plan and observe the error.
Expected Behavior:
Terraform should be able to generate the plan successfully without errors related to subscription ID, given that the scope is set at the Management Group level.
Additional Context:
Possible Solution: