Skip to content
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

[WIP]feat(privatedns): [120743293] Add new resource #2965

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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/2965.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:new-resource
tencentcloud_private_dns_account
```

```release-note:new-datasource
tencentcloud_private_dns_accounts
```
2 changes: 2 additions & 0 deletions tencentcloud/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -1064,6 +1064,7 @@ func Provider() *schema.Provider {
"tencentcloud_private_dns_private_zone_list": privatedns.DataSourceTencentCloudPrivateDnsPrivateZoneList(),
"tencentcloud_private_dns_forward_rules": privatedns.DataSourceTencentCloudPrivateDnsForwardRules(),
"tencentcloud_private_dns_end_points": privatedns.DataSourceTencentCloudPrivateDnsEndPoints(),
"tencentcloud_private_dns_accounts": privatedns.DataSourceTencentCloudPrivateDnsAccounts(),
"tencentcloud_waf_ciphers": waf.DataSourceTencentCloudWafCiphers(),
"tencentcloud_waf_tls_versions": waf.DataSourceTencentCloudWafTlsVersions(),
"tencentcloud_waf_domains": waf.DataSourceTencentCloudWafDomains(),
Expand Down Expand Up @@ -1688,6 +1689,7 @@ func Provider() *schema.Provider {
"tencentcloud_subscribe_private_zone_service": privatedns.ResourceTencentCloudSubscribePrivateZoneService(),
"tencentcloud_private_dns_forward_rule": privatedns.ResourceTencentCloudPrivateDnsForwardRule(),
"tencentcloud_private_dns_end_point": privatedns.ResourceTencentCloudPrivateDnsEndPoint(),
"tencentcloud_private_dns_account": privatedns.ResourceTencentCloudPrivateDnsAccount(),
"tencentcloud_cls_logset": cls.ResourceTencentCloudClsLogset(),
"tencentcloud_cls_topic": cls.ResourceTencentCloudClsTopic(),
"tencentcloud_cls_config": cls.ResourceTencentCloudClsConfig(),
Expand Down
2 changes: 2 additions & 0 deletions tencentcloud/provider.md
Original file line number Diff line number Diff line change
Expand Up @@ -1353,11 +1353,13 @@ PrivateDNS
tencentcloud_subscribe_private_zone_service
tencentcloud_private_dns_forward_rule
tencentcloud_private_dns_end_point
tencentcloud_private_dns_account
Data Source
tencentcloud_private_dns_records
tencentcloud_private_dns_private_zone_list
tencentcloud_private_dns_forward_rules
tencentcloud_private_dns_end_points
tencentcloud_private_dns_accounts

Cloud Log Service(CLS)
Resource
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Use this data source to query detailed information of privatedns accounts

Example Usage

Query all accounts

```hcl
data "tencentcloud_private_dns_accounts" "example" {}
```

Query accounts by filters

```hcl
data "tencentcloud_private_dns_accounts" "example" {
filters {
name = "AccountUin"
values = ["100022770160"]
}
}
```
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package privatedns
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package privatedns_test

import (
"testing"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"

tcacctest "github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/acctest"
)

// go test -i; go test -test.run TestAccTencentCloudPrivateDnsAccountsDataSource_basic -v
func TestAccTencentCloudPrivateDnsAccountsDataSource_basic(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() {
tcacctest.AccPreCheck(t)
},
Providers: tcacctest.AccProviders,
Steps: []resource.TestStep{{
Config: testAccPrivateDnsAccountsDataSource,
Check: resource.ComposeTestCheckFunc(
tcacctest.AccCheckTencentCloudDataSourceID("data.tencentcloud_private_dns_accounts.example"),
),
}},
})
}

const testAccPrivateDnsAccountsDataSource = `
data "tencentcloud_private_dns_accounts" "example" {}
`

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading