diff --git a/tencentcloud/resource_tc_emr_cluster.go b/tencentcloud/resource_tc_emr_cluster.go index a91a2be0c8..cfa4bbd646 100644 --- a/tencentcloud/resource_tc_emr_cluster.go +++ b/tencentcloud/resource_tc_emr_cluster.go @@ -147,7 +147,7 @@ func resourceTencentCloudEmrCluster() *schema.Resource { Type: schema.TypeInt, Required: true, ValidateFunc: validateIntegerInRange(0, 1), - Description: "The pay mode of instance. 0 is pay on an annual basis, 1 is pay on a measure basis.", + Description: "The pay mode of instance. 0 represent POSTPAID_BY_HOUR, 1 represent PREPAID.", }, "placement": { Type: schema.TypeMap, diff --git a/tencentcloud/resource_tc_emr_cluster_test.go b/tencentcloud/resource_tc_emr_cluster_test.go index 607e74f506..9d5f8e1a58 100644 --- a/tencentcloud/resource_tc_emr_cluster_test.go +++ b/tencentcloud/resource_tc_emr_cluster_test.go @@ -183,6 +183,20 @@ func testAccCheckEmrExists(n string) resource.TestCheckFunc { } const testEmrBasic = defaultEMRVariable + ` +data "tencentcloud_instance_types" "cvm4c8m" { + exclude_sold_out=true + cpu_core_count=4 + memory_size=8 + filter { + name = "instance-charge-type" + values = ["POSTPAID_BY_HOUR"] + } + filter { + name = "zone" + values = ["ap-guangzhou-3"] + } +} + resource "tencentcloud_emr_cluster" "emrrrr" { product_id=4 display_strategy="clusterList" @@ -201,7 +215,7 @@ resource "tencentcloud_emr_cluster" "emrrrr" { cpu=4 disk_size=100 disk_type="CLOUD_PREMIUM" - spec="CVM.S2" + spec="CVM.${data.tencentcloud_instance_types.cvm4c8m.instance_types.0.family}" storage_type=5 root_size=50 } @@ -210,7 +224,7 @@ resource "tencentcloud_emr_cluster" "emrrrr" { cpu=4 disk_size=100 disk_type="CLOUD_PREMIUM" - spec="CVM.S2" + spec="CVM.${data.tencentcloud_instance_types.cvm4c8m.instance_types.0.family}" storage_type=5 root_size=50 } diff --git a/website/docs/r/emr_cluster.html.markdown b/website/docs/r/emr_cluster.html.markdown index 2393d92d62..cba267df5a 100644 --- a/website/docs/r/emr_cluster.html.markdown +++ b/website/docs/r/emr_cluster.html.markdown @@ -64,7 +64,7 @@ The following arguments are supported: * `display_strategy` - (Required, String, ForceNew) Display strategy of EMR instance. * `instance_name` - (Required, String, ForceNew) Name of the instance, which can contain 6 to 36 English letters, Chinese characters, digits, dashes(-), or underscores(_). * `login_settings` - (Required, Map, ForceNew) Instance login settings. -* `pay_mode` - (Required, Int) The pay mode of instance. 0 is pay on an annual basis, 1 is pay on a measure basis. +* `pay_mode` - (Required, Int) The pay mode of instance. 0 represent POSTPAID_BY_HOUR, 1 represent PREPAID. * `placement` - (Required, Map, ForceNew) The location of the instance. * `product_id` - (Required, Int, ForceNew) The product id of EMR instance. * `softwares` - (Required, List: [`String`], ForceNew) The softwares of a EMR instance.