title: How Do I Set The Node Version In An Azure Web App?
body: <p>I have created an Azure Web App using terraform but it has the wrong version of NodeJS in it.</p>
  
  <pre><code>resource "azurerm_app_service_plan" "app-plan" {
    name                = "${var.prefix}-app-plan"
    resource_group_name = var.resource_group_name
    location            = var.resource_group_location
  
    sku {
      tier = "Free"
      size = "F1"
    }
  }
  
  #azurerm_app_service doesn't support creating Node.JS 8.10 apps
  #https://github.com/terraform-providers/terraform-provider-azurerm/issues/4144
  resource "azurerm_app_service" "app-service" {
    name                = "${var.prefix}-app"
    resource_group_name = var.resource_group_name
    location            = var.resource_group_location
    app_service_plan_id = azurerm_app_service_plan.app-plan.id
  }
  </code></pre>
  
  <p>I have tried updating the <a href="https://docs.microsoft.com/en-us/rest/api/appservice/webapps/createorupdateconfiguration" rel="nofollow noreferrer">configuration using the rest api</a> </p>
  
  <pre><code>{
    "properties": {
      "nodeVersion": "8.10"
    }
  }
  </code></pre>
  
  <p>and also updating the <a href="https://docs.microsoft.com/en-us/rest/api/appservice/webapps/updateapplicationsettings" rel="nofollow noreferrer">application settings using the rest api</a></p>
  
  <pre><code>{
    "properties": {
      "WEBSITE_NODE_DEFAULT_VERSION": "8.10"
    }
  }
  </code></pre>
  
  <p>However, when I run the Console it still says <code>node --version v0.10.40</code></p>
  
  <p>When I run <code>env</code> it looks like the <code>PATH</code> variable is incorrect.</p>
  
  <p>Node 8.10 does exist on the machine at <code>D:\Program Files (x86)\nodejs\8.10.0</code></p>
  
  <p>How can I update the path from the rest api?</p>
  
  <p>Are there any alternatives?</p>
  
  <p>My preferences are terraform > az cl > rest api</p>
  
  <p><strong>Note:</strong>
  Bear in mind that when I create the web app in the portal, selecting Node 8.10 forces me to choose Windows as the O/S.</p>