hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.47k stars 4.55k forks source link

Support for azurerm_notification_hub_namespace_authorization_rule #13270

Open piwi91 opened 2 years ago

piwi91 commented 2 years ago

Community Note

Description

I want to configure authorization rules for a notification hub namespace and would expect to have a resource like azurerm_notification_hub_namespace_authorization_rule. A similar resource for an event hub exists (eventhub_namespace_authorization_rule)

New or Affected Resource(s)

Potential Terraform Configuration

# Copy-paste your Terraform configurations here - for large Terraform configs,
# please use a service like Dropbox and share a link to the ZIP file. For
# security, you can also encrypt the files using our GPG public key.

References

anhdle14 commented 2 years ago

Same for the datasource of azurerm_notification_hub_authorization_rule as well, I don't see anyway to reference it from the docs. Maybe it can be done with azurerm_servicebus_queue_authorization_rule?

EDIT 1: Tried with azurerm_servicebus_queue_authorization_rule and did not work. So there is no way to reference azurerm_notification_hub_authorization_rule with datasource.

ericjaystevens commented 1 year ago

It seems like this feature was already added in #1589 and is documented on https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/notification_hub_authorization_rule

The implemented resource name azurerm_notification_hub_authorization_rule instead of the proposed azurerm_notification_hub_namespace_authorization_rule but is still creating authorization rules for a namespace in a notification hub.

dominik-weber commented 1 year ago

@ericjaystevens afaik the azurerm_notification_hub_authorization_rule resource will create the authorization rule for a notification hub, but not for the namespace itself. As @piwi91 noted initially, it looks like we would need a dedicated resource in terraform to assign an authorization rule to the namespace directly.