-
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_topic enable_partitioning validation for Premium #26642
Comments
Thanks @jaredfholgate for raising this issue. As mentioned in the doc, partitioning for premium namespace can only be configured during the namespace creation, not during the topic creation. If the partitioning is not enabled for the parent namespace, may I know the reason of setting the partitioning to |
Hi. I agree it is there in the docs, but feedback from a Microsoft customer was that this is not enough. They had a production outage due to someone incorrectly setting this value and not reviewing the plan properly. I fully appreciate what I just said there and agree that this outage could easily have been avoided. However the ask is to see if we can improve the provider given there is no other error shown in this scenario and the apply is not idempotent when this variable is set like this. Re-running the plan after an apply with this setting will result in another destroy and recreate plan. |
@jaredfholgate That makes sense, thanks for bringing this up to us. Let me check the api behavior and see if we can add a validation. I will update the progress here. |
@jaredfholgate I added the validation for servicebus topic entity, now there will be error if user tries to set the |
Fantastic, thank you. |
Is there an existing issue for this?
Community Note
Description
If enable_partitioning is set to true and the referenced Service Bus namespace is Premium SKU, the validation should fail and it should not attempt to create or update the Topic.
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/servicebus_topic#enable_partitioning
The existing behaviour results in a plan to destroy and recreate the topic. The API then silently swallows the incorrect setting and the state still shows that enable_partitioning = false, even when desired state was true.
I appreciate this could is also an issue with how the API handles this, but it can be handled here in the provider to provide a better user experience.
New or Affected Resource(s)/Data Source(s)
azurerm_servicebus_topic
Potential Terraform Configuration
No change to existing configuration, just better validation.
References
None
The text was updated successfully, but these errors were encountered: