Skip to content

tencentcloud_cos_bucket has a bug when use on cdc and encryption_algorithm is set for cos/kms, terraform do not find that resource was already changed to use this algorithm #3197

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

Open
andre1704 opened this issue Mar 9, 2025 · 0 comments

Comments

@andre1704
Copy link

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or "me too" comments, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment

Terraform Version

terraform version
Terraform v1.11.1
on linux_amd64

  • provider registry.terraform.io/tencentcloudstack/tencentcloud v1.81.164

Affected Resource(s)

tencentcloud_cos_bucket

Terraform Configuration Files

terraform {
  required_version = ">= 1.11.1"
  backend "cos" {}

  required_providers {
    tencentcloud = {
      source  = "tencentcloudstack/tencentcloud"
      version = ">1.18.120"
    }
  }
}

provider "tencentcloud" {
  region     = var.source_region
  cos_domain = var.cos_cdc_domain
}





resource "tencentcloud_cos_bucket" "source_s3" {
  bucket               = var.bucket_name
  acl                  = var.acl
  encryption_algorithm = var.encryption_algorithm
  versioning_enable    = true
}



variable "encryption_algorithm" {
  type        = string
  default     = "cos/kms"
  description = "tencent cloud cos encryption algorithm."
}


variable "acl" {
  type        = string
  default     = "private"
  description = "tencent cloud cos acl setting"
}

variable "bucket_name" {
  type        = string
}

Debug Output

Panic Output

Expected Behavior

For cdc cluster on tencent we should be able to create a cos bucket and the bucket should have been encrypted according to the provided setting (cos/kms)

Actual Behavior

A bucket has been created, and even settings for encryption on tencent are set, but when we are doing after applying those changes once more terraform plan or apply then terraform plan shows that it want once again to change encryption even it was set

~ resource "tencentcloud_cos_bucket" "source_s3" {                                                                                                      
 ~ encryption_algorithm = "aws:kms" -> "cos/kms"  

it looks like foe encryption type cos/kms terraform does not properly recognize that it has been changed already.

Steps to Reproduce

You need to have access to the cdc cluster so it could be possible to reproduce, but if you have then you need to do

  1. terraform apply
  2. once again terraform apply

so you could see that terraform do not recognize that encryption has been already changed to cos/kms

Important Factoids

References

  • #0000
@andre1704 andre1704 changed the title tencentcloud_cos_bucket has a bug when use on cdc and encryption_algorithm is set for cos/kms, terraform do not find that resource was already changed to use this lgorithm tencentcloud_cos_bucket has a bug when use on cdc and encryption_algorithm is set for cos/kms, terraform do not find that resource was already changed to use this algorithm Mar 9, 2025
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

No branches or pull requests

1 participant