英文:
Error deploying Azure Communication Service with Email Services and Managed Domain using Bicep
问题
抱歉,我只能翻译文本内容,无法处理代码部分。以下是您提供的文本的翻译:
"As the title states I'm trying to use bicep to deploy an Azure Communication service and link it to an Email Service with Azure-managed domain. My script is able to create all resources, but it fails when trying to link the communication service to the domain with the error:
"The specified domain is unable to be linked."
The really interesting part: The domain shows as correctly linked in the Communication Service.
I've tried using the 2023-04-01-preview API but this fails because it doesn't let me set location as global...
Here's my full bicep:
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 communicationService 'Microsoft.Communication/communicationServices@2023-03-31' = {
name: communicationServiceName
location: 'global'
properties: {
dataLocation: 'Germany'
linkedDomains: [
emailServiceDomain.id
]
}
}
希望这有助于您理解您的问题。如果您需要更多帮助,请随时提出。
英文:
As the title states I'm trying to use bicep to deploy an Azure Communiction service and link it to an Email Service with Azure-managed domain. My script is able to create all ressources, but it fails when trying to link the communication service to the domain with the error:
"The specified domain is unable to be linked."
The really interesting part: The domain shows as correctly linked in the Communication Service.
I've tried using the 2023-04-01-preview
api but this fails because it doesn't let me set location as global...
Here's my full bicep:
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
得分: 1
请尝试将emailServiceDomain.id
中添加/domains/AzureManagedDomain
,以创建通信服务的Bicep代码可能如下所示:
resource communcationService 'Microsoft.Communication/communicationServices@2023-03-31' = {
name: communicationServiceName
location: 'global'
properties: {
dataLocation: 'Germany'
linkedDomains: [
join([emailServiceDomain.id, '/domains/AzureManagedDomain'], '')
]
}
}
英文:
Please try by appending /domains/AzureManagedDomain
to the emailServiceDomain.id
in linkedDomains
. So the bicep code for creating communication service could be something like:
resource communcationService 'Microsoft.Communication/communicationServices@2023-03-31' = {
name: communicationServiceName
location: 'global'
properties: {
dataLocation: 'Germany'
linkedDomains: [
join([emailServiceDomain.id, '/domains/AzureManagedDomain'], '')
]
}
}
答案2
得分: 1
如果有人因在部署客户托管域时遇到此错误而来到这里,您将需要在再次尝试部署之前验证域记录。请参阅:https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/add-custom-verified-domains
英文:
If someone ends up here because they encounter this error while deploying a CustomerManaged domain, you will have to do the verification of the domain records before attempting to deploy again. See: https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/add-custom-verified-domains
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论