hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.59k stars 4.63k forks source link

azurerm_eventhub_namespace: Cannot set auto_inflate_enabled to false #26476

Open The-Real-Justin opened 4 months ago

The-Real-Justin commented 4 months ago

Is there an existing issue for this?

Community Note

Terraform Version

1.8.5

AzureRM Provider Version

3.103.1

Affected Resource(s)/Data Source(s)

azurerm_eventhub_namespace

Terraform Configuration Files

resource "azurerm_eventhub_namespace" "dar_ehn" {
  name                     = "ehns-${var.environment}-${var.country}-${var.region}-${var.product}"
  location                 = data.azurerm_resource_group.data_rg.location
  resource_group_name      = data.azurerm_resource_group.data_rg.name
  sku                      = var.event_hub_namespace_sku
  capacity                 = var.event_hub_namespace_capacity
  auto_inflate_enabled     = false
  maximum_throughput_units = 0
}

OR

resource "azurerm_eventhub_namespace" "dar_ehn" {
  name                     = "ehns-${var.environment}-${var.country}-${var.region}-${var.product}"
  location                 = data.azurerm_resource_group.data_rg.location
  resource_group_name      = data.azurerm_resource_group.data_rg.name
  sku                      = var.event_hub_namespace_sku
  capacity                 = var.event_hub_namespace_capacity
  auto_inflate_enabled     = false
}

Both configurations result in same error

Debug Output/Panic Output

Namespace Name: "ehns-alpha-us-east-367"): unexpected status 400 (400 Bad Request) with error: CannotSetMaxThroughputValue: Maximum throughput units cannot be greater than 0 if auto inflate is false. 
  with azurerm_eventhub_namespace.dar_ehn, 
  on 80-event_hub.tf line 1, in resource "azurerm_eventhub_namespace" "dar_ehn": 
   1: resource "azurerm_eventhub_namespace" "dar_ehn" {

Expected Behaviour

No errors, auto inflate set to false

Actual Behaviour

400 response

Steps to Reproduce

No response

Important Factoids

No response

References

No response

Chambras commented 3 months ago

@The-Real-Justin I will try to take a look.

The-Real-Justin commented 3 months ago

Thanks!