Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

azurerm_windows_function_app node version validation strings. #15884

Merged
merged 2 commits into from
Mar 21, 2022
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions internal/services/appservice/helpers/function_app_schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -1061,6 +1061,7 @@ func linuxFunctionAppStackSchema() *pluginsdk.Schema {
ValidateFunc: validation.StringInSlice([]string{
"12",
"14",
"16", // preview LTS Support
}, false),
ExactlyOneOf: []string{
"site_config.0.application_stack.0.dotnet_version",
Expand Down Expand Up @@ -1284,8 +1285,9 @@ func windowsFunctionAppStackSchema() *pluginsdk.Schema {
Type: pluginsdk.TypeString,
Optional: true,
ValidateFunc: validation.StringInSlice([]string{
"12",
"14",
"~12",
"~14",
"~16",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to update the docs too?

}, false),
ExactlyOneOf: []string{
"site_config.0.application_stack.0.dotnet_version",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -671,7 +671,7 @@ func TestAccLinuxFunctionApp_appStackNode(t *testing.T) {

data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.appStackNode(data, SkuBasicPlan, "14"),
Config: r.appStackNode(data, SkuConsumptionPlan, "14"),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"),
Expand All @@ -694,6 +694,14 @@ func TestAccLinuxFunctionApp_appStackNodeUpdate(t *testing.T) {
),
},
data.ImportStep(),
{
Config: r.appStackNode(data, SkuBasicPlan, "16"),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("kind").HasValue("functionapp,linux"),
),
},
data.ImportStep(),
{
Config: r.appStackNode(data, SkuBasicPlan, "14"),
Check: acceptance.ComposeTestCheckFunc(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -673,7 +673,7 @@ func TestAccWindowsFunctionApp_appStackNode(t *testing.T) {

data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.appStackNode(data, SkuBasicPlan, "14"),
Config: r.appStackNode(data, SkuConsumptionPlan, "~14"),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("kind").HasValue("functionapp"),
Expand All @@ -689,15 +689,23 @@ func TestAccWindowsFunctionApp_appStackNodeUpdate(t *testing.T) {

data.ResourceTest(t, r, []acceptance.TestStep{
{
Config: r.appStackNode(data, SkuBasicPlan, "12"),
Config: r.appStackNode(data, SkuBasicPlan, "~12"),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("kind").HasValue("functionapp"),
),
},
data.ImportStep(),
{
Config: r.appStackNode(data, SkuBasicPlan, "14"),
Config: r.appStackNode(data, SkuBasicPlan, "~16"),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("kind").HasValue("functionapp"),
),
},
data.ImportStep(),
{
Config: r.appStackNode(data, SkuBasicPlan, "~14"),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("kind").HasValue("functionapp"),
Expand Down