Closed ghost closed 2 years ago
Hi @asdaandrewhaigh - Thanks for opening this issue. The web_pubsub
resources are in a separate Resource Provider to the noted data source, so exposing their data there is something of an anti-pattern. Are you looking to reference the primary/secondary access_key from the azurerm_web_pubsub
resource for that string? If so, you already have access to that information via azurerm_web_pubsub.web_pubsub_poc.primary_access_key
. (Similarly, the data source for that resource exposes the same for use outside the resource definition config).
Let me know if I've misunderstood, web_pubsub is relatively new to the provider.
Hi @jackofallops - you might be right, but according to the documentation of azurerm_function_app_host_keys you do sth very similar to signalr and provide signalr_extension_key_attribute_reference: https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/data-sources/function_app_host_keys
Im currently also in need of this feature. @jackofallops The usage of webpubsub_extension system key in the webpubsub hub event handler is required for azure functions webpubsub bindings as seen in this sample.
This functionality has been released in v3.30.0 of the Terraform Provider. Please see the Terraform documentation on provider versioning or reach out if you need any assistance upgrading.
For further feature requests or bug reports with this functionality, please create a new GitHub issue following the template. Thank you!
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 have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Community Note
Description
Add ability to access the
webpubsub_extension
system key inazurerm_function_app_host_keys
so that we can configureazurerm_web_pubsub_hub
in terraform.Suggest adding an attribute such as
webpubsub_extension_key
which seems to fit with the naming convention already used.New or Affected Resource(s)
Potential Terraform Configuration
Assuming you have already created a Function App using
azurerm_function_app
based on the example https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/function_appazurerm_web_pubsub_hub
we do something like this:References
14579