Skip to content

Commit

Permalink
azurerm_netapp_pool - update the validation of size_in_tb (#22943)
Browse files Browse the repository at this point in the history
* azurerm_netapp_pool - update the validation of size_in_tb

* update code

* update code
  • Loading branch information
neil-yechenwei committed Aug 17, 2023
1 parent fe5fee8 commit 66f4bc9
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion internal/services/netapp/netapp_pool_resource.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func resourceNetAppPool() *pluginsdk.Resource {
"size_in_tb": {
Type: pluginsdk.TypeInt,
Required: true,
ValidateFunc: validation.IntBetween(4, 500),
ValidateFunc: validation.IntBetween(2, 500),
},

"qos_type": {
Expand Down
4 changes: 2 additions & 2 deletions internal/services/netapp/netapp_pool_resource_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ func TestAccNetAppPool_update(t *testing.T) {
Config: r.basic(data),
Check: acceptance.ComposeTestCheckFunc(
check.That(data.ResourceName).ExistsInAzure(r),
check.That(data.ResourceName).Key("size_in_tb").HasValue("4"),
check.That(data.ResourceName).Key("size_in_tb").HasValue("2"),
check.That(data.ResourceName).Key("tags.%").HasValue("1"),
check.That(data.ResourceName).Key("qos_type").HasValue("Auto"),
),
Expand Down Expand Up @@ -147,7 +147,7 @@ resource "azurerm_netapp_pool" "test" {
location = azurerm_resource_group.test.location
resource_group_name = azurerm_resource_group.test.name
service_level = "Standard"
size_in_tb = 4
size_in_tb = 2
tags = {
"CreatedOnDate" = "2022-07-08T23:50:21Z",
Expand Down
4 changes: 3 additions & 1 deletion website/docs/r/netapp_pool.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,9 @@ The following arguments are supported:

* `service_level` - (Required) The service level of the file system. Valid values include `Premium`, `Standard`, or `Ultra`. Changing this forces a new resource to be created.

* `size_in_tb` - (Required) Provisioned size of the pool in TB. Value must be between `4` and `500`.
* `size_in_tb` - (Required) Provisioned size of the pool in TB. Value must be between `2` and `500`.

~> **NOTE** `2` TB capacity pool sizing is currently in preview. You can only take advantage of the `2` TB minimum if all the volumes in the capacity pool are using `Standard` network features. If any volume is using `Basic` network features, the minimum size is `4` TB. Please see the product [documentation](https://learn.microsoft.com/azure/azure-netapp-files/azure-netapp-files-set-up-capacity-pool) for more information.

* `qos_type` - (Optional) QoS Type of the pool. Valid values include `Auto` or `Manual`.

Expand Down

0 comments on commit 66f4bc9

Please sign in to comment.