Azure module to deploy a Azure Communication Services.
Module version | Terraform version | OpenTofu version | AzureRM version |
---|---|---|---|
>= 8.x.x | Unverified | 1.8.x | >= 4.0 |
>= 7.x.x | 1.3.x | >= 3.0 | |
>= 6.x.x | 1.x | >= 3.0 | |
>= 5.x.x | 0.15.x | >= 2.0 | |
>= 4.x.x | 0.13.x / 0.14.x | >= 2.0 | |
>= 3.x.x | 0.12.x | >= 2.0 | |
>= 2.x.x | 0.12.x | < 2.0 | |
< 2.x.x | 0.11.x | < 2.0 |
If you want to contribute to this repository, feel free to use our pre-commit git hook configuration which will help you automatically update and format some files for you by enforcing our Terraform code module best-practices.
More details are available in the CONTRIBUTING.md file.
This module is optimized to work with the Claranet terraform-wrapper tool
which set some terraform variables in the environment needed by this module.
More details about variables set by the terraform-wrapper
available in the documentation.
module "acs" {
source = "claranet/acs/azurerm"
version = "x.x.x"
location_short = module.azure_region.location_short
resource_group_name = module.rg.name
client_name = var.client_name
environment = var.environment
stack = var.stack
azure_tenant_id = var.azure_tenant_id
logs_destinations_ids = [
module.run.logs_storage_account_id,
module.run.log_analytics_workspace_id
]
data_location = module.azure_region.data_location
ecs_entra_custom_role_enabled = true
ecs_entra_sp_enabled = true
ecs_enabled = true
ecs_azure_managed_domain_enabled = true
ecs_custom_domains = [
{
name = "foo.com"
domain_management = "CustomerManaged"
user_engagement_tracking_enabled = false
},
{
name = "bar.fr"
domain_management = "CustomerManagedInExchangeOnline"
user_engagement_tracking_enabled = true
},
{
name = "baz.com"
},
]
extra_tags = {
foo = "bar"
}
}
Name | Version |
---|---|
azurecaf | ~> 1.2.28 |
azurerm | ~> 4.0 |
Name | Source | Version |
---|---|---|
diagnostics | claranet/diagnostic-settings/azurerm | ~> 8.0.0 |
service_principals | claranet/service-principal/azurerm | ~> 8.0.0 |
Name | Type |
---|---|
azurerm_communication_service.main | resource |
azurerm_communication_service_email_domain_association.azure_managed_domain | resource |
azurerm_communication_service_email_domain_association.custom_domain | resource |
azurerm_email_communication_service.main | resource |
azurerm_email_communication_service_domain.azure_managed_domain | resource |
azurerm_email_communication_service_domain.custom_domain | resource |
azurerm_resource_provider_registration.communication | resource |
azurerm_role_definition.acs_email_write | resource |
azurecaf_name.acs | data source |
azurecaf_name.ecs | data source |
azurerm_subscription.main | data source |
Name | Description | Type | Default | Required |
---|---|---|---|---|
azure_tenant_id | Azure tenant ID. | string |
n/a | yes |
client_name | Client name/account used in naming. | string |
n/a | yes |
custom_ecs_name | Custom Azure Email Communication Services name, generated if not set. | string |
"" |
no |
custom_name | Custom Azure Communication Services name, generated if not set. | string |
"" |
no |
custom_sp_name | Custom Email Communication Services SP name, generated if not set. | string |
"" |
no |
data_location | The location where the Communication service stores its data at rest. Possible values are Africa , Asia Pacific , Australia , Brazil , Canada , Europe , France , Germany , India , Japan , Korea , Norway , Switzerland , UAE , UK and United States . Defaults to United States . Changing this forces a new Communication Service to be created. |
string |
n/a | yes |
default_tags_enabled | Option to enable or disable default tags. | bool |
true |
no |
diagnostic_settings_custom_name | Custom name of the diagnostics settings, name will be 'default' if not set. | string |
"default" |
no |
ecs_azure_managed_domain_enabled | Use Azure auto-generated managed domain. | bool |
false |
no |
ecs_custom_domains | List of custom domains to be used for the Communication Service. Each object requires a name and domain_management field (Possible values are CustomerManaged or CustomerManagedInExchangeOnline ). |
list(object({ |
[] |
no |
ecs_enabled | Enable Email Communication Service. | bool |
false |
no |
ecs_entra_custom_role_enabled | Creates custom role to allow sending email from same subscription. | bool |
false |
no |
ecs_entra_sp_enabled | Creates Service Principal to send emails. | bool |
false |
no |
ecs_entra_sp_owners | Service Principal owners. | list(string) |
[] |
no |
environment | Project environment. | string |
n/a | yes |
extra_tags | Additional tags to add on resources. | map(string) |
{} |
no |
location_short | Short string for Azure location. | string |
n/a | yes |
logs_categories | Log categories to send to destinations. | list(string) |
null |
no |
logs_destinations_ids | List of destination resources IDs for logs diagnostic destination. Can be Storage Account , Log Analytics Workspace and Event Hub . No more than one of each can be set.If you want to use Azure EventHub as a destination, you must provide a formatted string containing both the EventHub Namespace authorization send ID and the EventHub name (name of the queue to use in the Namespace) separated by the | character. |
list(string) |
n/a | yes |
logs_metrics_categories | Metrics categories to send to destinations. | list(string) |
null |
no |
name_prefix | Optional prefix for the generated name. | string |
"" |
no |
name_suffix | Optional suffix for the generated name. | string |
"" |
no |
resource_group_name | Name of the resource group. | string |
n/a | yes |
stack | Project stack name. | string |
n/a | yes |
Name | Description |
---|---|
ecs_azure_managed_domain | Email Communication Services Azure managed domain. |
ecs_custom_domains | Email Communication Services custom domains. |
ecs_id | Email Communication Services name. |
ecs_name | Email Communication Services name. |
ecs_smtp_config | Email Communication Services SMTP configuration. Based on documentation. |
id | Azure Communication Services ID. |
module_service_principal | Service principal module output. |
name | Azure Communication Services name. |
resource | Azure Communication Services output object. |
resource_ecs | Email Communication Services output object. |
Microsoft Azure documentation Connect a verified email domain Sending emails using SMTP