Skip to content

Support for azurerm_relay_namespace/azurerm_relay_hybrid_connection data sources #21144

@jared-koiter

Description

@jared-koiter

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 "+1" or "me too" comments, 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

Description

When connecting an Azure web app to a hybrid connection (https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/web_app_hybrid_connection) we need to reference an azurerm_relay_hybrid_connection ID which itself is part of an azurerm_relay_namespace. Creating and managing these resources with Terraform is fine, but we would like to be able to reference an existing hybrid connection relay/namespace created outside of Terraform. Manually entering the full resource ID is an option, but it would be nice if there was a data source for both the azurerm_relay_namespace and azurerm_relay_hybrid_connection resource types that would allow us to reference information from existing resources.

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

azurerm_relay_namespace, azurerm_relay_hybrid_connection

Potential Terraform Configuration

data "azurerm_relay_namespace" "example" {
  name                = "example-relay-namespace"
  resource_group_name = "example-resource-group"
}

data "azurerm_relay_hybrid_connection" "example" {
  name                = "example-relay-hybrid-connection"
  resource_group_name = "example-resource-group"
}

References

No response

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions