Provides a Direct Mail Mail Address resource.
For information about Direct Mail Mail Address and how to use it, see What is Mail Address.
Basic Usage
variable "account_name" {
default = "tfexample"
}
variable "domain_name" {
default = "alicloud-provider.online"
}
provider "alicloud" {
region = "cn-hangzhou"
}
resource "alicloud_direct_mail_domain" "example" {
domain_name = var.domain_name
}
resource "alicloud_direct_mail_mail_address" "example" {
account_name = format("%s@%s", var.account_name, alicloud_direct_mail_domain.example.domain_name)
sendtype = "batch"
}
The following arguments are supported:
account_name
- (Required, ForceNew) The sender address. The email address must be filled in the format of account@domain, and only lowercase letters or numbers can be used.password
- (Optional) Account password. The password must be length 10-20 string, contains numbers, uppercase letters, lowercase letters at the same time.reply_address
- (Optional) Return address.sendtype
- (Required, ForceNew) Account type. Valid values: batch
, trigger
.The following attributes are exported:
id
- The resource ID in terraform of Mail Address.status
- Account Status freeze: 1, normal: 0.Direct Mail Mail Address can be imported using the id, e.g.
$ terraform import alicloud_direct_mail_mail_address.example <id>