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

EventHub change partition count ends with error #2049

Closed
ghost opened this issue Oct 10, 2018 · 2 comments
Closed

EventHub change partition count ends with error #2049

ghost opened this issue Oct 10, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Oct 10, 2018

This issue was originally opened by @KenticoMartinS as hashicorp/terraform#19029. It was migrated here as a result of the provider split. The original body of the issue is below.


Terraform Version

v0.11.8

Terraform Configuration Files

resource "azurerm_resource_group" "test" {
  name     = "resourceGroup1"
  location = "West US"
}

resource "azurerm_eventhub_namespace" "test" {
  name                = "acceptanceTestEventHubNamespace"
  location            = "${azurerm_resource_group.test.location}"
  resource_group_name = "${azurerm_resource_group.test.name}"
  sku                 = "Standard"
  capacity            = 1
}

resource "azurerm_eventhub" "test" {
  name                = "acceptanceTestEventHub"
  namespace_name      = "${azurerm_eventhub_namespace.test.name}"
  resource_group_name = "${azurerm_resource_group.test.name}"
  partition_count     = 4
  message_retention   = 1
}

Debug Output

Crash Output

Terraform will perform the following actions:

  ~ azurerm_eventhub.default
      partition_count: "4" => "12"

Error: Error applying plan:
1 error(s) occurred:

* azurerm_eventhub.default: eventhub.EventHubsClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="SubCode=40000. PartitionCount cannot be changed for EventHub. TrackingId:a5cfc1c8-ebe6-402c-bf4c-86e0475cbc7b_M0SN1_M0SN1_G12, SystemTracker:acceptanceTestEventHubNamespace.servicebus.windows.acceptanceTestEventHub, Timestamp:10/9/2018 11:26:03 AM CorrelationId: 6a34bd16-96a0-44c0-b981-59e3cf83b5bf"

Expected Behavior

According to the documentation/FAQ it is not possible to change the partition count of existing event hub. Terraform should re-create the Event Hub in order to change the partition count.

Actual Behavior

Terraform exited with an error.

Steps to Reproduce

  1. terraform init
  2. terraform apply
  3. Modify partition count in event hub resource difinition
  4. terraform apply

Additional Context

References

@tombuildsstuff
Copy link
Contributor

hey @KenticoMartinS

Thanks for opening this issue :)

Just to add some notes/context here as I've tagged this "good first issue" - given it's not possible to change this value we should be able to make the partition_count field ForceNew: true (which means that when the value of partition_count changes it'll require that Terraform destroys & creates a new Event Hub).

Thanks!

@ghost
Copy link
Author

ghost commented Mar 5, 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 Mar 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant