Skip to content

feat(dnspod): tencentcloud_dnspod_domain_instance support domain_id #3003

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

Merged
merged 1 commit into from
Dec 9, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,11 @@ func ResourceTencentCloudDnspodDomainInstance() *schema.Resource {
Description: "The remark of Domain.",
},
//computed
"domain_id": {
Type: schema.TypeInt,
Computed: true,
Description: "ID of the domain.",
},
"create_time": {
Type: schema.TypeString,
Computed: true,
Expand Down Expand Up @@ -153,6 +158,7 @@ func resourceTencentCloudDnspodDomainInstanceRead(d *schema.ResourceData, meta i

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

_ = d.Set("domain_id", info.DomainId)
_ = d.Set("domain", info.Domain)
_ = d.Set("create_time", info.CreatedOn)
_ = d.Set("is_mark", info.IsMark)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func TestAccTencentCloudDnspodDoamin(t *testing.T) {
Config: testAccTencentCloudDnspodDomain,
Check: resource.ComposeTestCheckFunc(
testAccCheckDnspodDomainExists("tencentcloud_dnspod_domain_instance.domain"),
resource.TestCheckResourceAttr("tencentcloud_dnspod_domain_instance.domain", "domain_id", "0"),
resource.TestCheckResourceAttr("tencentcloud_dnspod_domain_instance.domain", "domain", "terraformer.com"),
resource.TestCheckResourceAttr("tencentcloud_dnspod_domain_instance.domain", "is_mark", "no"),
resource.TestCheckResourceAttr("tencentcloud_dnspod_domain_instance.domain", "slave_dns", "no"),
Expand Down
1 change: 1 addition & 0 deletions website/docs/r/dnspod_domain_instance.html.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ In addition to all arguments above, the following attributes are exported:

* `id` - ID of the resource.
* `create_time` - Create time of the domain.
* `domain_id` - ID of the domain.
* `slave_dns` - Is secondary DNS enabled.


Expand Down
Loading