-
Notifications
You must be signed in to change notification settings - Fork 4.7k
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
EventGrid Subscriptions resource invalid topic name error #3305
Comments
Run into the same issue, any news/ workarounds? |
Hi @wandrew26, no fix for this as far as we know - we ended up moving away from event grid for now as the solution changed. we did have a look at passing an arm template in to do it but decided against it: |
Started to develop a workaround with "local-exec" using azure cli. The following two warning came across:
Realized that the resource group in this case is an art from a topic type to subscribe and not a reference where to create the subscription resource.
With this setup i was able to create the subscription between Function App and EventGrid Topic Hope it helps! |
Great thanks @wandrew26 we will take a look into it ! |
@wandrew26 Use "scope" instead with the id of the eventgrid topic worked great! Thank you! |
@wandrew26 can I see example of how you're running output for systemkey in your external bash script? |
Do you have the example posted somewhere? |
fixes #3305 According by the [PR](Azure/azure-sdk-for-go@119eb84), topic_name has been changed to readonly field. So I remove this unnecessary field. --- PASS: TestAccAzureRMEventGridEventSubscription_advancedFilter (307.33s) --- PASS: TestAccAzureRMEventGridEventSubscription_filter (372.90s) --- PASS: TestAccAzureRMEventGridEventSubscription_requiresImport (383.96s) --- PASS: TestAccAzureRMEventGridEventSubscription_basic (401.60s) --- PASS: TestAccAzureRMEventGridEventSubscription_serviceBusQueueID (430.50s) --- PASS: TestAccAzureRMEventGridEventSubscription_serviceBusTopicID (522.11s) --- PASS: TestAccAzureRMEventGridEventSubscription_eventHubID (531.38s) --- PASS: TestAccAzureRMEventGridEventSubscription_update (647.02s) PASS
This has been released in version 2.21.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.21.0"
}
# ... other configuration ... |
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! |
Hello,
When using the new azurerm_eventgrid_event_subscription resource manager to associate the new subscription resource to the topic, it throws an error as below:
* azurerm_eventgrid_event_subscription.sub: Error creating/updating EventGrid Event Subscription "sub" (Scope "/subscriptions/xxx-xxx-xxx-xxx-xxx/resourceGroups/sub-rg"): eventgrid.EventSubscriptionsClient#CreateOrUpdate: Failure sending request: StatusCode=400 -- Original Error: Code="InvalidRequest" Message="Invalid topic name."
Code being applied is below:
resource "azurerm_eventgrid_topic" "topic" {
name = "${var.short_location[0]}${var.environment__name}topic"
location = "${var.location[0]}"
resource_group_name = "${azurerm_resource_group.rg.*.name[0]}"
tags = "${local.default_tags}"
resource "azurerm_eventgrid_event_subscription" "sub" {
name = "${var.short_location[0]}${var.environment__name}-sub"
scope = "${azurerm_resource_group.rg.*.id[0]}"
event_delivery_schema = "EventGridSchema"
topic_name = "${azurerm_eventgrid_topic.topic.name}"
webhook_endpoint {
url = "blank"
}
}
I have tried replacing the
topic_name = "${azurerm_eventgrid_topic.topic.name}"
withtopic_name = "${azurerm_eventgrid_topic.topic.id}"
to try using the id of the resource instead. I have also attempted hard coding the topic name, to associate the subscription to the topic but it keeps showing the same error.Any help would be much appreciated.
Thanks.
The text was updated successfully, but these errors were encountered: