Manages a API Management Email Template.
provider "azurerm" {
features {}
}
resource "azurerm_resource_group" "example" {
name = "example-resources"
location = "West Europe"
}
resource "azurerm_api_management" "example" {
name = "example-apim"
location = azurerm_resource_group.example.location
resource_group_name = azurerm_resource_group.example.name
publisher_name = "My Company"
publisher_email = "company@terraform.io"
sku_name = "Developer_1"
}
resource "azurerm_api_management_email_template" "example" {
template_name = "ConfirmSignUpIdentityDefault"
resource_group_name = azurerm_resource_group.example.name
api_management_name = azurerm_api_management.example.name
subject = "Customized confirmation email for your new $OrganizationName API account"
body = <<EOF
<!DOCTYPE html >
<html>
<head>
<meta charset="UTF-8" />
<title>Customized Letter Title</title>
</head>
<body>
<p style="font-size:12pt;font-family:'Segoe UI'">Dear $DevFirstName $DevLastName,</p>
</body>
</html>
EOF
}
The following arguments are supported:
template_name
- (Required) The name of the Email Template. Possible values are AccountClosedDeveloper
, ApplicationApprovedNotificationMessage
, ConfirmSignUpIdentityDefault
, EmailChangeIdentityDefault
, InviteUserNotificationMessage
, NewCommentNotificationMessage
, NewDeveloperNotificationMessage
, NewIssueNotificationMessage
, PasswordResetByAdminNotificationMessage
, PasswordResetIdentityDefault
, PurchaseDeveloperNotificationMessage
, QuotaLimitApproachingDeveloperNotificationMessage
, RejectDeveloperNotificationMessage
, RequestDeveloperNotificationMessage
. Changing this forces a new API Management Email Template to be created.
api_management_name
- (Required) The name of the API Management Service in which the Email Template should exist. Changing this forces a new API Management Email Template to be created.
resource_group_name
- (Required) The name of the Resource Group where the API Management Email Template should exist. Changing this forces a new API Management Email Template to be created.
subject
- (Required) The subject of the Email.
body
- (Required) The body of the Email. Its format has to be a well-formed HTML document.
In addition to the Arguments listed above - the following Attributes are exported:
id
- The ID of the API Management Email Template.
title
- The title of the Email Template.
description
- The description of the Email Template.
The timeouts
block allows you to specify timeouts for certain actions:
create
- (Defaults to 30 minutes) Used when creating the API Management Email Template.read
- (Defaults to 5 minutes) Used when retrieving the API Management Email Template.update
- (Defaults to 30 minutes) Used when updating the API Management Email Template.delete
- (Defaults to 30 minutes) Used when deleting the API Management Email Template.API Management Email Templates can be imported using the resource id
, e.g.
terraform import azurerm_api_management_email_template.example /subscriptions/00000000-0000-0000-0000-000000000000/resourceGroups/group1/providers/Microsoft.ApiManagement/service/instance1/templates/template1