Skip to content
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

azurerm_eventhub should accept namespace id as an input #27008

Closed
1 task done
calebak404 opened this issue Aug 12, 2024 · 3 comments · Fixed by #28055
Closed
1 task done

azurerm_eventhub should accept namespace id as an input #27008

calebak404 opened this issue Aug 12, 2024 · 3 comments · Fixed by #28055

Comments

@calebak404
Copy link

Is there an existing issue for this?

  • I have searched the existing issues

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave comments along the lines of "+1", "me too" or "any updates", they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment and review the contribution guide to help.

Description

In order to be more consistent with other resources and allow for more flexibility, azurerm_eventhub should accept namespace id as an input instead of namespace name.

New or Affected Resource(s)/Data Source(s)

azurerm_eventhub

Potential Terraform Configuration

resource "azurerm_eventhub" "example" {
  name                = "acceptanceTestEventHub"
  namespace_id        = azurerm_eventhub_namespace.example.id
  resource_group_name = azurerm_resource_group.example.name
  partition_count     = 2
  message_retention   = 1
}

References

No response

@github-actions github-actions bot added the service/event-hubs EventHubs label Aug 12, 2024
@sinbai
Copy link
Contributor

sinbai commented Aug 13, 2024

Hi @calebak404 thanks for opening this issue. Actually, Terraform resource azurerm_eventhub supports namespace_name as an input. Could you please use namespace_name instead of namespace_id as detailed below?

resource "azurerm_eventhub" "example" {
  name                = "acceptanceTestEventHub"
  namespace_name        = azurerm_eventhub_namespace.example.name
  resource_group_name = azurerm_resource_group.example.name
  partition_count     = 2
  message_retention   = 1
}

@calebak404
Copy link
Author

I've conveyed this to our account team as well, but the goal with this request is to have namespace_id as an option in addition to namespace_name.

  1. Providing the resource id of the namespace is more explicit and exact
  2. This brings the event_hub resource in line with other resources that take ID as an argument.
  3. This allows for more flexibility in module design enabling us to reference a namespace that is in a different subscription that the one the provider is configured for.

Copy link

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.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Dec 25, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.