hashicorp / terraform-provider-azurerm

Terraform provider for Azure Resource Manager
https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs
Mozilla Public License 2.0
4.59k stars 4.62k forks source link

Support for `azurerm_communication_service_email_association` #22995

Closed timja closed 3 months ago

timja commented 1 year ago

Is there an existing issue for this?

Community Note

Description

Linking of these two resources:

https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/communication_service https://registry.terraform.io/providers/hashicorp/azurerm/latest/docs/resources/email_communication_service

In the portal from the communication services: image

image

Note it requires a verified domain already created in the email_communication_service which is covered in https://github.com/hashicorp/terraform-provider-azurerm/issues/22549

New or Affected Resource(s)/Data Source(s)

azurerm_communication_service_email_association

Potential Terraform Configuration

resource "azurerm_communication_service_email_association"
   communication_service_id = "azurerm_communication_service.this.id"
   email_communication_service = "azurerm_email_communication_service.this.id"
}

References

https://github.com/hashicorp/terraform-provider-azurerm/issues/22549 https://github.com/hashicorp/terraform-provider-azurerm/issues/21520#issuecomment-1590553733

wgorczyca commented 1 year ago

Just in case if someone needs a temporary workaround (with azapi provider)

resource "azapi_update_resource" "this" {
  type      = "Microsoft.Communication/communicationServices@2022-07-01-preview"
  resource_id = azurerm_communication_service.this.id

  body = jsonencode({
    properties = {
      linkedDomains = [
        "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourceGroups/example-rg/providers/Microsoft.Communication/emailServices/example-ecs/domains/customdomain.com"
      ]    
    }
  })
}
alanraison commented 7 months ago

Some basic documentation is available here https://learn.microsoft.com/en-us/azure/communication-services/quickstarts/email/connect-email-communication-resource?pivots=programming-language-rest

github-actions[bot] commented 2 months ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.