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

azurerm_eventgrid_event_subscription: Destination type of the event subscription is StorageQueue which doesn't support full URL #25965

Open
1 task done
doanduyhai opened this issue May 14, 2024 · 0 comments

Comments

@doanduyhai
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 "+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 and review the contribution guide to help.

Terraform Version

1.5.7

AzureRM Provider Version

3.103.1

Affected Resource(s)/Data Source(s)

azurerm_eventgrid_event_subscription

Terraform Configuration Files

resource "azurerm_eventgrid_event_subscription" "topic_subscriptions" {
  name  = "storage-queue-finter-in"
  scope = azurerm_eventgrid_domain_topic.domain_topic.id

  ...
  storage_queue_endpoint {
    storage_account_id = azurerm_storage_account.my_storage.id
    queue_name         = "testqueue"
    queue_message_time_to_live_in_seconds = 3600 
  }
  ...  
}

Debug Output/Panic Output

azurerm_role_assignment.event_grid_data_sender_role_assignment_on_event_hub_ids_for_automation_spn: Creation complete after 1m40s [id=....]
╷
│ Error: Provider produced inconsistent result after apply
│ 
│ When applying changes to
│ azurerm_role_assignment.storage_queue_data_contributor_role_assignment_on_storage_account_for_automation_spn,
│ provider "provider[\"registry.terraform.io/hashicorp/azurerm\"]" produced
│ an unexpected new value: Root resource was present, but now absent.
│ 
│ This is a bug in the provider, which should be reported in the provider's
│ own issue tracker.

Expected Behaviour

The role assignment succeeds

Actual Behaviour

The role assignment fails because the READ of event grid subscription for StorageQueue fails, which leads to an inconsisten state

When looking at Azure Portal, Activity Log menu, we found this error

image

In the source code, from the commit c47955c of @tombuildsstuff , this issue is already encountered

image

However, it looks like the error is not processed correctly so the issue is swallowed silently by Terraform and the root cause only appears in Azure Activity Log

Steps to Reproduce

No response

Important Factoids

No response

References

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants