Skip to content

feat(dnspod): Add datasource of dnspod domain analytics #2221

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 36 commits into from
Oct 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
4ca08aa
feat(dnspod): add datasource
andrew-tx Oct 13, 2023
944815f
feat(dnspod): add datasource
andrew-tx Oct 13, 2023
f4b7327
feat(dnspod): add datasource
andrew-tx Oct 13, 2023
f7c9f2b
feat(dnspod): add datasource
andrew-tx Oct 13, 2023
7af383e
feat(dnspod): data source of domain list
andrew-tx Oct 15, 2023
bf8d520
feat(dnspod): data source of domain list
andrew-tx Oct 15, 2023
501a1e6
docs(dnspod): add changelog of tencentcloud_dnspod_domain_list
andrew-tx Oct 15, 2023
89a4002
docs(dnspod): dnspod domain list
andrew-tx Oct 15, 2023
d0fc9d0
feat(dnspod): groupid parameter
andrew-tx Oct 16, 2023
29497ff
docs(dnspod): go fmt
andrew-tx Oct 16, 2023
282a444
docs(dnspod): Add datasource of dnspod domain analytics
andrew-tx Oct 16, 2023
f5f0e34
docs(dnspod): add changelog of datasource dnspod domain analytics
andrew-tx Oct 16, 2023
20487ba
refact(dnspod): fmt code
andrew-tx Oct 16, 2023
d4bb36c
feat: update cam resource (#2220)
WeiMengXS Oct 16, 2023
28832be
refact(dnspod): refact code dnspod domain analytics
andrew-tx Oct 16, 2023
07ad91f
feat/kms (#2222)
SevenEarth Oct 16, 2023
1c7166d
feat/cam-role-permission-boundary (#2226)
WeiMengXS Oct 18, 2023
407209c
fix(dnspod): groupid parameter
andrew-tx Oct 18, 2023
90dca82
fix(dnspod): groupid parameter
andrew-tx Oct 18, 2023
010261e
fix(dnspod): groupid parameter
andrew-tx Oct 18, 2023
56b5b3f
refact(dnspod): remove parameter tag
andrew-tx Oct 18, 2023
9c10dab
Feat/cam account (#2225)
WeiMengXS Oct 18, 2023
4f7a2e8
feat(dnspod): support tags
andrew-tx Oct 18, 2023
dbd3d6e
add tke oidc (#2227)
hellertang Oct 18, 2023
c15faa0
feat(dnspod): support tags
andrew-tx Oct 18, 2023
1f07f8a
feat: organization (#2229)
WeiMengXS Oct 18, 2023
7c2bd6f
es resource (#2228)
tongyiming Oct 18, 2023
92c573a
Merge pull request #2218 from tencentcloudstack/dev/dnspod_datasource
tongyiming Oct 18, 2023
acae876
docs(dnspod): Add datasource of dnspod domain analytics
andrew-tx Oct 16, 2023
55abc4a
docs(dnspod): add changelog of datasource dnspod domain analytics
andrew-tx Oct 16, 2023
dc37663
refact(dnspod): fmt code
andrew-tx Oct 16, 2023
1d196d4
refact(dnspod): refact code dnspod domain analytics
andrew-tx Oct 16, 2023
5c8f800
refact(dnspod): remove parameter tag
andrew-tx Oct 18, 2023
b39d439
feat(dnspod): code conflict
andrew-tx Oct 18, 2023
845b615
feat(dnspod): e2e refact
andrew-tx Oct 18, 2023
f34328d
feat(dnspod): code conflict
andrew-tx Oct 18, 2023
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/2218.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-data-source
tencentcloud_dnspod_domain_list
```
11 changes: 11 additions & 0 deletions .changelog/2220.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
```release-note:new-resource
tencentcloud_cam_tag_role_attachment
```

```release-note:new-data-source
tencentcloud_cam_list_attached_user_policy
```

```release-note:enhancement
tencentcloud_ckafka_instance: Support api `UpdateRoleConsoleLogin`
```
3 changes: 3 additions & 0 deletions .changelog/2221.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-data-source
tencentcloud_dnspod_domain_analytics
```
19 changes: 19 additions & 0 deletions .changelog/2222.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```release-note:new-data-source
tencentcloud_kms_white_box_decrypt_key
```

```release-note:new-data-source
tencentcloud_kms_white_box_device_fingerprints
```

```release-note:new-data-source
tencentcloud_kms_list_algorithms
```

```release-note:new-resource
tencentcloud_kms_cloud_resource_attachment
```

```release-note:new-resource
tencentcloud_kms_overwrite_white_box_device_fingerprints
```
15 changes: 15 additions & 0 deletions .changelog/2225.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
```release-note:new-resource
tencentcloud_cam_set_policy_version_config
```

```release-note:new-data-source
tencentcloud_cam_account_summary
```

```release-note:new-data-source
tencentcloud_cam_policy_granting_service_access
```

```release-note:new-data-source
tencentcloud_cam_secret_last_used_time
```
3 changes: 3 additions & 0 deletions .changelog/2226.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
tencentcloud_cam_role_permission_boundary_attachment
```
7 changes: 7 additions & 0 deletions .changelog/2227.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
```release-note:enhancement
resource/tencentcloud_kubernetes_auth_attachment: Support OIDC config.
```

```release-note:new-data-source
tencentcloud_cam_oidc_config
```
19 changes: 19 additions & 0 deletions .changelog/2228.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
```release-note:new-resource
tencentcloud_elasticsearch_logstash
```

```release-note:new-resource
tencentcloud_elasticsearch_logstash_pipeline
```

```release-note:new-resource
tencentcloud_elasticsearch_restart_logstash_instance_operation
```

```release-note:new-resource
tencentcloud_elasticsearch_start_logstash_pipeline_operation
```

```release-note:new-resource
tencentcloud_elasticsearch_stop_logstash_pipeline_operation
```
3 changes: 3 additions & 0 deletions .changelog/2229.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
```release-note:new-resource
tencentcloud_organization_quit_organization_operation
```
6 changes: 3 additions & 3 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/clb v1.0.693
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cloudaudit v1.0.544
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cls v1.0.711
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.763
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.765
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.624
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cynosdb v1.0.692
Expand All @@ -54,12 +54,12 @@ require (
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dc v1.0.633
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dcdb v1.0.673
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dlc v1.0.726
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.539
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.765
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/domain v1.0.414
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dts v1.0.628
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/eb v1.0.760
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr v1.0.762
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es v1.0.699
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es v1.0.762
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap v1.0.760
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/lighthouse v1.0.729
Expand Down
9 changes: 9 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -860,9 +860,14 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.756/go.mod
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.758/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.759/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.760/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.761 h1:b1f43YFT8Hp9XUgQ2jc89O3vQBP76bQtHfHqaYCQfxk=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.761/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.762 h1:ixDQofTbSDKpIwNI+yUgEUrUBH18m2Jb+ZQjFnTnAcU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.762/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.763 h1:N+/GDFRlTSgufNGIotPcPRe1+tF0H94K0z11cleqhDg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.763/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.765 h1:Du0gzA7g0eBDbw8bxBqecm8eSuJacWSkjBCI2Lc3ry8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.765/go.mod h1:7sCQWVkxcsR38nffDW057DRGk8mUjK1Ing/EFOK8s8Y=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.624 h1:nEZqsoqt1pEoaP9JjkHQy3/H00suCfzlHW1qOm2nYD8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cvm v1.0.624/go.mod h1:+TXSVyeKwt1IhZRqKPbTREteBcP+K07Q846/ilNzLWA=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cwp v1.0.762 h1:2egy69SP/wPsmnfozcQVZ6tUY6F6N/TpEe/7xtXrc/8=
Expand All @@ -881,6 +886,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dlc v1.0.726 h1:oedM2Jw
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dlc v1.0.726/go.mod h1:zwU0EY443AsQt95XFgnzT1GbldP/CahRchSM0oo1xX8=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.539 h1:V+oo20w9aLxAoSSEGVplke2kq72MdUA4OuagCv4gsiY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.539/go.mod h1:gtPd3Hy8DA/4EErHNJliWeJB1sxZ9DhqenWiYZ3PF6g=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.765 h1:46VxMLFcM3mWr+GdOHmMCXsQM8Mle7pOip1z2RWmubU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dnspod v1.0.765/go.mod h1:EYfCXcZvLWidtpSNYsR2pvrBCUmOza39kox80Ud6PZg=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/domain v1.0.414 h1:egwjvOEUKBaxsoRVn/YSEhp2E8qdh77Ous9A/wftDo0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/domain v1.0.414/go.mod h1:LRWnBUNRxs/Ee8MzJJd3eHzydlqyB5qmia975Ca/Ox0=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/dts v1.0.628 h1:cnhe9uh8tSyBfiPUckfqNI6t51YNZG9POupTrqWG9lM=
Expand All @@ -891,6 +898,8 @@ github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr v1.0.762 h1:P5F8iay
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/emr v1.0.762/go.mod h1:8RFnUUZiVWlGt55IF+Bkw0bNoPxmvgMS7uxuGBNrsYA=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es v1.0.699 h1:7lFObucmWErYOh+5/AzpgerUAFoO72XqhXrAzFltTIo=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es v1.0.699/go.mod h1:Iq+JZDHZlYu/dcmpT48SLFESqxL+C9GjRKrQHcw+FjQ=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es v1.0.762 h1:wMEstAZSsYiJt8VhqTYI4ruHlsR/kGM7of/k1hvMc+E=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/es v1.0.762/go.mod h1:sLciuxT00FNMrcosjHG/iV6ApXnsY1kx+9B+oicr3qY=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap v1.0.760 h1:Fs6q2kYxWAZPbeAs8t5edzhRX7iiyXvHR0qaCHMZgDU=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/gaap v1.0.760/go.mod h1:yVviYUc0zcxhibofZpMTIUGh4wCgya9derdkIVlUQLo=
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/kms v1.0.563 h1:FoX+MK4vHThvPO6FbP5q98zD8S3n+d5+DbtK7skl++c=
Expand Down
5 changes: 5 additions & 0 deletions tencentcloud/basic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1097,6 +1097,7 @@ variable "cert_id" {
const (
defaultEsInstanceId = "es-5wn36he6"
defaultEsSecurityGroup = "sg-edmur627"
defaultEsLogstash = "ls-kru90fkz"
)

const DefaultEsVariables = `
Expand All @@ -1107,6 +1108,10 @@ variable "instance_id" {
variable "security_group_id" {
default = "` + defaultEsSecurityGroup + `"
}

variable "logstash_id" {
default = "` + defaultEsLogstash + `"
}
`

// End of TSE
Expand Down
131 changes: 131 additions & 0 deletions tencentcloud/data_source_tc_cam_account_summary.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,131 @@
/*
Use this data source to query detailed information of cam account_summary

Example Usage

```hcl
data "tencentcloud_cam_account_summary" "account_summary" {
}
```
*/
package tencentcloud

import (
"context"

"github.com/hashicorp/terraform-plugin-sdk/v2/helper/resource"
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
cam "github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/cam/v20190116"
"github.com/tencentcloudstack/terraform-provider-tencentcloud/tencentcloud/internal/helper"
)

func dataSourceTencentCloudCamAccountSummary() *schema.Resource {
return &schema.Resource{
Read: dataSourceTencentCloudCamAccountSummaryRead,
Schema: map[string]*schema.Schema{
"policies": {
Computed: true,
Type: schema.TypeInt,
Description: "The number of policy.",
},

"roles": {
Computed: true,
Type: schema.TypeInt,
Description: "The number of role.",
},

"user": {
Computed: true,
Type: schema.TypeInt,
Description: "The number of Sub-user.",
},

"group": {
Computed: true,
Type: schema.TypeInt,
Description: "The number of Group.",
},

"member": {
Computed: true,
Type: schema.TypeInt,
Description: "The number of grouped users.",
},

"identity_providers": {
Computed: true,
Type: schema.TypeInt,
Description: "The number of identity provider.",
},

"result_output_file": {
Type: schema.TypeString,
Optional: true,
Description: "Used to save results.",
},
},
}
}

func dataSourceTencentCloudCamAccountSummaryRead(d *schema.ResourceData, meta interface{}) error {
defer logElapsed("data_source.tencentcloud_cam_account_summary.read")()
defer inconsistentCheck(d, meta)()

logId := getLogId(contextNil)

ctx := context.WithValue(context.TODO(), logIdKey, logId)

service := CamService{client: meta.(*TencentCloudClient).apiV3Conn}
AccountData := &cam.GetAccountSummaryResponseParams{}
err := resource.Retry(readRetryTimeout, func() *resource.RetryError {
result, e := service.DescribeCamAccountSummaryByFilter(ctx)
if e != nil {
return retryError(e)
}
AccountData = result
return nil
})
if err != nil {
return err
}
template := make(map[string]interface{}, 0)

if AccountData.Policies != nil {
_ = d.Set("policies", AccountData.Policies)
template["policies"] = AccountData.Policies
}

if AccountData.Roles != nil {
_ = d.Set("roles", AccountData.Roles)
template["roles"] = AccountData.Roles
}

if AccountData.User != nil {
_ = d.Set("user", AccountData.User)
template["user"] = AccountData.User
}

if AccountData.Group != nil {
_ = d.Set("group", AccountData.Group)
template["group"] = AccountData.Group
}

if AccountData.Member != nil {
_ = d.Set("member", AccountData.Member)
template["member"] = AccountData.Member
}

if AccountData.IdentityProviders != nil {
_ = d.Set("identity_providers", AccountData.IdentityProviders)
template["identity_providers"] = AccountData.IdentityProviders
}
d.SetId(helper.BuildToken())
output, ok := d.GetOk("result_output_file")
if ok && output.(string) != "" {
if e := writeToFile(output.(string), template); e != nil {
return e
}
}
return nil
}
30 changes: 30 additions & 0 deletions tencentcloud/data_source_tc_cam_account_summary_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
package tencentcloud

import (
"testing"

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

func TestAccTencentCloudCamAccountSummaryDataSource_basic(t *testing.T) {
t.Parallel()
resource.Test(t, resource.TestCase{
PreCheck: func() {
testAccPreCheck(t)
},
Providers: testAccProviders,
Steps: []resource.TestStep{
{
Config: testAccCamAccountSummaryDataSource,
Check: resource.ComposeTestCheckFunc(testAccCheckTencentCloudDataSourceID("data.tencentcloud_cam_account_summary.account_summary")),
},
},
})
}

const testAccCamAccountSummaryDataSource = `

data "tencentcloud_cam_account_summary" "account_summary" {
}

`
Loading