Skip to content

Commit 8a11ad7

Browse files
authored
fix(cos): [122768427] tencentcloud_cos_buckets Fix the issue of query errors (#3287)
* add * add
1 parent cc59624 commit 8a11ad7

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

Diff for: .changelog/3287.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
```release-note:enhancement
2+
datasource/tencentcloud_cos_buckets: Fix the issue of query errors
3+
```

Diff for: tencentcloud/services/cos/data_source_tc_cos_buckets.go

+2-5
Original file line numberDiff line numberDiff line change
@@ -261,11 +261,8 @@ func DataSourceTencentCloudCosBuckets() *schema.Resource {
261261
// Description: "",
262262
//},
263263
"follow_http_headers": {
264-
Type: schema.TypeSet,
265-
Optional: true,
266-
Set: func(i interface{}) int {
267-
return helper.HashString(i.(string))
268-
},
264+
Type: schema.TypeList,
265+
Optional: true,
269266
Description: "Specifies the pass through headers when accessing the origin server.",
270267
Elem: &schema.Schema{Type: schema.TypeString},
271268
},

Diff for: tencentcloud/services/cos/service_tencentcloud_cos.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -1339,7 +1339,7 @@ func (me *CosService) GetBucketPullOrigin(ctx context.Context, bucket string) (r
13391339
for _, header := range rule.OriginParameter.HttpHeader.FollowHttpHeaders {
13401340
headers.Add(header.Key)
13411341
}
1342-
item["follow_http_headers"] = headers
1342+
item["follow_http_headers"] = headers.List()
13431343
}
13441344

13451345
}

0 commit comments

Comments
 (0)