Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Function deploy creates the storage account #19298

Closed
abhinav-jain09 opened this issue Nov 21, 2018 — with docs.microsoft.com · 7 comments
Closed

Function deploy creates the storage account #19298

abhinav-jain09 opened this issue Nov 21, 2018 — with docs.microsoft.com · 7 comments

Comments

Copy link

HI Team,
when I deploy the function azure-functions:deploy it creates the storage account and as per my service plan it also create the storage service plan . Where are the setting to control it . it really frustrating that it creates the hell lot of stuff and no setting to control it.


Document Details

Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

@KetanChawda-MSFT
Copy link

@abhinav-jain09 Thank you for your feedback! We will investigate and get back to you with our findings.

@PramodValavala-MSFT
Copy link
Member

@abhinav-jain09 There are a few more configurations that the Functions Maven plugin can take. You can find more information here.

You can configure the App Service Plan to use by making these changes to your pom.xml

  1. Add this to project > properties
<functionAppServicePlanName>WestUS2Plan</functionAppServicePlanName>

If you have an existing App Service Plan with a different name, change it here.

  1. Add this to line under the configuration for the azure-functions-maven-plugin
<appServicePlanName>${functionAppServicePlanName}</appServicePlanName>

With these settings, it should use the existing App Service Plan with the same name mentioned.

Unfortunately, there is no way to configure the storage account details as of today.
This shouldn't be a very big problem since storage accounts are not recommended to be shared across multiple function apps.

@abhinav-jain09
Copy link
Author

whatever function creates by default via portal it should be configurable by mvn otherwise no point of using maven because it cannot do the job completely. everytime I deoply the new function it create the new storage account with its own naming convention . we have internally our naming convention to define the resouce name.

@PramodValavala-MSFT
Copy link
Member

@abhinav-jain09 This indeed is a valid scenario that you are trying to achieve.

Since Java for Azure Functions is still in Preview, there are still things that require ironing out.
It would be best to create a separate issue on this repo to address this issue accordingly.

@PramodValavala-MSFT
Copy link
Member

@abhinav-jain09 I have referenced this in another issue in the functions maven plugin repo which discusses the same functionality requirement which is a better avenue to continue the discussion.

As there is no doc update required at this time, we will now proceed to close this thread. If there are further questions regarding this matter, please tag me in your reply. We will gladly continue the discussion and we will reopen the issue.

@jamshaidishaque
Copy link

jamshaidishaque commented May 3, 2019

I am still facing this issue, every time when I try to create a Azure function with maven it is not reading my connection-string from pom.xml and create a new storage account.

I am providing the value like this

<property>
<name>AzureWebJobsStorage</name>
<value>Storage_account_connection-string</value>
<property>

@PramodValavala-MSFT
Copy link
Member

@abhinav-jain09 Here is a workaround for this until its officially supported

As a workaround, you could use the maven plugin just for building and then use func to deploy.

I assume you've already created a function app as documented in the Azure CLI Quickstart.

  1. Build the app
mvn clean package
  1. Use func to publish
# Change to the staging directory
cd target/azure-functions/<appName>
# Would be something like this - cd target/azure-functions/<artifactId>-20190506045816127

# Deploy using func
func azure functionapp <FunctionAppName>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants