Azure / functions-action

Enable GitHub developers to deploy to Azure Function Apps using GitHub Actions
MIT License
152 stars 75 forks source link

Unable to Find Function App with Multi-Subscription SPN #144

Closed nerddtvg closed 2 years ago

nerddtvg commented 2 years ago

It seems when the service principal has multiple subscriptions available, the function app is not found if it is not in the default subscription.

The action should search all subscriptions, support specifying a subscription ID, or have the documentation state the limitation and workaround with az acount set --subscription.

patelchandni commented 2 years ago

@nerddtvg Did you create service principle using the recommended steps in README?

nerddtvg commented 2 years ago

@patelchandni These are existing service principals that have defined subscriptionId values in the JSON already as required by other tasks that also only search the default subscription. I can't change that value. Hence why I think it would be ideal if this task (and those others) allowed us to specify a subscription ID or search across all available subscriptions if that is provided. The simplest way is specifying the subscription as an optional parameter, otherwise searching across all subscriptions could end up with duplicates or ARM API request quota issues.

Or it could be mentioned in the documentation that using az account set --subscription as a command prior to running this task, you can specify something different. Just for completeness sake.