hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.6k stars 4.64k forks source link

Outdated node version is mentioned #27806

Open azarboon opened 1 week ago

azarboon commented 1 week ago

Is there an existing issue for this?

Community Note

Terraform Version

1.9.7

AzureRM Provider Version

4.6.0

Affected Resource(s)/Data Source(s)

azurerm_linux_function_app

Terraform Configuration Files

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "example-resources"
  location = "West Europe"
}

resource "azurerm_storage_account" "example" {
  name                     = "linuxfunctionappsa"
  resource_group_name      = azurerm_resource_group.example.name
  location                 = azurerm_resource_group.example.location
  account_tier             = "Standard"
  account_replication_type = "LRS"
}

resource "azurerm_service_plan" "example" {
  name                = "example-app-service-plan"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location
  os_type             = "Linux"
  sku_name            = "B1"
}

resource "azurerm_linux_function_app" "example" {
  name                = "example-linux-function-app"
  resource_group_name = azurerm_resource_group.example.name
  location            = azurerm_resource_group.example.location

  storage_account_name       = azurerm_storage_account.example.name
  storage_account_access_key = azurerm_storage_account.example.primary_access_key
  service_plan_id            = azurerm_service_plan.example.id

  site_config {
    application_stack {
      node_version = "14"
    }
  }
}

Debug Output/Panic Output

https://gist.github.com/azarboon/bf0d80f7d1666401d1b7a2c619b3d453

Expected Behaviour

Successfully run the app

Actual Behaviour

Application fails to run. I get error that specified node version is outdated, even though I used node version mentioned in the doc.

Steps to Reproduce

terraform plan -out main.tfplan terraform apply main.tfplan

Then check the function's public URL then check "Diagnose and solve problems" in Azure Portal

Important Factoids

No response

References

No response

azarboon commented 1 week ago

Here is the Azure doc page that shows supported node versions and following is the screenshot:

image

azarboon commented 1 week ago

@stephybun can you please check this message before moving on so I don't have to create a new PR? I think the tests fail to catch the error.