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

Conversation

leewilson86
Copy link
Contributor

@leewilson86 leewilson86 commented Oct 16, 2019

Allowed the azurerm_servicebus_namespace resource to support the capacity of 8 for the number of messaging units to be set when using the Premium SKU.

Microsoft documentation and the Azure Portal show the ability to set the capacity of the messaging units to 8:

Screenshot 2019-10-16 at 09 23 14

https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-premium-messaging

Service Bus Premium Messaging provides resource isolation at the CPU and memory level so that each customer workload runs in isolation. This resource container is called a messaging unit. Each premium namespace is allocated at least one messaging unit. You can purchase 1, 2, 4 or 8 messaging units for each Service Bus Premium namespace. A single workload or entity can span multiple messaging units and the number of messaging units can be changed at will. The result is predictable and repeatable performance for your Service Bus-based solution.

But the provider fails with the following error when you attempt to set capacity = 8:

Error: module.mod_sbp.module.serviceBus.azurerm_servicebus_namespace.servicebusNameSpace: expected "capacity" to be one of [0 1 2 4], got 8

This change solves this limitation.

Example plan:

 + azurerm_servicebus_namespace.servicebusNameSpace
      id:                                      <computed>
      capacity:                                "8"
      default_primary_connection_string:       <computed>
      default_primary_key:                     <computed>
      default_secondary_connection_string:     <computed>
      default_secondary_key:                   <computed>
      location:                                "northeurope"
      name:                                    "testenv01sbp"
      resource_group_name:                     "testenv01sbp-rg"
      sku:                                     "premium"
      tags.%:                                  <computed>

Apply output:

azurerm_resource_group.resourceGroup: Creating...
  location:          "" => "northeurope"
  name:              "" => "testenv01sbp-rg"
  tags.%:            "" => "5"
  tags.client:       "" => "tst"
  tags.dc:           "" => "en1"
  tags.environment:  "" => "env01"
  tags.resource_cat: "" => "messaging"
  tags.tier:         "" => "messaging"
azurerm_resource_group.resourceGroup: Creation complete after 1s (ID: /subscriptions/00000000-0000-0000-0000-...000000/resourceGroups/testenv01sbp-rg)
azurerm_servicebus_namespace.servicebusNameSpace: Creating...
  capacity:                            "" => "8"
  default_primary_connection_string:   "<sensitive>" => "<sensitive>"
  default_primary_key:                 "<sensitive>" => "<sensitive>"
  default_secondary_connection_string: "<sensitive>" => "<sensitive>"
  default_secondary_key:               "<sensitive>" => "<sensitive>"
  location:                            "" => "northeurope"
  name:                                "" => "testenv01sbp"
  resource_group_name:                 "" => "testenv01sbp-rg"
  sku:                                 "" => "premium"
  tags.%:                              "" => "<computed>"
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (10s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (20s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (30s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (40s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (50s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (1m0s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (1m10s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (1m20s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (1m30s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (1m40s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (1m50s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Still creating... (2m0s elapsed)
azurerm_servicebus_namespace.servicebusNameSpace: Creation complete after 2m6s (ID: /subscriptions/00000000-0000-0000-0000-...ft.ServiceBus/namespaces/testenv01sbp)
Apply complete! Resources: 2 added, 0 changed, 0 destroyed.

…aging units to be set for the service bus namespace when using the Premium SKU
Copy link
Collaborator

@katbyte katbyte left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for updating the resource @leewilson86! LGTM

@katbyte katbyte merged commit 659d4e4 into hashicorp:master Oct 17, 2019
katbyte added a commit that referenced this pull request Oct 17, 2019
@leewilson86 leewilson86 deleted the ServiceBusNamespace/PremiumCapacity8 branch October 17, 2019 12:14
@ghost
Copy link

ghost commented Oct 29, 2019

This has been released in version 1.36.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example:

provider "azurerm" {
    version = "~> 1.36.0"
}
# ... other configuration ...

@ghost
Copy link

ghost commented Nov 16, 2019

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues.

If you feel this issue should be reopened, we encourage creating a new issue linking back to this one for added context. If you feel I made an error 🤖 🙉 , please reach out to my human friends 👉 hashibot-feedback@hashicorp.com. Thanks!

@ghost ghost locked and limited conversation to collaborators Nov 16, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants