Open l33tCod-er opened 6 months ago
Thanks @l33tCod-er for raising this issue, the api doesn't allow the maximum_throughput_units
be set to a value that's greater than 0
. You should get the error in your first step.
First run, create resource with auto_inflate disabled and max_throughput_units set to a static value
resource "azurerm_eventhub_namespace" "eventhub_namespace" {
name = "<name>"
location = "<location>"
resource_group_name = "<resource_group>"
sku = "<sku>"
capacity = "<capacity>"
auto_inflate_enabled = false
maximum_throughput_units = 5
}
Hi @xiaxyi! Thanks for your answer! I made a mistake describing the issue.
On first run, it should be: auto_inflate_enabled = true maximum_thrughput_units = 5
And the second run tried to disable again through: auto_inflate_enabled = false maximum_thrughput_units = 0
That way, it fails on second run with the 400 error as stated.
I had the same problem. I wonder if it was a change on the azure side because I had numerous successful builds where the setting was false (we weren't setting maximum_throughput_units but that had a value of 3 on our namespace) As a workaround, so I could still apply my terraform I went to the portal, manually set auto-inflate to true and saved, then set auto-inflate to false.
Having the same issue. It is impossible to "downgrade" an eventhub to no inflate after it has been set to auto inflate. Getting a plan of
# azurerm_eventhub_namespace.hub will be updated in-place
~ resource "azurerm_eventhub_namespace" "hub" {
~ auto_inflate_enabled = true -> false
- maximum_throughput_units = 4 -> 0
}
and a plan execution error of
unexpected status 400 (400 Bad Request) with error: CannotSetMaxThroughputValue: Maximum throughput units cannot be greater than 0 if auto inflate is false.
Is there an existing issue for this?
Community Note
Terraform Version
1.7.2
AzureRM Provider Version
3.92.0
Affected Resource(s)/Data Source(s)
azurerm_eventhub_namespace
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
Auto inflate is disabled
Actual Behaviour
Unexpected status 400 with error: CannotSetMaxThroughputValue: Maximum throughput units cannot be greater than 0 if auto inflate is false.
Steps to Reproduce
Note: Leaving maximum_throughput_units to its original value does not help
Important Factoids
No response
References
No response