title: Creating Azure function app against existing consumption plan
body: <p>I have created a function app against a new consumption plan with the following command:</p>
  
  <pre><code>az functionapp create
      --resource-group myresourcegroup 
      --storage-account mystorageaccount 
      --name myfunctionapp
      --runtime node
      --consumption-plan-location northeurope 
  </code></pre>
  
  <p>This creates the function app correctly, but the app service plan is called <code>NorthEuropePlan</code>, which does not meet the naming guidelines I am following. I cannot see <a href="https://docs.microsoft.com/en-us/cli/azure/functionapp?view=azure-cli-latest#az-functionapp-create" rel="nofollow noreferrer">anything in the docs</a> that will allow me to change this name.</p>
  
  <p>Therefore, I would like to create the app service plan before, as a consumption plan (tier <code>Y1 Dynamic</code>), and then create a function app against this plan.</p>
  
  <pre><code>az resource create
      --resource-group myresourcegroup
      --name myconsumptionplan
      --resource-type Microsoft.web/serverfarms
      --is-full-object
      --properties "{\"location\":\"northeurope\",\"sku\":{\"name\":\"Y1\",\"tier\":\"Dynamic\"}}"
  </code></pre>
  
  <p>That command works correctly, and creates me an app service plan. However, when I try to use that plan (substituting <code>--consumption-plan-location northeurope</code> for <code>--plan myconsumptionplan</code>), I get this error:</p>
  
  <blockquote>
    <p>There was a conflict. AlwaysOn cannot be set for this site as the plan does not allow it.</p>
  </blockquote>
  
  <p>Do I need to specify some more configuration when I make the app service plan?</p>
  
  <p>When I run <code>az appservice plan show</code> against <code>NorthEuropePlan</code> and <code>myconsumptionplan</code>, the only difference in the object that comes back is the name.</p>