Reputation: 337
I have a git repository configured with VSTS.I am trying to create a function app with deployment source url set to vsts git.
az functionapp create --name CSharpServerlessFunctions --storage-account xxxxxxxxxxxxxxxxxxx --resource-group xxxx --consumption-plan-location eastus --deployment-source-url https://xxxxxx.visualstudio.com/yyyyy/_git/CSharpServerlessFunctions --debug
Above cli command creates function but fails to link to git with following error.
Link to git repository failed due to error 'Deployment failed. Correlation ID: 84645178-264b-4267-8b8f-c83eaef274e4. Operation failed with status: 200. Details: Resource state Failed
Upvotes: 1
Views: 173
Reputation: 9411
Usually, we use the open source git in the command --deployment-source-url
,such as git in github. It means that every one can see the git and the CLI can access it without authentication.
However, the Git in VSTS is not open to everyone. CLI cannot link to git which you post in the command.
Solution:
You'd better use Azure portal for deployment(For Security) :
Linking your VSTS account to your Azure subscription > Your Function App >Platform features > Deployment options > Setup > Choose source > Visual Studio Team Services
Additional:
If you still want to use CLI to deploy function App, you need to complete complex steps to config your source. But I didn't test it for Git in VSTS.
Hope this helps!
Upvotes: 2