Skip to content

feat(cos): [000000000] support status and tags in bucket lifecycle rules - #4397

Open
tao1020 wants to merge 3 commits into
tencentcloudstack:masterfrom
pingkaicloud:feat/cos-bucket-lifecycle-status-tags
Open

feat(cos): [000000000] support status and tags in bucket lifecycle rules#4397
tao1020 wants to merge 3 commits into
tencentcloudstack:masterfrom
pingkaicloud:feat/cos-bucket-lifecycle-status-tags

Conversation

@tao1020

@tao1020 tao1020 commented Aug 7, 2026

Copy link
Copy Markdown

What

Add status and filter_tags support to tencentcloud_cos_bucket.lifecycle_rules, including read/flatten support for the bucket resource and tencentcloud_cos_buckets data source.

Why

Tencent Cloud COS lifecycle rules support Enabled/Disabled status and tag filters, including prefix-plus-tags and multiple-tag AND filters. The provider previously hard-coded every rule to Enabled and exposed only filter_prefix, so these API capabilities could not be configured or preserved in Terraform state.

Type of change

  • Modification to an existing resource / data source
  • Bug fix

Validation

  • env -u GOOS -u GOARCH go test ./tencentcloud/services/cos -count=1
  • env -u GOOS -u GOARCH go test -v ./tencentcloud -run TestProvider -count=1
  • env -u GOOS -u GOARCH make build
  • env -u GOOS -u GOARCH make check-mux
  • Acceptance coverage updated for resource and data source
  • Website docs regenerated
  • No go.mod changes
  • make lint unavailable locally because golangci-lint is not installed
  • Full make test is blocked by unrelated existing failures in gendoc, common, bh, cam, and cbs; the changed COS package passes

Notes for reviewers

  • Backward compatible: status defaults to Enabled, matching the previous hard-coded behavior.
  • A single tag without a prefix uses Filter.Tag; multiple tags or prefix-plus-tags use Filter.And. Tags are sorted for deterministic requests.
  • filter_tags validates the COS maximum of 10 tags and key/value byte limits.
  • Plan and apply reject filter_tags with abort_incomplete_multipart_upload in the same lifecycle rule, as COS does not support that combination.

@tao1020 tao1020 changed the title feat(cos): support status and tags in bucket lifecycle rules feat(cos): [000000000] support status and tags in bucket lifecycle rules Aug 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant