Skip to content

Commit dc220aa

Browse files
committed
feat(dnspod): tencentcloud_dnspod_domain_instance support domain_id
1 parent 1722c24 commit dc220aa

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

tencentcloud/services/dnspod/resource_tc_dnspod_domain_instance.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,11 @@ func ResourceTencentCloudDnspodDomainInstance() *schema.Resource {
5555
Description: "The remark of Domain.",
5656
},
5757
//computed
58+
"domain_id": {
59+
Type: schema.TypeInt,
60+
Computed: true,
61+
Description: "ID of the domain.",
62+
},
5863
"create_time": {
5964
Type: schema.TypeString,
6065
Computed: true,
@@ -153,6 +158,7 @@ func resourceTencentCloudDnspodDomainInstanceRead(d *schema.ResourceData, meta i
153158

154159
d.SetId(*response.Response.DomainInfo.Domain)
155160

161+
_ = d.Set("domain_id", info.DomainId)
156162
_ = d.Set("domain", info.Domain)
157163
_ = d.Set("create_time", info.CreatedOn)
158164
_ = d.Set("is_mark", info.IsMark)

tencentcloud/services/dnspod/resource_tc_dnspod_domain_instance_test.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ func TestAccTencentCloudDnspodDoamin(t *testing.T) {
6161
Config: testAccTencentCloudDnspodDomain,
6262
Check: resource.ComposeTestCheckFunc(
6363
testAccCheckDnspodDomainExists("tencentcloud_dnspod_domain_instance.domain"),
64+
resource.TestCheckResourceAttr("tencentcloud_dnspod_domain_instance.domain", "domain_id", "0"),
6465
resource.TestCheckResourceAttr("tencentcloud_dnspod_domain_instance.domain", "domain", "terraformer.com"),
6566
resource.TestCheckResourceAttr("tencentcloud_dnspod_domain_instance.domain", "is_mark", "no"),
6667
resource.TestCheckResourceAttr("tencentcloud_dnspod_domain_instance.domain", "slave_dns", "no"),

website/docs/r/dnspod_domain_instance.html.markdown

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ In addition to all arguments above, the following attributes are exported:
3636

3737
* `id` - ID of the resource.
3838
* `create_time` - Create time of the domain.
39+
* `domain_id` - ID of the domain.
3940
* `slave_dns` - Is secondary DNS enabled.
4041

4142

0 commit comments

Comments
 (0)