Helper function to get private link dns names
- Dominant language
- Bicep
- Stars
- 3.6k
- Forks
- 830
- Avg merge
- 1d 21m
- Merged PRs (30d)
- 79
Description
**Is your feature request related to a problem? Please describe.**
When working with private link, it can often be a pain to work out what the dns zone should be for private link. there is a table to map this at https://docs.microsoft.com/en-us/azure/private-link/private-endpoint-dns but it can be hard to find, and hard coding the zones also leads to problems if deploying to special regions
**Describe the solution you'd like**
It would be helpful if there was some kind of function that could take a resource or resource type, and output the private link zone for that resource
e.g. given an input of `Microsoft.Sql/servers`, it should return `privatelink.database.windows.net`
A few ideas of ways in which this could be implemented:
```bicep
resource sql 'Microsoft.Sql/servers@2014-04-01' existing = {
name: 'foo'
}
output idea1 = privateLinkDnsZone(sql.type)
output idea2 = privateLinkDnsZone(sql)
output idea3 = sql.privateLinkDnsZone()
```
Contributor guide
Research direction
Start with the Azure private endpoint DNS table linked in the issue and compare its resource-type and special-region mappings with the proposed inputs. The work is done when the supported input form and returned private-link DNS names are defined and verified for the stated Microsoft.Sql/servers example and relevant regional cases.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- azure
- Domain
- cloud
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100