Open rafaelpadovezi opened 1 day ago
I was removing the event handler and got to see this behavior:
# azurerm_web_pubsub_hub.web_pubsub_hub_orderhub will be updated in-place
~ resource "azurerm_web_pubsub_hub" "myhub" {
id = "/subscriptions/XXX/resourceGroups/pubsub-cross-qa-rg/providers/Microsoft.SignalRService/webPubSub/YYY/ZZZ"
name = "myhub"
# (2 unchanged attributes hidden)
- event_handler {
- system_events = [
- "connect",
- "connected",
- "disconnected",
] -> null
- url_template = "https://example/v1/{event}/" -> null
- user_event_pattern = "*" -> null
- auth {
- managed_identity_id = "api://AzureADTokenExchange" -> null
}
}
}
It looks like it's about the validation. Maybe the underlying client works as expected
Is there an existing issue for this?
Community Note
Description
When configuring an event handler for Azure Web PubSub using the portal I can specify the issued token audience using a value like
api://AzureADTokenExchange
. This is accepted and the pubsub service is able to generate Entra Id tokens with this audience.It is also possible to accomplish the same results using the az cli
But when using terraform I only have the option
auth.managed_identity_id
. Trying to use this attribute returns an error:The error:
New or Affected Resource(s)/Data Source(s)
azurerm_web_pubsub_hub
Potential Terraform Configuration
References
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/web_pubsub_hub https://learn.microsoft.com/en-us/cli/azure/webpubsub/hub?view=azure-cli-latest#az-webpubsub-hub-create-optional-parameters