简体   繁体   中英

Azure Maven Plugin - Deployment Fails with wired error

mvn azure-functions:deploy fails with this wired error. Can you help me decipher the error.

  [ERROR] Failed to execute goal com.microsoft.azure:azure-functions-maven-plugin:1.10.0:deploy (default-cli) on project function-sample-azure:
 Unknown error with status code 403: Unrecognized field "evaluationDetails" (class com.microsoft.azure.PolicyViolationErrorInfo), 
 ot marked as ignorable (13 known properties: "policyDefinitionId", "policyDefinitionReferenceId", "policyDefinitionDisplayName", "policyAssignmentParameters",
 "policyAssignmentName", "policySetDefinitionName", "policyDefinitionName", "policyAssignmentScope", "policyDefinitionEffect", "policyAssignmentId", "policySetDefinitionId", 
 "policySetDefinitionDisplayName", "policyAssignmentDisplayName"])
[ERROR]  at [Source: (String)"{"policyDefinitionDisplayName":"STORAGE - Deny Storage account Version 1",
"policySetDefinitionDisplayName":"Storage-initiative-npd","evaluationDetails":{"evaluatedExpressions":
[{"result":"True","expressionKind":"Field","expression":"type","path":"type","expressionValue":"Microsoft.Storage/storageAccounts",
"targetValue":"Microsoft.Storage/storageAccounts","operator":"Equals"},{"result":"True","expressionKind":"Field","expression":"kind","path":"kind","expressionValue":"Storage",
"targetValue":"Sto"[truncated 911 chars]; line: 1, column: 154]
 (through reference chain: com.microsoft.azure.CloudError["additionalInfo"]->java.util.ArrayList[0]->com.microsoft.azure.PolicyViolationErrorInfo["evaluationDetails"])
[ERROR] -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal com.microsoft.azure:azure-functions-maven-plugin:1.10.0:deploy 
(default-cli) on project function-sample-azure: Unknown error with status code 403

Below are the properties and plugin configuration I am using. I also have an enterprise requirement to not create a new storage account with this deployment; but rather use an existing one is there are way to configure this.

<properties>
    <java.version>1.8</java.version>
    <functionAppName>12345600SampleFunctionApp</functionAppName>
    <functionAppRegion>eastus2</functionAppRegion>
    <region>eastus2</region>        
    <functionResourceGroup>myFunctionResourceGroup</functionResourceGroup>
    <stagingDirectory>${project.build.directory}/azure-functions/${functionAppName}</stagingDirectory>
    <start-class>com.wi.prdc.azure.sample.function.Main</start-class>       
    <azure.functions.java.library.version>1.4.2</azure.functions.java.library.version>
    <azure.functions.maven.plugin.version>1.10.0</azure.functions.maven.plugin.version>
    <wrapper.version>1.0.23.RELEASE</wrapper.version>
    <appServicePlanName>myfunctionAppServicPlan</appServicePlanName>
</properties>

thanks for raising this issue. We will bump default version to v2 in the upcoming maven plugin releases.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM