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
28 changes: 28 additions & 0 deletions .githooks/pre-commit-local
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
REQUIRED_GO_VERSION="1.18" # use the .go-version later

printf "==> Step 1: Gofmt Check...\n"
make fmt-faster
if [ $? -ne 0 ]; then
printf "COMMIT FAILED\n"
exit 1
fi

printf "==> Step 2: Generating docs...\n"
doc=$(make doc 2>&1)
if [ $? -ne 0 ]; then
echo "$doc" | tail -n 4 | head -n 2
printf "COMMIT FAILED\n"
exit 1
fi

printf "==> Step 2: Generating docs...\n"
go_version=$(go version | awk '{print $3}')
if [ $go_version -ne $REQUIRED_GO_VERSION* ]; then
echo "Go version is not compatible. Expected $REQUIRED_GO_VERSION.x"
printf "COMMIT FAILED\n"
exit 1
fi

printf "COMMIT READY\n"
exit 0
8 changes: 8 additions & 0 deletions examples/tencentcloud-sms/main.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
resource "tencentcloud_sms_sign" "example" {
sign_name = "tf_example_sms_sign"
sign_type = 1 # 1:APP, DocumentType can be chosen(0,1,2,3,4)
document_type = 4 # Screenshot of application background management (personally developed APP)
international = 0 # Mainland China SMS
sign_purpose = 0 # personal use
proof_image = "your_proof_image"
}
3 changes: 3 additions & 0 deletions examples/tencentcloud-sms/variables.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
variable "availability_zone" {
default = "ap-guangzhou-3"
}
3 changes: 3 additions & 0 deletions examples/tencentcloud-sms/version.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
terraform {
required_version = ">= 0.12"
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package tencentcloud

import (
"fmt"
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
Expand All @@ -13,8 +14,8 @@ func TestAccTencentCloudTcrReplicationInstanceCreateTasksDataSource_basic(t *tes
Providers: testAccProviders,
Steps: []resource.TestStep{
{
// Config: fmt.Sprintf(testAccTcrReplicationInstance_create_tasks_and_sync_status_DataSource, "create-tasks-and-sync-status", time.Now().Nanosecond()),
Config: testAccTcrReplicationInstance_create_tasks_and_sync_status_DataSource,
Config: fmt.Sprintf(testAccTcrReplicationInstance_create_tasks_and_sync_status_DataSource, defaultTCRInstanceId, "tcr-aoz8mxoz-1-kkircm"),
// Config: testAccTcrReplicationInstance_create_tasks_and_sync_status_DataSource,
PreConfig: func() {
testAccStepSetRegion(t, "ap-shanghai")
testAccPreCheckCommon(t, ACCOUNT_TYPE_COMMON)
Expand Down Expand Up @@ -62,8 +63,8 @@ const testAccTcrReplicationInstance_create_tasks_and_sync_status_DataSource = `
// dst_region_id = tencentcloud_tcr_manage_replication_operation.my_replica.destination_region_id
// }
locals {
src_registry_id = "tcr-800uf6j9"
dst_registry_id = "tcr-800uf6j9-1-cgeafk"
src_registry_id = "%s"
dst_registry_id = "%s"
dst_region_id = 1
}

Expand Down
12 changes: 7 additions & 5 deletions tencentcloud/resource_tc_ses_template.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
/*
Provides a resource to create a ses template
Provides a resource to create a ses template.

Example Usage

Create a ses template instance

```hcl
resource "tencentcloud_ses_template" "template" {
template_name = "sesTemplateName"
resource "tencentcloud_ses_template" "example" {
template_name = "tf_example_ses_temp""
template_content {
text = "This is the content of the test"
text = "example for the ses template"
}
}

Expand All @@ -16,7 +18,7 @@ Import

ses template can be imported using the id, e.g.
```
$ terraform import tencentcloud_ses_template.template template_id
$ terraform import tencentcloud_ses_template.example template_id
```
*/
package tencentcloud
Expand Down
16 changes: 9 additions & 7 deletions tencentcloud/resource_tc_sms_sign.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,16 @@ Provides a resource to create a sms sign

Example Usage

Create a sms sign instance

```hcl
resource "tencentcloud_sms_sign" "sign" {
sign_name = "terraform"
sign_type = 1
document_type = 4
international = 0
sign_purpose = 0
proof_image = "dGhpcyBpcyBhIGV4YW1wbGU="
resource "tencentcloud_sms_sign" "example" {
sign_name = "tf_example_sms_sign"
sign_type = 1 # 1:APP, DocumentType can be chosen(0,1,2,3,4)
document_type = 4 # Screenshot of application background management (personally developed APP)
international = 0 # Mainland China SMS
sign_purpose = 0 # personal use
proof_image = "your_proof_image"
}
```

Expand Down
12 changes: 7 additions & 5 deletions tencentcloud/resource_tc_sms_template.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,15 @@ Provides a resource to create a sms template

Example Usage

Create a sms template

```hcl
resource "tencentcloud_sms_template" "template" {
template_name = "Template By Terraform"
template_content = "Template Content"
international = 0
sms_type = 0
remark = "terraform test"
template_name = "tf_example_sms_template"
template_content = "example for sms template"
international = 0 # Mainland China SMS
sms_type = 0 # regular SMS
remark = "terraform example"
}

```
Expand Down
14 changes: 8 additions & 6 deletions website/docs/r/ses_template.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -4,20 +4,22 @@ layout: "tencentcloud"
page_title: "TencentCloud: tencentcloud_ses_template"
sidebar_current: "docs-tencentcloud-resource-ses_template"
description: |-
Provides a resource to create a ses template
Provides a resource to create a ses template.
---

# tencentcloud_ses_template

Provides a resource to create a ses template
Provides a resource to create a ses template.

## Example Usage

### Create a ses template instance

```hcl
resource "tencentcloud_ses_template" "template" {
template_name = "sesTemplateName"
resource "tencentcloud_ses_template" "example" {
template_name = "tf_example_ses_temp" "
template_content {
text = "This is the content of the test"
text = " example for the ses template "
}
}
```
Expand Down Expand Up @@ -46,6 +48,6 @@ In addition to all arguments above, the following attributes are exported:

ses template can be imported using the id, e.g.
```
$ terraform import tencentcloud_ses_template.template template_id
$ terraform import tencentcloud_ses_template.example template_id
```

16 changes: 9 additions & 7 deletions website/docs/r/sms_sign.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,16 @@ Provides a resource to create a sms sign

## Example Usage

### Create a sms sign instance

```hcl
resource "tencentcloud_sms_sign" "sign" {
sign_name = "terraform"
sign_type = 1
document_type = 4
international = 0
sign_purpose = 0
proof_image = "dGhpcyBpcyBhIGV4YW1wbGU="
resource "tencentcloud_sms_sign" "example" {
sign_name = "tf_example_sms_sign"
sign_type = 1 # 1:APP, DocumentType can be chosen(0,1,2,3,4)
document_type = 4 # Screenshot of application background management (personally developed APP)
international = 0 # Mainland China SMS
sign_purpose = 0 # personal use
proof_image = "your_proof_image"
}
```

Expand Down
12 changes: 7 additions & 5 deletions website/docs/r/sms_template.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,15 @@ Provides a resource to create a sms template

## Example Usage

### Create a sms template

```hcl
resource "tencentcloud_sms_template" "template" {
template_name = "Template By Terraform"
template_content = "Template Content"
international = 0
sms_type = 0
remark = "terraform test"
template_name = "tf_example_sms_template"
template_content = "example for sms template"
international = 0 # Mainland China SMS
sms_type = 0 # regular SMS
remark = "terraform example"
}
```

Expand Down