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
2 changes: 1 addition & 1 deletion tencentcloud/resource_tc_emr_cluster.go
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
18 changes: 16 additions & 2 deletions tencentcloud/resource_tc_emr_cluster_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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
}
Expand All @@ -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
}
Expand Down
2 changes: 1 addition & 1 deletion website/docs/r/emr_cluster.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down