Skip to content
Merged
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
3 changes: 3 additions & 0 deletions .changelog/3528.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:enhancement
resource/tencentcloud_instance: support ipv6_addresses and public_ipv6_addresses
```
14 changes: 14 additions & 0 deletions tencentcloud/services/cvm/resource_tc_instance.go
Original file line number Diff line number Diff line change
Expand Up @@ -539,6 +539,18 @@ func ResourceTencentCloudInstance() *schema.Resource {
Computed: true,
Description: "Instance os name.",
},
"ipv6_addresses": {
Type: schema.TypeList,
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
Description: "IPv6 address of the instance.",
},
"public_ipv6_addresses": {
Type: schema.TypeList,
Elem: &schema.Schema{Type: schema.TypeString},
Computed: true,
Description: "The public IPv6 address to which the instance is bound.",
},
},

CustomizeDiff: customdiff.All(
Expand Down Expand Up @@ -1198,6 +1210,8 @@ func resourceTencentCloudInstanceRead(d *schema.ResourceData, meta interface{})
_ = d.Set("memory", instance.Memory)
_ = d.Set("os_name", instance.OsName)
_ = d.Set("hpc_cluster_id", instance.HpcClusterId)
_ = d.Set("ipv6_addresses", instance.IPv6Addresses)
_ = d.Set("public_ipv6_addresses", instance.PublicIPv6Addresses)

if instance.Uuid != nil {
_ = d.Set("uuid", instance.Uuid)
Expand Down
1 change: 1 addition & 0 deletions tencentcloud/services/cvm/resource_tc_instance_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -3058,6 +3058,7 @@ func TestAccTencentCloudNeedFixCvmInstanceResource_ReleaseAddress(t *testing.T)
resource.TestCheckResourceAttr("tencentcloud_instance.foo", "ipv6_address_type", "HighQualityEIPv6"),
resource.TestCheckResourceAttr("tencentcloud_instance.foo", "ipv6_address_count", "1"),
resource.TestCheckResourceAttr("tencentcloud_instance.foo", "release_address", "true"),
resource.TestCheckResourceAttr("tencentcloud_instance.foo", "ipv6_addresses.#", "1"),
),
},
},
Expand Down
2 changes: 2 additions & 0 deletions website/docs/r/instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -372,9 +372,11 @@ In addition to all arguments above, the following attributes are exported:
* `create_time` - Create time of the instance.
* `expired_time` - Expired time of the instance.
* `instance_status` - Current status of the instance.
* `ipv6_addresses` - IPv6 address of the instance.
* `memory` - Instance memory capacity, unit in GB.
* `os_name` - Instance os name.
* `public_ip` - Public IP of the instance.
* `public_ipv6_addresses` - The public IPv6 address to which the instance is bound.
* `uuid` - Globally unique ID of the instance.


Expand Down
Loading