@@ -27,7 +27,12 @@ func TencentMysqlSellType() map[string]*schema.Schema {
2727 "cdb_type" : {
2828 Type : schema .TypeString ,
2929 Computed : true ,
30- Description : "" ,
30+ Description : "Instance type, the possible value ranges are: `UNIVERSAL` (universal type), `EXCLUSIVE` (exclusive type), `BASIC` (basic type), `BASIC_V2` (basic type v2)." ,
31+ },
32+ "cpu" : {
33+ Type : schema .TypeInt ,
34+ Computed : true ,
35+ Description : "Number of CPU cores." ,
3136 },
3237 "mem_size" : {
3338 Type : schema .TypeInt ,
@@ -54,6 +59,11 @@ func TencentMysqlSellType() map[string]*schema.Schema {
5459 Computed : true ,
5560 Description : "Queries per second." ,
5661 },
62+ "info" : {
63+ Type : schema .TypeString ,
64+ Computed : true ,
65+ Description : "Application Scenario Description." ,
66+ },
5767 }
5868}
5969
@@ -291,12 +301,30 @@ func dataSourceTencentMysqlZoneConfigRead(d *schema.ResourceData, meta interface
291301 engineVersions = append (engineVersions , * sellItem .EngineType )
292302
293303 var showConfigMap = make (map [string ]interface {})
294- showConfigMap ["cdb_type" ] = * sellItem .DeviceType
295- showConfigMap ["mem_size" ] = int (* sellItem .Memory )
296- showConfigMap ["max_volume_size" ] = int (* sellItem .VolumeMax )
297- showConfigMap ["min_volume_size" ] = int (* sellItem .VolumeMin )
298- showConfigMap ["volume_step" ] = int (* sellItem .VolumeStep )
299- showConfigMap ["qps" ] = int (* sellItem .Iops )
304+ if sellItem .DeviceType != nil {
305+ showConfigMap ["cdb_type" ] = * sellItem .DeviceType
306+ }
307+ if sellItem .Cpu != nil {
308+ showConfigMap ["cpu" ] = int (* sellItem .Cpu )
309+ }
310+ if sellItem .Memory != nil {
311+ showConfigMap ["mem_size" ] = int (* sellItem .Memory )
312+ }
313+ if sellItem .VolumeMax != nil {
314+ showConfigMap ["max_volume_size" ] = int (* sellItem .VolumeMax )
315+ }
316+ if sellItem .VolumeMin != nil {
317+ showConfigMap ["min_volume_size" ] = int (* sellItem .VolumeMin )
318+ }
319+ if sellItem .VolumeStep != nil {
320+ showConfigMap ["volume_step" ] = int (* sellItem .VolumeStep )
321+ }
322+ if sellItem .Iops != nil {
323+ showConfigMap ["qps" ] = int (* sellItem .Iops )
324+ }
325+ if sellItem .Info != nil {
326+ showConfigMap ["info" ] = * sellItem .Info
327+ }
300328 sells = append (sells , showConfigMap )
301329
302330 zoneConfig ["engine_versions" ] = engineVersions
0 commit comments