-
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
Terraform apply errors with 404 when creating multiple auth rules for event hubs #4893
Comments
This comment has been minimized.
This comment has been minimized.
@ravulachetan #4087 fixed this in the Notification Hubs resource, not in the EventHub resources - which is what this issue is (open) tracking |
Thanks @tombuildsstuff for the clarification. |
@tombuildsstuff We are also running into this issue. It seems to happen intermittently. Is there any current workaround for this? Error: eventhub.EventHubsClient#GetAuthorizationRule: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="NotFound" Message="The requested resource ListenSendSharedAccessKey does not exist"
on eventhubs.tf line 23, in resource "azurerm_eventhub_authorization_rule" "listener_accesskey":
23: resource azurerm_eventhub_authorization_rule listener_accesskey {
Error: eventhub.EventHubsClient#GetAuthorizationRule: Failure responding to request: StatusCode=404 -- Original Error: autorest/azure: Service returned an error. Status=404 Code="NotFound" Message="The requested resource SendSharedAccessKey does not exist"
on eventhubs.tf line 35, in resource "azurerm_eventhub_authorization_rule" "sender_accesskey":
35: resource azurerm_eventhub_authorization_rule sender_accesskey {
|
since there is no retry mechanism, I've added ugly 5min sleep in between rules that appear to work(I did see this error with lower time on occasion).
|
I've eventually hit this error again with sleep. Thats when I noticed that all the rules are being deployed at once. I've chained them using dependencies instead and so far didnt hit this again. |
Ultimately this'll be fixed via a lock when creating/updating/deleting EventHub (& Namespace) Auth Rules - as per #4087 - but in the interim it should be possible to use Terraform's parallelism feature to work around this (although clearly that's not ideal for speed reasons) |
@tombuildsstuff I've submitted a pull request to fix the issue here: Thanks |
Would this also affect azurerm_servicebus_queue_authorization_rule resources? We are seeing the same error when creating multiple of these. |
@jacksinclairaudley No, just event_hub. I'd open a separate issue for servicebus auth rules. |
This has been released in version 2.9.0 of the provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading. As an example: provider "azurerm" {
version = "~> 2.9.0"
}
# ... other configuration ... |
this still doesn't work in 2.10.0 |
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! |
Community Note
Terraform (and AzureRM Provider) Version
Terraform v0.12.15
provider.azurerm v1.36.0
Affected Resource(s)
azurerm_eventhub_authorization_rule
Terraform Configuration Files
Debug Output
https://gist.github.com/danieldekock-wintech/32e94d5f90def9372951bfef963aa1d5
Panic Output
None
Expected Behavior
Terraform apply should create all the authorization rules for the event hub
Actual Behavior
Terraform apply does not create all authorization rules and errors with a 404 that the authorization rules doesn't exists. e.g.
Steps to Reproduce
terraform apply
Important Factoids
N/A
References
A similar issue has been reported for resource "azurerm_notification_hub_authorization_rule"
#4087
The text was updated successfully, but these errors were encountered: