Skip to content

Commit 00c59de

Browse files
committed
add came_role_name to read function
1 parent 8aea9bc commit 00c59de

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

tencentcloud/data_source_tc_instances.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -231,6 +231,11 @@ func dataSourceTencentCloudInstances() *schema.Resource {
231231
Computed: true,
232232
Description: "The way that CVM instance will be renew automatically or not when it reach the end of the prepaid tenancy.",
233233
},
234+
"cam_role_name": {
235+
Type: schema.TypeString,
236+
Computed: true,
237+
Description: "CAM role name authorized to access.",
238+
},
234239
},
235240
},
236241
},
@@ -311,6 +316,7 @@ func dataSourceTencentCloudInstancesRead(d *schema.ResourceData, meta interface{
311316
"create_time": instance.CreatedTime,
312317
"expired_time": instance.ExpiredTime,
313318
"instance_charge_type_prepaid_renew_flag": instance.RenewFlag,
319+
"cam_role_name": instance.CamRoleName,
314320
}
315321
if len(instance.PublicIpAddresses) > 0 {
316322
mapping["public_ip"] = *instance.PublicIpAddresses[0]

tencentcloud/resource_tc_instance.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -786,6 +786,7 @@ func resourceTencentCloudInstanceRead(d *schema.ResourceData, meta interface{})
786786
_ = d.Set("instance_status", instance.InstanceState)
787787
_ = d.Set("create_time", instance.CreatedTime)
788788
_ = d.Set("expired_time", instance.ExpiredTime)
789+
_ = d.Set("cam_role_name", instance.CamRoleName)
789790

790791
if _, ok := d.GetOkExists("allocate_public_ip"); !ok {
791792
_ = d.Set("allocate_public_ip", len(instance.PublicIpAddresses) > 0)

website/docs/d/instances.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ In addition to all arguments above, the following attributes are exported:
3939
* `instance_list` - An information list of cvm instance. Each element contains the following attributes:
4040
* `allocate_public_ip` - Indicates whether public ip is assigned.
4141
* `availability_zone` - The available zone that the CVM instance locates at.
42+
* `cam_role_name` - CAM role name authorized to access.
4243
* `cpu` - The number of CPU cores of the instance.
4344
* `create_time` - Creation time of the instance.
4445
* `data_disks` - An information list of data disk. Each element contains the following attributes:

0 commit comments

Comments
 (0)