-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
azurerm_servicebus_namespace
- support for the premium_messaging_partitions
property
#24676
Changes from 3 commits
422e28c
30bef91
8aab8d2
3517ace
1b8ed3a
316d2cd
339cfba
bfb465f
fa717a2
f6f7c6f
d58297b
5d58bd1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||
---|---|---|---|---|
|
@@ -139,6 +139,17 @@ func TestAccAzureRMServiceBusNamespace_premiumCapacity(t *testing.T) { | |||
}) | ||||
} | ||||
|
||||
func TestAccAzureRMServiceBusNamespace_premiumMessagingPartition(t *testing.T) { | ||||
data := acceptance.BuildTestData(t, "azurerm_servicebus_namespace", "test") | ||||
r := ServiceBusNamespaceResource{} | ||||
data.ResourceTest(t, r, []acceptance.TestStep{ | ||||
{ | ||||
Config: r.premiumMessagingPartition(data), | ||||
ExpectError: regexp.MustCompile("Service Bus SKU \"Premium\" only supports `premium_messaging_partitions` of 1, 2, 4"), | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This doesn't match the schema validation above? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The validation error is for the premium namespaces |
||||
}, | ||||
}) | ||||
} | ||||
|
||||
func TestAccAzureRMServiceBusNamespace_zoneRedundant(t *testing.T) { | ||||
data := acceptance.BuildTestData(t, "azurerm_servicebus_namespace", "test") | ||||
r := ServiceBusNamespaceResource{} | ||||
|
@@ -404,11 +415,12 @@ resource "azurerm_resource_group" "test" { | |||
} | ||||
|
||||
resource "azurerm_servicebus_namespace" "test" { | ||||
name = "acctestservicebusnamespace-%d" | ||||
location = azurerm_resource_group.test.location | ||||
resource_group_name = azurerm_resource_group.test.name | ||||
sku = "Premium" | ||||
capacity = 1 | ||||
name = "acctestservicebusnamespace-%d" | ||||
location = azurerm_resource_group.test.location | ||||
resource_group_name = azurerm_resource_group.test.name | ||||
sku = "Premium" | ||||
capacity = 4 | ||||
premium_messaging_partitions = 2 | ||||
} | ||||
`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) | ||||
} | ||||
|
@@ -455,6 +467,28 @@ resource "azurerm_servicebus_namespace" "test" { | |||
`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) | ||||
} | ||||
|
||||
func (ServiceBusNamespaceResource) premiumMessagingPartition(data acceptance.TestData) string { | ||||
return fmt.Sprintf(` | ||||
provider "azurerm" { | ||||
features {} | ||||
} | ||||
|
||||
resource "azurerm_resource_group" "test" { | ||||
name = "acctestRG-%d" | ||||
location = "%s" | ||||
} | ||||
|
||||
resource "azurerm_servicebus_namespace" "test" { | ||||
name = "acctestservicebusnamespace-%d" | ||||
location = azurerm_resource_group.test.location | ||||
resource_group_name = azurerm_resource_group.test.name | ||||
sku = "Premium" | ||||
capacity = 2 | ||||
premium_messaging_partitions = 0 | ||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This defaults to
Suggested change
|
||||
} | ||||
`, data.RandomInteger, data.Locations.Primary, data.RandomInteger) | ||||
} | ||||
|
||||
func (ServiceBusNamespaceResource) zoneRedundant(data acceptance.TestData) string { | ||||
return fmt.Sprintf(` | ||||
provider "azurerm" { | ||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -51,6 +51,8 @@ The following arguments are supported: | |||||
|
||||||
* `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. | ||||||
|
||||||
* `premium_messaging_partitions` - (Optional) Specifies the messaging partitions. When `sku` is `Premium`, messaging partitions can be `1`, `2`, `4`. When `sku` is `Basic` or `Standard`, messaging partitions can be `0` only. Changing this forces a new resource to be created. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
* `customer_managed_key` - (Optional) An `customer_managed_key` block as defined below. | ||||||
|
||||||
* `local_auth_enabled` - (Optional) Whether or not SAS authentication is enabled for the Service Bus namespace. Defaults to `true`. | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This doesn't match the schema validation above? The property defaults to
0
also.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is for the premium namespace, 0 is not a valid value for premium namespace.