正如标题所述,我试图使用bicep来部署Azure通信服务,并将其链接到具有Azure管理域的电子邮件服务。我的脚本能够创建所有资源,但在尝试将通信服务链接到域时失败,并出现以下错误:"The specified domain is unable to be linked."
真正有趣的是:域在通信服务中显示为正确链接。
我试过使用2023-04-01-preview
API但失败了,因为它不允许我将位置设置为全局...
这是我完整的二头肌:
var communicationServiceName = 'cs-medienstudio-dev'
var emailServiceName = 'es-medienstudio-dev'
resource emailService 'Microsoft.Communication/emailServices@2023-03-31' = {
name: emailServiceName
location: 'global'
properties: {
dataLocation: 'Europe'
}
}
resource emailServiceDomain 'Microsoft.Communication/emailServices/domains@2023-03-31' = {
parent: emailService
name: 'AzureManagedDomain'
location: 'global'
properties: {
domainManagement: 'AzureManaged'
}
}
resource senderUserName 'Microsoft.Communication/emailServices/domains/senderUsernames@2023-03-31' = {
parent: emailServiceDomain
name: 'donotreply'
properties:{
username: 'DoNotReply'
displayName: 'DoNotReply'
}
}
resource communcationService 'Microsoft.Communication/communicationServices@2023-03-31' = {
name: communicationServiceName
location: 'global'
properties: {
dataLocation: 'Germany'
linkedDomains: [
emailServiceDomain.id
]
}
}
1条答案
按热度按时间6ju8rftf1#
请尝试将
/domains/AzureManagedDomain
附加到linkedDomains
中的emailServiceDomain.id
。因此,用于创建通信服务的二头肌代码可能是这样的: