Closed hmrc87 closed 3 years ago
It was as simple as setting the scope to the iothub.id! scope = azurerm_iothub.iothub.id
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 š hashibot-feedback@hashicorp.com. Thanks!
Hi, before we were using the following command as a nullressource in order to create the subscription we need
az eventgrid event-subscription create --name $eventGridSubscriptionName --source-resource-id $iotHubResourceId - -endpoint-type servicebusqueue --endpoint $serviceBusQueueId --max-delivery-attempts 10 --event-ttl 120 --included-event-types Microsoft.Devices.DeviceConnected Microsoft.Devices.DeviceDisconnected
I thought this would translate to
`resource "azurerm_eventgrid_event_subscription" "eventgrid-subscription" { name = local.eventgrid_subscription_name scope = azurerm_resource_group.devcon-rg.id service_bus_queue_endpoint_id = azurerm_servicebus_queue.infra-sb-queue.id retry_policy { max_delivery_attempts = 10 event_time_to_live = 120 } included_event_types = [ "Microsoft.Devices.DeviceConnected", "Microsoft.Devices.DeviceDisconnected", "Microsoft.Devices.DeviceCreated" ]
}`
However it does not! How can I specificy the IoTHub Ressource with this provider? With the CLI command it was --source-resource-id
I can specify the Topic Type as Azure IOTHUB in the Portal too