Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Pipeline 'azure-functions-deploy' failing because it can't find resource group

When trying deploy an Azure Function via a pipeline, I'm seeing the following error -

✖ Could not get the resource group associated with function my-function-app.

I used a snippet from readme file of the azure-function-deploy pipeline in my YAML file, so hopefully I'm not missing anything. I'm using version 1.0.1.

Is anyone able to suggest what may be going wrong, or how I can further investigate the issue?

Here is my pipeline YAML file -

image: microsoft/dotnet:sdk

- step:
name: Build WitchHunt
- dotnetcore
- dotnet restore
- dotnet build $PROJECT_NAME
- apt-get update
- apt-get install zip -y
- zipfile=""
- dir="packages"
- mkdir $dir
- zip -r $zipfile $dir
- step:
name: Deploy Function App to Azure
- pipe: microsoft/azure-functions-deploy:1.0.1
ZIP_FILE: packages/
DEBUG: "false"


1 answer

I believe I know the answer here, and it looks as though it's because of an inadequacy with how the azure-functions-deploy pipe works.

The 'AZURE_APP_ID' that I was using was for a Service Principal that could see resources in more than one Subscription. Looking at the output, I could see the following -

++ az login --service-principal --username $AZURE_APP_ID --password $AZURE_PASSWORD --tenant $AZURE_TENANT
++ az resource list -n $FUNCTION_APP_NAME --resource-type Microsoft.Web/Sites --query '[0].resourceGroup'

This means that the first Subscription was selected, and so my Function App was not found, leading to the error about the Resource Group not being found.

What I believe the pipe should do is log in to Azure, set the desired Subscription, and then look for the Resource Group to which the Function App belongs -

az login --service-principal --username $AZURE_APP_ID --password $AZURE_PASSWORD --tenant $AZURE_TENANT
az account set --subscription $AZURE_SUBSCRIPTION
az resource list -n $FUNCTION_APP_NAME --resource-type Microsoft.Web/Sites --query '[0].resourceGroup'

In this case, I had to create a new Service Principal and ensure that it could only see resources in one Subscription.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Marketplace Apps & Integrations

Staying organized with Jira: best practices for a better project management

Project managers know this problem: A “mountain of work” lays in front of you, and you don’t know how and where to tackle them. Different to-dos lie ahead, but just one task after the other can be ha...

187 views 2 1
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you