英文:
Azure Private endpoint for service bus
问题
已经创建了使用 Bicep 的服务总线命名空间,并且为服务总线创建了私有终结点,但私有终结点没有部署。我需要添加子网来创建私有终结点吗?
已创建了使用 Bicep 的服务总线命名空间,并且已创建了服务总线的私有终结点,但私有终结点尚未部署。是否需要添加子网以创建私有终结点?
param service_bus_private_endpoint_Name string
param subscriptionsID string
param resourceGroupName string
PrivateEndpointId: param privateEndpointId string= '/subscriptions/${subscriptionsID}/resourceGroups/${resourceGroupName}/providers/Microsoft.Network/privateEndpoints/${service_bus_private_endpoint_Name}'
resource privateEndpointConnections 'Microsoft.ServiceBus/namespaces/privateEndpointConnections@2022-10-01-preview' = {
name: service_bus_private_endpoint_Name
properties: {
privateEndpoint: {
id: privateEndpointId
}
privateLinkServiceConnectionState: {
description: 'Approved'
status: 'Auto-Approved'
}
provisioningState: 'Succeeded'
}
}
英文:
I have created the service bus namespace using bicep and also created Private Endpoint for the service bus, but privatenedpoints are not deploying. Do I need to add subnets for creating private endpoints?
param service_bus_private_endpoint_Name string
param subscriptionsID string
param resourceGroupName string
PrivateEndpointId : param privateEndpointId string= '/subscriptions/${subscriptionsID}/resourceGroups/${resourceGroupName}/providers/Microsoft.Network/privateEndpoints/${service_bus_private_endpoint_Name}'
resource privateEndpointConnections 'Microsoft.ServiceBus/namespaces/privateEndpointConnections@2022-10-01-preview' = {
name: service_bus_private_endpoint_Name
properties: {
privateEndpoint: {
id : privateEndpointId
}
privateLinkServiceConnectionState: {
description: 'Approved'
status: 'Auto-Approved'
}
provisioningState: 'Succeeded'
}
}
答案1
得分: 0
是的,每个私有端点在部署过程中都必须与一个子网关联,因为它实际上会有一个网络接口“附加”到该子网。
您可以参考官方文档中的示例,使用Bicep创建私有端点,示例中定义了虚拟网络(vnet),子网(subnet),然后定义了私有端点,引用了子网和子资源(在您的情况下是Service Bus命名空间)。
https://learn.microsoft.com/en-us/azure/private-link/create-private-endpoint-bicep?tabs=CLI
英文:
Yes, every private endpoint must be associated to a subnet during the deployment, as it will in practice have a network interface "attached" to this subnet.
You can refer to this example from the official documentation for creating private endpoints using Bicep, where you can see it defines a vnet, a subnet and then the private endpoint referring the subnet and the sub-resource (in your case the servicebus namespace).
https://learn.microsoft.com/en-us/azure/private-link/create-private-endpoint-bicep?tabs=CLI
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论