From a58c9470f685c944db961b47f011c446459b4bd5 Mon Sep 17 00:00:00 2001 From: Lee Wilson <264361+leewilson86@users.noreply.github.com> Date: Wed, 27 Jan 2021 17:41:39 +0000 Subject: [PATCH] Service bus namesapce capacity of 16 is now supported --- .../services/servicebus/servicebus_namespace_resource.go | 4 ++-- .../services/servicebus/servicebus_namespace_resource_test.go | 2 +- website/docs/r/servicebus_namespace.html.markdown | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/azurerm/internal/services/servicebus/servicebus_namespace_resource.go b/azurerm/internal/services/servicebus/servicebus_namespace_resource.go index d73788c5a020..c9e7a1f1d09a 100644 --- a/azurerm/internal/services/servicebus/servicebus_namespace_resource.go +++ b/azurerm/internal/services/servicebus/servicebus_namespace_resource.go @@ -78,7 +78,7 @@ func resourceServiceBusNamespace() *schema.Resource { Type: schema.TypeInt, Optional: true, Default: 0, - ValidateFunc: validation.IntInSlice([]int{0, 1, 2, 4, 8}), + ValidateFunc: validation.IntInSlice([]int{0, 1, 2, 4, 8, 16}), }, "default_primary_connection_string": { @@ -159,7 +159,7 @@ func resourceServiceBusNamespaceCreateUpdate(d *schema.ResourceData, meta interf return fmt.Errorf("Service Bus SKU %q only supports `capacity` of 0", sku) } if strings.EqualFold(sku, string(servicebus.Premium)) && capacity.(int) == 0 { - return fmt.Errorf("Service Bus SKU %q only supports `capacity` of 1, 2, 4 or 8", sku) + return fmt.Errorf("Service Bus SKU %q only supports `capacity` of 1, 2, 4, 8 or 16", sku) } parameters.Sku.Capacity = utils.Int32(int32(capacity.(int))) } diff --git a/azurerm/internal/services/servicebus/servicebus_namespace_resource_test.go b/azurerm/internal/services/servicebus/servicebus_namespace_resource_test.go index bb484f038f34..61705505cbda 100644 --- a/azurerm/internal/services/servicebus/servicebus_namespace_resource_test.go +++ b/azurerm/internal/services/servicebus/servicebus_namespace_resource_test.go @@ -120,7 +120,7 @@ func TestAccAzureRMServiceBusNamespace_premiumCapacity(t *testing.T) { data.ResourceTest(t, r, []resource.TestStep{ { Config: r.premiumCapacity(data), - ExpectError: regexp.MustCompile("Service Bus SKU \"Premium\" only supports `capacity` of 1, 2, 4 or 8"), + ExpectError: regexp.MustCompile("Service Bus SKU \"Premium\" only supports `capacity` of 1, 2, 4, 8 or 16"), }, }) } diff --git a/website/docs/r/servicebus_namespace.html.markdown b/website/docs/r/servicebus_namespace.html.markdown index 5e7f6d7704ff..cf295b6cc207 100644 --- a/website/docs/r/servicebus_namespace.html.markdown +++ b/website/docs/r/servicebus_namespace.html.markdown @@ -48,7 +48,7 @@ The following arguments are supported: * `sku` - (Required) Defines which tier to use. Options are basic, standard or premium. Changing this forces a new resource to be created. -* `capacity` - (Optional) Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4` or `8`. When `sku` is `Basic` or `Standard`, capacity can be `0` only. +* `capacity` - (Optional) Specifies the capacity. When `sku` is `Premium`, capacity can be `1`, `2`, `4`, `8` or `16`. When `sku` is `Basic` or `Standard`, capacity can be `0` only. * `zone_redundant` - (Optional) Whether or not this resource is zone redundant. `sku` needs to be `Premium`. Defaults to `false`.