2

I have a valid Azure free trial subscription and I want to deploy a local spring boot app to azure.

I have configured the azure-webapp-maven-plugin in my pom.xml. I am using Intellij.

When i execute mvn azure-webapp:deploy, i get the following error:

Failed to execute goal com.microsoft.azure:azure-webapp-maven-plugin:1.9.1:deploy (default-cli) on project movie-catalog-service: Encoutering error when deploying to azure: 'No available subscription found in current account.'

enter image description here

Edit 1: I installed azure CLI and from my command line it is able to find the subsciption. I followed this url: https://learn.microsoft.com/en-us/cli/azure/install-azure-cli-macos?view=azure-cli-latest

Hidden some personal info

But still cannot find the same from Intellij.

I tried azure-webapp deploy with Azure CLI. Still same

enter image description here

Purvesh
  • 79
  • 2
  • 7

1 Answers1

1

I had the same issue. And the issue is now opened here.

If Azure CLI is installed and sub is detected correctly. You can try to use Azure CLI Auth insstead of Maven plug-in. You can do that by adding config in your azure-webapp-maven-plugin configuration in pom.

<authType>azure_cli</authType>

It would be like this:

<plugin> 
    <groupId>com.microsoft.azure</groupId>  
    <artifactId>azure-webapp-maven-plugin</artifactId>  
    <version>1.9.1</version>  
    <configuration>
      <schemaVersion>V2</schemaVersion>
      <authType>azure_cli</authType>
      <resourceGroup>someg-group</resourceGroup>
      <appName>some-app-name</appName>
      <pricingTier>P1v2</pricingTier>
      <region>westeurope</region>
      ....
</plugin>
chankw
  • 11
  • 1