Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions examples/tencentcloud-ses/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
provider "tencentcloud" {
region = "ap-guangzhou"
}

resource "tencentcloud_ses_template" "example" {
template_name = "tf_example_ses_temp"
template_content {
html = <<-EOT
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>mail title</title>
</head>
<body>
<div class="container">
<h1>Welcome to our service! </h1>
<p>Dear user,</p>
<p>Thank you for using Tencent Cloud:</p>
<p><a href="https://cloud.tencent.com/document/product/1653">https://cloud.tencent.com/document/product/1653</a></p>
<p>If you did not request this email, please ignore it. </p>
<p><strong>from the iac team</strong></p>
</div>
</body>
</html>
EOT
}
}

resource "tencentcloud_ses_domain" "domain" {
email_identity = "iac.cloud"
}

resource "tencentcloud_ses_email_address" "email_address" {
email_address = "aaa@iac-tf.cloud"
email_sender_name = "aaa"
}
3 changes: 3 additions & 0 deletions examples/tencentcloud-ses/version.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 0.12"
}
34 changes: 33 additions & 1 deletion tencentcloud/resource_tc_ses_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Provides a resource to create a ses template.

Example Usage

Create a ses template instance
Create a ses text template

```hcl
resource "tencentcloud_ses_template" "example" {
Expand All @@ -14,6 +14,38 @@ resource "tencentcloud_ses_template" "example" {
}

```

Create a ses html template

```hcl
resource "tencentcloud_ses_template" "example" {
template_name = "tf_example_ses_temp"
template_content {
html = <<-EOT
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>mail title</title>
</head>
<body>
<div class="container">
<h1>Welcome to our service! </h1>
<p>Dear user,</p>
<p>Thank you for using Tencent Cloud:</p>
<p><a href="https://cloud.tencent.com/document/product/1653">https://cloud.tencent.com/document/product/1653</a></p>
<p>If you did not request this email, please ignore it. </p>
<p><strong>from the iac team</strong></p>
</div>
</body>
</html>
EOT
}
}

```

Import

ses template can be imported using the id, e.g.
Expand Down
32 changes: 31 additions & 1 deletion website/docs/r/ses_template.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Provides a resource to create a ses template.

## Example Usage

### Create a ses template instance
### Create a ses text template

```hcl
resource "tencentcloud_ses_template" "example" {
Expand All @@ -24,6 +24,36 @@ resource "tencentcloud_ses_template" "example" {
}
```

### Create a ses html template

```hcl
resource "tencentcloud_ses_template" "example" {
template_name = "tf_example_ses_temp"
template_content {
html = <<-EOT
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>mail title</title>
</head>
<body>
<div class="container">
<h1>Welcome to our service! </h1>
<p>Dear user,</p>
<p>Thank you for using Tencent Cloud:</p>
<p><a href="https://cloud.tencent.com/document/product/1653">https://cloud.tencent.com/document/product/1653</a></p>
<p>If you did not request this email, please ignore it. </p>
<p><strong>from the iac team</strong></p>
</div>
</body>
</html>
EOT
}
}
```

## Argument Reference

The following arguments are supported:
Expand Down