Skip to content

Commit 118e0f3

Browse files
tongyimingmikatong
andauthored
Fix/emr import (#753)
* [fix]cvm instance type query * [fix]emr import close Co-authored-by: mikatong <[email protected]>
1 parent 16ce0d0 commit 118e0f3

File tree

3 files changed

+20
-9
lines changed

3 files changed

+20
-9
lines changed

tencentcloud/data_source_tc_instance_types.go

Lines changed: 18 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -120,6 +120,16 @@ func dataSourceInstanceTypes() *schema.Resource {
120120
Computed: true,
121121
Description: "Type series of the instance.",
122122
},
123+
"instance_charge_type": {
124+
Type: schema.TypeString,
125+
Computed: true,
126+
Description: "Charge type of the instance.",
127+
},
128+
"status": {
129+
Type: schema.TypeString,
130+
Computed: true,
131+
Description: "Sell status of the instance.",
132+
},
123133
},
124134
},
125135
},
@@ -252,12 +262,14 @@ func dataSourceTencentCloudInstanceTypesRead(d *schema.ResourceData, meta interf
252262

253263
if flag {
254264
mapping := map[string]interface{}{
255-
"availability_zone": instanceType.Zone,
256-
"cpu_core_count": instanceType.Cpu,
257-
"gpu_core_count": instanceType.Gpu,
258-
"memory_size": instanceType.Memory,
259-
"family": instanceType.InstanceFamily,
260-
"instance_type": instanceType.InstanceType,
265+
"availability_zone": instanceType.Zone,
266+
"cpu_core_count": instanceType.Cpu,
267+
"gpu_core_count": instanceType.Gpu,
268+
"memory_size": instanceType.Memory,
269+
"family": instanceType.InstanceFamily,
270+
"instance_type": instanceType.InstanceType,
271+
"instance_charge_type": instanceType.InstanceChargeType,
272+
"status": instanceType.Status,
261273
}
262274
typeList = append(typeList, mapping)
263275
ids = append(ids, *instanceType.InstanceType)

tencentcloud/resource_tc_emr_cluster.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,6 @@ func resourceTencentCloudEmrCluster() *schema.Resource {
6767
Read: resourceTencentCloudEmrClusterRead,
6868
Delete: resourceTencentCloudEmrClusterDelete,
6969
Update: resourceTencentCloudEmrClusterUpdate,
70-
Importer: &schema.ResourceImporter{
71-
State: schema.ImportStatePassthrough,
72-
},
7370
Schema: map[string]*schema.Schema{
7471
"display_strategy": {
7572
Type: schema.TypeString,

website/docs/d/instance_types.html.markdown

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,9 @@ In addition to all arguments above, the following attributes are exported:
4747
* `cpu_core_count` - The number of CPU cores of the instance.
4848
* `family` - Type series of the instance.
4949
* `gpu_core_count` - The number of GPU cores of the instance.
50+
* `instance_charge_type` - Charge type of the instance.
5051
* `instance_type` - Type of the instance.
5152
* `memory_size` - Instance memory capacity, unit in GB.
53+
* `status` - Sell status of the instance.
5254

5355

0 commit comments

Comments
 (0)