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

Cannot set maximum_throughput_units when auto_inflate_enabled is false #2083

Closed
KenticoMartinS opened this issue Oct 15, 2018 · 4 comments · Fixed by #2124
Closed

Cannot set maximum_throughput_units when auto_inflate_enabled is false #2083

KenticoMartinS opened this issue Oct 15, 2018 · 4 comments · Fixed by #2124
Milestone

Comments

@KenticoMartinS
Copy link

Hi,
we are running Terraform with Azure provider module:

Terraform v0.11.8
+ provider.azurerm v1.16.0

We have a general module containing Event Hub Namespace resource

resource "azurerm_eventhub_namespace" "default" {
  name                     = "${var.event_hub_namespace_name}"
  location                 = "${var.location}"
  resource_group_name      = "${var.resource_group_name}"
  auto_inflate_enabled     = "${var.autoscaling["enabled"]}"
  maximum_throughput_units = "${var.autoscaling["max_units"]}"

  sku      = "${var.sku}"
  capacity = "${var.capacity}"
}

From the module, we are trying to set auto_inflate_enabled and maximum_throughput_units parameters. The maximum_throughput_units parameter is dependent on auto_inflate_enabled parameters. It means, we can set maximum_throughput_units only when auto_inflate_enabled is enabled.

Is it possible to use one azurerm_eventhub_namespace resource for the following two scenarios?

  1. auto_inflate_enabled is disabled and we don't care about maximum_throughput_units
  2. auto_inflate_enabled is enabled and maximum_throughput_units is set to e.g. 20

We tried the following solutions:

  1. By default set auto_inflate_enabled to false and maximum_throughput_units to 0. Following error occured: Error: module.event_hub.azurerm_eventhub_namespace.default: expected maximum_throughput_units to be in the range (1 - 20), got 0
  2. By default set auto_inflate_enabled to false and maximum_throughput_units to 1. Following error occured: eventhub.NamespacesClient#CreateOrUpdate: Failure sending request: StatusCode=0 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="Cannot set MaximumThroughputUnits property if AutoInflate is not enabled.
@katbyte
Copy link
Collaborator

katbyte commented Oct 21, 2018

Hi @KenticoMartinS,

Sorry to hear your having this issue. Upon investigation it does seem 0 is a valid value for maximum_throughput_units, thus i've opened #2124 that should solve this for you 🙂

@katbyte katbyte added this to the 1.17.1 milestone Oct 21, 2018
@katbyte katbyte added the bug label Oct 21, 2018
@KenticoMartinS
Copy link
Author

Hi @katbyte,
thank you very much for looking into the issue. We are looking forward to the fix because currently, it is blocking us from creating a general module containing the Event Hub resource.

@katbyte katbyte changed the title Conditionally set dependent parameters Cannot set maximum_throughput_units when auto_inflate_enabled is false Oct 25, 2018
@tombuildsstuff
Copy link
Contributor

hi @KenticoMartinS

Just to let you know that this has been released as a part of v1.18 of the AzureRM Provider (the full changelog is available here). You can upgrade to this by specifying the version in the provider block (as shown below) and then running terraform init -upgrade

provider "azurerm" {
  version = "=1.18.0"
}

Thanks!

@ghost
Copy link

ghost commented Mar 6, 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 👉 [email protected]. Thanks!

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