我目前正在尝试创建一个 Bicep 模板,该模板将部署一个存储帐户,将其限制在适当的现有 vnet 中,并部署一个私有终结点并将其链接到不同订阅中的现有私有 DNS 区域,并创建 A 记录。目前,该模板会将存储帐户部署到适当的 vnet 并部署一个新的专用端点,但我不知道如何让它链接到现有的专用 dns 区域并创建 A 记录。任何帮助将不胜感激。谢谢!
resource stg 'Microsoft.Storage/storageAccounts@2020-08-01-preview' = {
name: name
location: location
sku: {
name: storageSku
}
kind: 'StorageV2'
properties: {
minimumTlsVersion: 'TLS1_2'
allowBlobPublicAccess: true
networkAcls: {
bypass: 'AzureServices'
virtualNetworkRules: [
{
id: '${}'
action: 'Allow'
}
]
ipRules: []
defaultAction: 'Deny'
}
}
}
resource privateEndpointName_resource 'Microsoft.Network/privateEndpoints@2019-04-01' = {
name: privateEndpointName
location: location
properties: {
privateLinkServiceConnections: [
{
name: privateEndpointName
properties: {
privateLinkServiceId: resourceId('Microsoft.Storage/storageAccounts', stg.name)
groupIds: [
groupId
]
}
}
]
manualPrivateLinkServiceConnections: []
subnet: {
id: '${}'
}
}
}
resource privateDNSZone_name 'Microsoft.Network/privateDnsZones@2018-09-01' existing = {
scope: resourceGroup(, )
name: privateDNSZone_name_var
}
resource privateDNSZone_name_vnetName_link 'Microsoft.Network/privateDnsZones/virtualNetworkLinks@2018-09-01' existing = {
scope: resourceGroup(, )
name: '${}'
}
resource privateEndpointName_default 'Microsoft.Network/privateEndpoints/privateDnsZoneGroups@2020-03-01' existing = {
name: '${privateEndpointName_resource.name}/default'
}