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

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

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:

  1. var communicationServiceName = 'cs-medienstudio-dev'
  2. var emailServiceName = 'es-medienstudio-dev'
  3. resource emailService 'Microsoft.Communication/emailServices@2023-03-31' = {
  4. name: emailServiceName
  5. location: 'global'
  6. properties: {
  7. dataLocation: 'Europe'
  8. }
  9. }
  10. resource emailServiceDomain 'Microsoft.Communication/emailServices/domains@2023-03-31' = {
  11. parent: emailService
  12. name: 'AzureManagedDomain'
  13. location: 'global'
  14. properties: {
  15. domainManagement: 'AzureManaged'
  16. }
  17. }
  18. resource senderUserName 'Microsoft.Communication/emailServices/domains/senderUsernames@2023-03-31' = {
  19. parent: emailServiceDomain
  20. name: 'donotreply'
  21. properties:{
  22. username: 'DoNotReply'
  23. displayName: 'DoNotReply'
  24. }
  25. }
  26. resource communicationService 'Microsoft.Communication/communicationServices@2023-03-31' = {
  27. name: communicationServiceName
  28. location: 'global'
  29. properties: {
  30. dataLocation: 'Germany'
  31. linkedDomains: [
  32. emailServiceDomain.id
  33. ]
  34. }
  35. }

希望这有助于您理解您的问题。如果您需要更多帮助,请随时提出。

英文:

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:

  1. var communicationServiceName = 'cs-medienstudio-dev'
  2. var emailServiceName = 'es-medienstudio-dev'
  3. resource emailService 'Microsoft.Communication/emailServices@2023-03-31' = {
  4. name: emailServiceName
  5. location: 'global'
  6. properties: {
  7. dataLocation: 'Europe'
  8. }
  9. }
  10. resource emailServiceDomain 'Microsoft.Communication/emailServices/domains@2023-03-31' = {
  11. parent: emailService
  12. name: 'AzureManagedDomain'
  13. location: 'global'
  14. properties: {
  15. domainManagement: 'AzureManaged'
  16. }
  17. }
  18. resource senderUserName 'Microsoft.Communication/emailServices/domains/senderUsernames@2023-03-31' = {
  19. parent: emailServiceDomain
  20. name: 'donotreply'
  21. properties:{
  22. username: 'DoNotReply'
  23. displayName: 'DoNotReply'
  24. }
  25. }
  26. resource communcationService 'Microsoft.Communication/communicationServices@2023-03-31' = {
  27. name: communicationServiceName
  28. location: 'global'
  29. properties: {
  30. dataLocation: 'Germany'
  31. linkedDomains: [
  32. emailServiceDomain.id
  33. ]
  34. }
  35. }

答案1

得分: 1

请尝试将emailServiceDomain.id中添加/domains/AzureManagedDomain,以创建通信服务的Bicep代码可能如下所示:

  1. resource communcationService 'Microsoft.Communication/communicationServices@2023-03-31' = {
  2. name: communicationServiceName
  3. location: 'global'
  4. properties: {
  5. dataLocation: 'Germany'
  6. linkedDomains: [
  7. join([emailServiceDomain.id, '/domains/AzureManagedDomain'], '')
  8. ]
  9. }
  10. }
英文:

Please try by appending /domains/AzureManagedDomain to the emailServiceDomain.id in linkedDomains. So the bicep code for creating communication service could be something like:

  1. resource communcationService 'Microsoft.Communication/communicationServices@2023-03-31' = {
  2. name: communicationServiceName
  3. location: 'global'
  4. properties: {
  5. dataLocation: 'Germany'
  6. linkedDomains: [
  7. join([emailServiceDomain.id, '/domains/AzureManagedDomain'], '')
  8. ]
  9. }
  10. }

答案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:

确定