Skip to content

Commit 3baa584

Browse files
authored
feat(cvm): [116423057] output cvm instance uuid (#2568)
* add cvm uuid * add changelog
1 parent 8fe5c25 commit 3baa584

File tree

4 files changed

+14
-1
lines changed

4 files changed

+14
-1
lines changed

.changelog/2568.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
resource/tencentcloud_instance: Output `Uuid` of cvm instance
3+
```

tencentcloud/services/cvm/resource_tc_instance.go

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -394,6 +394,11 @@ func ResourceTencentCloudInstance() *schema.Resource {
394394
Computed: true,
395395
Description: "Public IP of the instance.",
396396
},
397+
"uuid": {
398+
Type: schema.TypeString,
399+
Computed: true,
400+
Description: "Globally unique ID of the instance.",
401+
},
397402
"create_time": {
398403
Type: schema.TypeString,
399404
Computed: true,
@@ -821,6 +826,10 @@ func resourceTencentCloudInstanceRead(d *schema.ResourceData, meta interface{})
821826
_ = d.Set("cam_role_name", instance.CamRoleName)
822827
_ = d.Set("disable_api_termination", instance.DisableApiTermination)
823828

829+
if instance.Uuid != nil {
830+
_ = d.Set("uuid", instance.Uuid)
831+
}
832+
824833
if *instance.InstanceChargeType == CVM_CHARGE_TYPE_CDHPAID {
825834
_ = d.Set("cdh_instance_type", instance.InstanceType)
826835
}

tencentcloud/services/vpc/resource_tc_security_group_rule.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ import (
1818

1919
func ResourceTencentCloudSecurityGroupRule() *schema.Resource {
2020
return &schema.Resource{
21-
DeprecationMessage: "This resource will be offline and no longer supported, beacause single security rule is hardly ordered. Please use 'tencentcloud_security_group_lite_rule' instead.",
21+
DeprecationMessage: "This resource will be offline and no longer supported, beacause single security rule is hardly ordered. Please use 'tencentcloud_security_group_rule_set' instead.",
2222
Create: resourceTencentCloudSecurityGroupRuleCreate,
2323
Read: resourceTencentCloudSecurityGroupRuleRead,
2424
Delete: resourceTencentCloudSecurityGroupRuleDelete,

website/docs/r/instance.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,7 @@ In addition to all arguments above, the following attributes are exported:
169169
* `expired_time` - Expired time of the instance.
170170
* `instance_status` - Current status of the instance.
171171
* `public_ip` - Public IP of the instance.
172+
* `uuid` - Globally unique ID of the instance.
172173

173174

174175
## Import

0 commit comments

Comments
 (0)