Skip to content

Commit

Permalink
Removed validation from arm_function_app (#1872)
Browse files Browse the repository at this point in the history
* Removed validation from arm_function_app

* Removing the entry from the changelog

* Fixing the test
  • Loading branch information
JimPaine authored and tombuildsstuff committed Sep 5, 2018
1 parent 08ef305 commit 0de848e
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 9 deletions.
4 changes: 0 additions & 4 deletions azurerm/resource_arm_function_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -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": {
Expand Down
8 changes: 4 additions & 4 deletions azurerm/resource_arm_function_app_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) },
Expand All @@ -246,14 +246,14 @@ func TestAccAzureRMFunctionApp_updateVersion(t *testing.T) {
Config: preConfig,
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMFunctionAppExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "version", "beta"),
resource.TestCheckResourceAttr(resourceName, "version", "~1"),
),
},
{
Config: postConfig,
Check: resource.ComposeTestCheckFunc(
testCheckAzureRMFunctionAppExists(resourceName),
resource.TestCheckResourceAttr(resourceName, "version", "~1"),
resource.TestCheckResourceAttr(resourceName, "version", "~2"),
),
},
},
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/function_app.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down

0 comments on commit 0de848e

Please sign in to comment.