Skip to content

Commit 4baaa1c

Browse files
authored
Add Node.js 24 LTS support for Linux Azure App Service resources (hashicorp#31098)
1 parent 7aa5dc9 commit 4baaa1c

10 files changed

Lines changed: 72 additions & 5 deletions

internal/services/appservice/helpers/app_stack.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,6 +418,7 @@ func linuxApplicationStackSchema() *pluginsdk.Schema {
418418
"18-lts",
419419
"20-lts",
420420
"22-lts",
421+
"24-lts",
421422
}, false),
422423
ExactlyOneOf: linuxApplicationStackConstraint,
423424
},

internal/services/appservice/helpers/function_app_schema.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1402,6 +1402,7 @@ func linuxFunctionAppStackSchema() *pluginsdk.Schema {
14021402
"18",
14031403
"20",
14041404
"22",
1405+
"24",
14051406
}, false),
14061407
ExactlyOneOf: []string{
14071408
"site_config.0.application_stack.0.dotnet_version",
@@ -1412,7 +1413,7 @@ func linuxFunctionAppStackSchema() *pluginsdk.Schema {
14121413
"site_config.0.application_stack.0.docker",
14131414
"site_config.0.application_stack.0.use_custom_runtime",
14141415
},
1415-
Description: "The version of Node to use. Possible values include `12`, `14`, `16`, `18`, `20` and `22`",
1416+
Description: "The version of Node to use. Possible values include `12`, `14`, `16`, `18`, `20`, `22` and `24`",
14161417
},
14171418

14181419
"powershell_core_version": {

internal/services/appservice/linux_function_app_resource_test.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1325,6 +1325,15 @@ func TestAccLinuxFunctionApp_appStackNodeUpdate(t *testing.T) {
13251325
),
13261326
},
13271327
data.ImportStep(),
1328+
{
1329+
Config: r.appStackNode(data, SkuBasicPlan, "24"),
1330+
Check: acceptance.ComposeTestCheckFunc(
1331+
check.That(data.ResourceName).ExistsInAzure(r),
1332+
check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"),
1333+
check.That(data.ResourceName).Key("site_config.0.linux_fx_version").HasValue("NODE|24"),
1334+
),
1335+
},
1336+
data.ImportStep(),
13281337
{
13291338
Config: r.appStackNode(data, SkuBasicPlan, "14"),
13301339
Check: acceptance.ComposeTestCheckFunc(

internal/services/appservice/linux_function_app_slot_resource_test.go

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -978,6 +978,23 @@ func TestAccLinuxFunctionAppSlot_appStackNode(t *testing.T) {
978978
})
979979
}
980980

981+
func TestAccLinuxFunctionAppSlot_appStackNode24(t *testing.T) {
982+
data := acceptance.BuildTestData(t, "azurerm_linux_function_app_slot", "test")
983+
r := LinuxFunctionAppSlotResource{}
984+
985+
data.ResourceTest(t, r, []acceptance.TestStep{
986+
{
987+
Config: r.appStackNode(data, SkuStandardPlan, "24"),
988+
Check: acceptance.ComposeTestCheckFunc(
989+
check.That(data.ResourceName).ExistsInAzure(r),
990+
check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"),
991+
check.That(data.ResourceName).Key("site_config.0.linux_fx_version").HasValue("NODE|24"),
992+
),
993+
},
994+
data.ImportStep("site_credential.0.password"),
995+
})
996+
}
997+
981998
func TestAccLinuxFunctionAppSlot_appStackNodeUpdate(t *testing.T) {
982999
data := acceptance.BuildTestData(t, "azurerm_linux_function_app_slot", "test")
9831000
r := LinuxFunctionAppSlotResource{}
@@ -1028,6 +1045,15 @@ func TestAccLinuxFunctionAppSlot_appStackNodeUpdate(t *testing.T) {
10281045
),
10291046
},
10301047
data.ImportStep("site_credential.0.password"),
1048+
{
1049+
Config: r.appStackNode(data, SkuStandardPlan, "24"),
1050+
Check: acceptance.ComposeTestCheckFunc(
1051+
check.That(data.ResourceName).ExistsInAzure(r),
1052+
check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"),
1053+
check.That(data.ResourceName).Key("site_config.0.linux_fx_version").HasValue("NODE|24"),
1054+
),
1055+
},
1056+
data.ImportStep("site_credential.0.password"),
10311057
{
10321058
Config: r.appStackNodeUpdateTags(data, SkuStandardPlan, "18"),
10331059
Check: acceptance.ComposeTestCheckFunc(

internal/services/appservice/linux_web_app_resource_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,6 +1128,21 @@ func TestAccLinuxWebApp_withNode22LTS(t *testing.T) {
11281128
})
11291129
}
11301130

1131+
func TestAccLinuxWebApp_withNode24LTS(t *testing.T) {
1132+
data := acceptance.BuildTestData(t, "azurerm_linux_web_app", "test")
1133+
r := LinuxWebAppResource{}
1134+
1135+
data.ResourceTest(t, r, []acceptance.TestStep{
1136+
{
1137+
Config: r.node(data, "24-lts"),
1138+
Check: acceptance.ComposeTestCheckFunc(
1139+
check.That(data.ResourceName).ExistsInAzure(r),
1140+
),
1141+
},
1142+
data.ImportStep(),
1143+
})
1144+
}
1145+
11311146
func TestAccLinuxWebApp_withJre8Java(t *testing.T) {
11321147
data := acceptance.BuildTestData(t, "azurerm_linux_web_app", "test")
11331148
r := LinuxWebAppResource{}

internal/services/appservice/linux_web_app_slot_resource_test.go

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1192,6 +1192,21 @@ func TestAccLinuxWebAppSlot_withNode22LTS(t *testing.T) {
11921192
})
11931193
}
11941194

1195+
func TestAccLinuxWebAppSlot_withNode24LTS(t *testing.T) {
1196+
data := acceptance.BuildTestData(t, "azurerm_linux_web_app_slot", "test")
1197+
r := LinuxWebAppSlotResource{}
1198+
1199+
data.ResourceTest(t, r, []acceptance.TestStep{
1200+
{
1201+
Config: r.node(data, "24-lts"),
1202+
Check: acceptance.ComposeTestCheckFunc(
1203+
check.That(data.ResourceName).ExistsInAzure(r),
1204+
),
1205+
},
1206+
data.ImportStep("site_credential.0.password"),
1207+
})
1208+
}
1209+
11951210
func TestAccLinuxWebAppSlot_withJre8Java(t *testing.T) {
11961211
data := acceptance.BuildTestData(t, "azurerm_linux_web_app_slot", "test")
11971212
r := LinuxWebAppSlotResource{}

website/docs/r/linux_function_app.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@ A `application_stack` block supports the following:
185185

186186
~> **Note:** The value `21` is currently in Preview for `java_version`.
187187

188-
* `node_version` - (Optional) The version of Node to run. Possible values include `12`, `14`, `16`, `18` `20` and `22`.
188+
* `node_version` - (Optional) The version of Node to run. Possible values include `12`, `14`, `16`, `18`, `20`, `22` and `24`.
189189

190190
* `python_version` - (Optional) The version of Python to run. Possible values are `3.13`, `3.12`, `3.11`, `3.10`, `3.9`, `3.8` and `3.7`.
191191

website/docs/r/linux_function_app_slot.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -644,7 +644,7 @@ An `application_stack` block supports the following:
644644

645645
* `java_version` - (Optional) The version of Java to use. Possible values are `8`, `11`, `17` and `21`.
646646

647-
* `node_version` - (Optional) The version of Node to use. Possible values include `12`, `14`, `16`, `18`, `20` and `22`.
647+
* `node_version` - (Optional) The version of Node to use. Possible values include `12`, `14`, `16`, `18`, `20`, `22` and `24`.
648648

649649
* `powershell_core_version` - (Optional) The version of PowerShell Core to use. Possibles values are `7` , `7.2`, and `7.4`.
650650

website/docs/r/linux_web_app.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,7 @@ An `application_stack` block supports the following:
178178

179179
~> **Note:** `java_server`, `java_server_version`, and `java_version` must all be specified if building a java app
180180

181-
* `node_version` - (Optional) The version of Node to run. Possible values include `12-lts`, `14-lts`, `16-lts`, `18-lts`, `20-lts` and `22-lts`. This property conflicts with `java_version`.
181+
* `node_version` - (Optional) The version of Node to run. Possible values include `12-lts`, `14-lts`, `16-lts`, `18-lts`, `20-lts`, `22-lts` and `24-lts`. This property conflicts with `java_version`.
182182

183183
~> **Note:** 10.x versions have been/are being deprecated so may cease to work for new resources in the future and may be removed from the provider.
184184

website/docs/r/linux_web_app_slot.html.markdown

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ An `application_stack` block supports the following:
180180

181181
~> **Note:** The valid version combinations for `java_version`, `java_server` and `java_server_version` can be checked from the command line via `az webapp list-runtimes --os-type linux`.
182182

183-
* `node_version` - (Optional) The version of Node to run. Possible values are `12-lts`, `14-lts`, `16-lts`, `18-lts`, `20-lts` and `22-lts`. This property conflicts with `java_version`.
183+
* `node_version` - (Optional) The version of Node to run. Possible values are `12-lts`, `14-lts`, `16-lts`, `18-lts`, `20-lts`, `22-lts` and `24-lts`. This property conflicts with `java_version`.
184184

185185
~> **Note:** 10.x versions have been/are being deprecated so may cease to work for new resources in the future and may be removed from the provider.
186186

0 commit comments

Comments
 (0)