From 315d123111b29d709671b89a6633c7a59487ba28 Mon Sep 17 00:00:00 2001 From: Jim Paine Date: Wed, 5 Sep 2018 11:45:38 +0100 Subject: [PATCH 1/3] Removed validation from arm_function_app --- CHANGELOG.md | 1 + azurerm/resource_arm_function_app.go | 4 ---- azurerm/resource_arm_function_app_test.go | 6 +++--- website/docs/r/function_app.html.markdown | 2 +- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3f482af63beb..17ad83d6cc7b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,6 +14,7 @@ IMPROVEMENTS: * `azurerm_storage_container` - support for import [GH-1816] * `azurerm_storage_queue` - support for import [GH-1816] * `azurerm_storage_table` - support for import [GH-1816] +* `azurerm_function_app` - support for specific versions [GH-1731] BUG FIXES: diff --git a/azurerm/resource_arm_function_app.go b/azurerm/resource_arm_function_app.go index 9941e1ca8a3c..071ae1084297 100644 --- a/azurerm/resource_arm_function_app.go +++ b/azurerm/resource_arm_function_app.go @@ -52,10 +52,6 @@ func resourceArmFunctionApp() *schema.Resource { Type: schema.TypeString, Optional: true, Default: "~1", - ValidateFunc: validation.StringInSlice([]string{ - "~1", - "beta", - }, false), }, "storage_connection_string": { diff --git a/azurerm/resource_arm_function_app_test.go b/azurerm/resource_arm_function_app_test.go index 09b26c55c65d..a936429ef4ff 100644 --- a/azurerm/resource_arm_function_app_test.go +++ b/azurerm/resource_arm_function_app_test.go @@ -234,8 +234,8 @@ func TestAccAzureRMFunctionApp_updateVersion(t *testing.T) { resourceName := "azurerm_function_app.test" ri := acctest.RandInt() rs := strings.ToLower(acctest.RandString(11)) - preConfig := testAccAzureRMFunctionApp_version(ri, rs, testLocation(), "beta") - postConfig := testAccAzureRMFunctionApp_version(ri, rs, testLocation(), "~1") + preConfig := testAccAzureRMFunctionApp_version(ri, rs, testLocation(), "~1") + postConfig := testAccAzureRMFunctionApp_version(ri, rs, testLocation(), "~2") resource.Test(t, resource.TestCase{ PreCheck: func() { testAccPreCheck(t) }, @@ -246,7 +246,7 @@ func TestAccAzureRMFunctionApp_updateVersion(t *testing.T) { Config: preConfig, Check: resource.ComposeTestCheckFunc( testCheckAzureRMFunctionAppExists(resourceName), - resource.TestCheckResourceAttr(resourceName, "version", "beta"), + resource.TestCheckResourceAttr(resourceName, "version", "~1"), ), }, { diff --git a/website/docs/r/function_app.html.markdown b/website/docs/r/function_app.html.markdown index a370386b0f39..ddfadae55db3 100644 --- a/website/docs/r/function_app.html.markdown +++ b/website/docs/r/function_app.html.markdown @@ -107,7 +107,7 @@ The following arguments are supported: * `https_only` - (Optional) Can the Function App only be accessed via HTTPS? Defaults to `false`. -* `version` - (Optional) The runtime version associated with the Function App. Possible values are `~1` and `beta`. Defaults to `~1`. +* `version` - (Optional) The runtime version associated with the Function App. Defaults to `~1`. * `site_config` - (Optional) A `site_config` object as defined below. From 823053a6cd7800e75ba7852a1917442dd1b4bcf8 Mon Sep 17 00:00:00 2001 From: Tom Harvey Date: Wed, 5 Sep 2018 18:07:50 +0200 Subject: [PATCH 2/3] Removing the entry from the changelog --- CHANGELOG.md | 1 - 1 file changed, 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 17ad83d6cc7b..3f482af63beb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,7 +14,6 @@ IMPROVEMENTS: * `azurerm_storage_container` - support for import [GH-1816] * `azurerm_storage_queue` - support for import [GH-1816] * `azurerm_storage_table` - support for import [GH-1816] -* `azurerm_function_app` - support for specific versions [GH-1731] BUG FIXES: From abbbd8efe9714cbd585a805fb69bf71f5bd4f5c8 Mon Sep 17 00:00:00 2001 From: Tom Harvey Date: Wed, 5 Sep 2018 18:16:25 +0200 Subject: [PATCH 3/3] Fixing the test --- azurerm/resource_arm_function_app_test.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azurerm/resource_arm_function_app_test.go b/azurerm/resource_arm_function_app_test.go index a936429ef4ff..640304a7dcf7 100644 --- a/azurerm/resource_arm_function_app_test.go +++ b/azurerm/resource_arm_function_app_test.go @@ -253,7 +253,7 @@ func TestAccAzureRMFunctionApp_updateVersion(t *testing.T) { Config: postConfig, Check: resource.ComposeTestCheckFunc( testCheckAzureRMFunctionAppExists(resourceName), - resource.TestCheckResourceAttr(resourceName, "version", "~1"), + resource.TestCheckResourceAttr(resourceName, "version", "~2"), ), }, },