Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

microsoft/azure-web-apps-deploy - Can't use pipelines with multiple subscription.

Martin Johannesson April 13, 2020

Ever since I created a second subscription deployment with my service principle account has stopped working.
Here is an example of me trying to deploy a web app identified by the resource group and app name.
I have always used just a singular SP and then within each resource group made a role assignment with appropriate access.
I am currently deploying by hand from my local machine. Not ideal, but not a blocking issue.

Version: 1.0.2

Logs:

INFO: Signing in...az login --service-principal --username $AZURE_APP_ID --password $AZURE_PASSWORD --tenant $AZURE_TENANT_ID
[
{ "cloudName": "AzureCloud", "id": "864bf978-b99e-47fb-b50e-df6aa28f7674", "isDefault": true, "name": "Windows Azure MSDN ? Visual Studio Ultimate", "state": "Enabled", "tenantId": "$AZURE_TENANT_ID", "user": { "name": "$AZURE_APP_ID", "type": "servicePrincipal" } }, { "cloudName": "AzureCloud", "id": "6ea67b78-9320-4c04-9872-cc04f4749ec4", "isDefault": false, "name": "Client-Lundbeck", "state": "Enabled", "tenantId": "$AZURE_TENANT_ID", "user": { "name": "$AZURE_APP_ID", "type": "servicePrincipal" } }]
INFO: Starting deployment to Azure app service...
az webapp deployment source config-zip --resource-group K37952-CliniHub-test --name k37952-clinihub-test-main-wa --src app.zip
ERROR: ResourceGroupNotFound - Resource group 'K37952-CliniHub-test' could not be found.
ERROR: ResourceGroupNotFound - Resource group 'K37952-CliniHub-test' could not be found.

Steps to reproduce. (I have done these twice with the same error)

  • Have one subscription.
  • Create a SP.
  • Create a RG and a webapp.
  • Make a role assignment to the RG with the SP
  • Run the pipelines (works)
  • Create a second subscription.
  • Create a new RG and a webapp
  • Make a role-assignment to the new RG with the SP
  • Run the pipelines with updated variables to target the new RG. (fails)

0 answers

Suggest an answer

Log in or Sign up to answer