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

r/azurerm_servicebus_namespace - Allowed setting messaging units capacity to 8 for Premium SKU #4630

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 2 additions & 2 deletions azurerm/resource_arm_servicebus_namespace.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ func resourceArmServiceBusNamespace() *schema.Resource {
Type: schema.TypeInt,
Optional: true,
Default: 0,
ValidateFunc: validate.IntInSlice([]int{0, 1, 2, 4}),
ValidateFunc: validate.IntInSlice([]int{0, 1, 2, 4, 8}),
},

"default_primary_connection_string": {
Expand Down Expand Up @@ -155,7 +155,7 @@ func resourceArmServiceBusNamespaceCreateUpdate(d *schema.ResourceData, meta int
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 or 4", sku)
return fmt.Errorf("Service Bus SKU %q only supports `capacity` of 1, 2, 4 or 8", sku)
}
parameters.Sku.Capacity = utils.Int32(int32(capacity.(int)))
}
Expand Down
2 changes: 1 addition & 1 deletion azurerm/resource_arm_servicebus_namespace_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ func TestAccAzureRMServiceBusNamespace_premiumCapacity(t *testing.T) {
Steps: []resource.TestStep{
{
Config: config,
ExpectError: regexp.MustCompile("Service Bus SKU \"Premium\" only supports `capacity` of 1, 2 or 4"),
ExpectError: regexp.MustCompile("Service Bus SKU \"Premium\" only supports `capacity` of 1, 2, 4 or 8"),
},
},
})
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/servicebus_namespace.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ The following arguments are supported:

* `sku` - (Required) Defines which tier to use. Options are basic, standard or premium.

* `capacity` - (Optional) Specifies the capacity. When `sku` is `Premium` can be `1`, `2` or `4`. When `sku` is `Basic` or `Standard` can be `0` only.
* `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.

* `zone_redundant` - (Optional) Whether or not this resource is zone redundant. `sku` needs to be `Premium`. Defaults to `false`.

Expand Down