错误在使用Bicep部署Azure通信服务时,使用电子邮件服务和托管域。

huangapple go评论86阅读模式
英文:

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

huangapple
  • 本文由 发表于 2023年6月19日 21:55:52
  • 转载请务必保留本文链接:https://go.coder-hub.com/76507325.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定