-
Notifications
You must be signed in to change notification settings - Fork 4.6k
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
Http 400 code BadRequest error while trying to update tags on azurerm_notification_hub #23043
Comments
Hi @rem-aj thanks for opening this issue. Could you please provide the value of
Result: |
Hi @sinbai here's the value of the namespace type. "NotificationHub" By the way this value was already there, it wasn't added as part of this change, this change was simply a tag update. I provided the error logs earlier, are you looking for something different? Thanks! |
Hi @rem-aj thanks for the reply. Per the provided error logs, It seems that the value of |
Hi @sinbai if you observe the comments in the code, the namespace attribute is actually set to be ignored using lifecycle flag due to the github issues mentioned there which I will post again below. These issues have not been resolved, so by using ignore lifecycle we are able to workaround those specific issues. #14541 andAzure/azure-rest-api-specs#17277 |
Is there an existing issue for this?
Community Note
Terraform Version
1.0.8
AzureRM Provider Version
3.39.0
Affected Resource(s)/Data Source(s)
azurerm_notification_hub_namespace
Terraform Configuration Files
Debug Output/Panic Output
Expected Behaviour
The code change was one line invoking a terraform module to add a new set of tags to to common_tags variable
common_tags = merge(var.common_tags, local.project_tags_essentials)
All should have happened is that the 2 extra value tags should have been merged with common_tags variable and the notification would then contain a couple of extra tags.
Actual Behaviour
module.namespacehub.azurerm_notification_hub_namespace.hub_ns: Modifying...
╷
│ Error: creating/updating Namespace (Subscription: "XXXXXXXX"
│ Resource Group Name: "UE2pscDcommon"
│ Namespace Name: "ue2psc-dnotif-hub-ns"): namespaces.NamespacesClient#CreateOrUpdate: Failure responding to request: StatusCode=400 -- Original Error: autorest/azure: Service returned an error. Status=400 Code="BadRequest" Message="The JSON value could not be converted to System.Nullable`1[Microsoft.NotificationHubs.Contracts.Arm.NamespaceType]. Path: $.properties.namespaceType | LineNumber: 0 | BytePositionInLine: 69."
│
│ with module.namespacehub.azurerm_notification_hub_namespace.hub_ns,
│ on ../modules/namespace_hub/main.tf line 1, in resource "azurerm_notification_hub_namespace" "hub_ns":
│ 1: resource "azurerm_notification_hub_namespace" "hub_ns" {
│
Steps to Reproduce
Create a notification hub with a set of tags, try to append extra tags to those existing tags.
Important Factoids
No response
References
No response
The text was updated successfully, but these errors were encountered: