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

Event hub zone_redundant attribute - deprecated but can't remove (premium sku namespace) #26779

Closed
1 task done
AlexcFrench opened this issue Jul 25, 2024 · 8 comments
Closed
1 task done

Comments

@AlexcFrench
Copy link

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 comments along the lines of "+1", "me too" or "any updates", 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 and review the contribution guide to help.

Terraform Version

1.9.2

AzureRM Provider Version

3.113.0

Affected Resource(s)/Data Source(s)

azurerm_eventhub_namespace

Terraform Configuration Files

resource "azurerm_eventhub_namespace" "EventHub-Namespace-002" {
  name                = "eh1"
  location            = "uksouth"
  resource_group_name = "RG1
  sku                 = "Premium"
  zone_redundant      = true # deprecated in 3.113.0
}

Debug Output/Panic Output

│ Warning: Argument is deprecated
│
│   with azurerm_eventhub_namespace.EventHub-Namespace-002,
│   on EventHub-iBuy-002.tf line 8, in resource "azurerm_eventhub_namespace" "EventHub-Namespace-002":
│    8:   zone_redundant      = true # deprecated in 3.113.0
│
│ The `zone_redundant` property has been deprecated and will be removed in v4.0 of the provider.
│
│ (and one more similar warning elsewhere)
╵

Expected Behaviour

Be able to remove the 'zone_redundant' attribute (to clean up the deprecation warning) and let the premium sku determine the Az configuration.

(This appears to just be a logic error in how this setting is handled for the premium sku vs the deprecation mesage)

Actual Behaviour

Removing this attribute should not cause the event hub to rebuild. However, it has to be left and set to 'True' even though it is a computed attribute for Preimum event hubs and not required.

The documentation clearly states that it must be set to True but the deprecation warning infers it needs to be removed

Steps to Reproduce

Latest code - terraform apply will give the deprecation warning.

remove the zone_redundant value and it will want to force a rebuild even for a premium SKU

Important Factoids

Not a massive issue - just get an unwanted deprecation warning.

References

n/a

@saujanya-ikea
Copy link

Hi @tombuildsstuff

I have tried to remove this parameter from existing code, which leads to remove and re-create existing EH Namespace with no zone redundancy.

Reason for recreation EH Namespace -

zone_redundant is set to true in my code and default value for this parameter is false. However removing it forcing EH removal and recreation which should not happen.

Please have a look.

@saujanya-ikea
Copy link

Hi @stephybun,

Since v4.0 has been released today, and zone_redundant parameter is removed from azurerm_eventhub_namespace. Could you please guide us how to remove this parameter without dropping EventHub as it contains multiple messages in production which can't be removed.

@stephybun
Copy link
Member

Hey @saujanya-ikea

When you upgrade to 4.0 you will be able to remove the zone_redundant property from your config without it triggering a recreation of the resource.

@saujanya-ikea
Copy link

All looks good now. @AlexcFrench You can close this request I believe, issue fixed in the latest release. Thanks to @stephybun for replying and updating.

@AlexcFrench
Copy link
Author

Hi, agreed, this is resolved in the azurerm v4.00.0+ provider. Time to upgrade (again!) :-)

@KYannick
Copy link

KYannick commented Sep 2, 2024

@saujanya-ikea did you have to do anything special in preparation of the upgrade of the provider? When I attempt to apply with v4 of the provider I get the error

MergeNamespaceFailedWithImmutablePropertyUpdate: ZoneRedundant is an immutable property

Looking in the json object in azure, I can indeed see that property is still on the object (value true ). Any actions you had to take to make this work? I checked the release notes, nothing is there so I assume it is supposed to work without any manual actions.

@CliffHoogervorst
Copy link

We see the same issue as @KYannick after updating azurerm and removing zone_redundant from the code terraform tries to update ZoneRedundant setting and getting same error message

Copy link

github-actions bot commented Oct 5, 2024

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 Oct 5, 2024
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

5 participants