Skip to content

Feat/add UUID #2758

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 3 commits into from
Closed
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
7 changes: 7 additions & 0 deletions .changelog/2757.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:enhancement
data_source/tencentcloud_instances: add params `uuid`
```

```release-note:enhancement
resource/tencentcloud_vpn_gateway: add default value for `prepaid_period` while import
```
6 changes: 6 additions & 0 deletions tencentcloud/services/cvm/data_source_tc_instances.go
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,11 @@ func DataSourceTencentCloudInstances() *schema.Resource {
Computed: true,
Description: "CAM role name authorized to access.",
},
"uuid": {
Type: schema.TypeString,
Computed: true,
Description: "Globally unique ID of the instance.",
},
},
},
},
Expand Down Expand Up @@ -354,6 +359,7 @@ func dataSourceTencentCloudInstancesRead(d *schema.ResourceData, meta interface{
"expired_time": instance.ExpiredTime,
"instance_charge_type_prepaid_renew_flag": instance.RenewFlag,
"cam_role_name": instance.CamRoleName,
"uuid": instance.Uuid,
}

if len(instance.PublicIpAddresses) > 0 {
Expand Down
4 changes: 3 additions & 1 deletion tencentcloud/services/vpn/resource_tc_vpn_gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@ func ResourceTencentCloudVpnGateway() *schema.Resource {
Update: resourceTencentCloudVpnGatewayUpdate,
Delete: resourceTencentCloudVpnGatewayDelete,
Importer: &schema.ResourceImporter{
State: schema.ImportStatePassthrough,
State: helper.ImportWithDefaultValue(map[string]interface{}{
"prepaid_period": 1,
}),
},

Schema: map[string]*schema.Schema{
Expand Down
1 change: 1 addition & 0 deletions website/docs/d/instances.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,7 @@ In addition to all arguments above, the following attributes are exported:
* `system_disk_size` - Size of the system disk.
* `system_disk_type` - Type of the system disk.
* `tags` - Tags of the instance.
* `uuid` - Globally unique ID of the instance.
* `vpc_id` - ID of the vpc.


Loading