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

Changing sku azurerm_servicebus_namespace from Basic to Standard (and the other way around) should not cause recreation. #16463

Closed
1 task done
w0ut0 opened this issue Apr 20, 2022 · 4 comments

Comments

@w0ut0
Copy link

w0ut0 commented Apr 20, 2022

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

1.0.9

AzureRM Provider Version

2.99.0

Affected Resource(s)/Data Source(s)

azurerm_servicebus_namespace

Terraform Configuration Files

provider "azurerm" {
  features {}
}

resource "azurerm_resource_group" "example" {
  name     = "terraform-servicebus"
  location = "West Europe"
}

resource "azurerm_servicebus_namespace" "example" {
  name                = "tfex-servicebus-namespace"
  location            = azurerm_resource_group.example.location
  resource_group_name = azurerm_resource_group.example.name
  sku                 = "Basic"

  tags = {
    source = "terraform"
  }
}

Debug Output/Panic Output

# module.servicebus.azurerm_servicebus_namespace.sb must be replaced
-/+ resource "azurerm_servicebus_namespace" "example" {
      ~ default_primary_connection_string   = (sensitive value)
      ~ default_primary_key                 = (sensitive value)
      ~ default_secondary_connection_string = (sensitive value)
      ~ default_secondary_key               = (sensitive value)
      ~ id                                  = "/subscriptions/xxxx/resourceGroups/xxxx/providers/Microsoft.ServiceBus/namespaces/tfex-servicebus-namespace" -> (known after apply)
        name                                = "devtfex-servicebus-namespace"
      ~ sku                                 = "Basic" -> "Standard" # forces replacement
      - tags                                = {} -> null
      - zone_redundant                      = false -> null
        # (3 unchanged attributes hidden)
    }

Expected Behaviour

Switching between Basic and Standard should not require a recreation (therefor losing all queues, messages,...). Confirmed to work in the portal.

Actual Behaviour

Terraform will recreate the servicebus, therefor losing all (externally created) queues and messages.

Steps to Reproduce

terraform apply

A workaround is changing the SKU in the portal before running terrafrom apply.

Important Factoids

No response

References

No response

@w0ut0 w0ut0 added the bug label Apr 20, 2022
@github-actions github-actions bot removed the bug label Apr 20, 2022
@xiaxyi
Copy link
Contributor

xiaxyi commented Apr 22, 2022

@w0ut0 Checked the api behavior and find out the sku can be updated from basic to standard. Need to have a future check from TF side. will update accordingly

@jackofallops
Copy link
Member

Closed by #16523.

@github-actions
Copy link

This functionality has been released in v3.11.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.

For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!

@github-actions
Copy link

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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jul 24, 2022
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

7 participants