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

COS buckets allow modifying key_protect after creation, but they should not #2310

Closed
kjoconnor opened this issue Mar 4, 2021 · 2 comments
Closed
Labels
service/Object Storage Issues related to Cloud Object Storage

Comments

@kjoconnor
Copy link

Terraform Version

Terraform v0.12.29
IBM Cloud Plugin v1.13.1

Affected Resource(s)

  • ibm_cos_bucket

Terraform Configuration Files

First:

resource ibm_cos_bucket my_bucket {
  name = "my-bucket"
  ...
}
```hcl
resource ibm_cos_bucket my_bucket {
  name = "my-bucket"
  key_protect = "key-id"
  ...
}

Expected Behavior

When the bucket is first created without key_protect and then later key_protect is added, it should tell you it needs to recreate the bucket. The IBM Cloud console says you can only add key protection when the bucket is created:

image

More here: https://cloud.ibm.com/docs/cloud-object-storage?topic=cloud-object-storage-encryption#encryption-kp

Actual Behavior

It applies successfully, but in the console no key protection is added, and the terraform state does not actually show the supposed new key_protect attribute.

Steps to Reproduce

  1. Use the first hcl above to create the bucket.
  2. Modify the hcl to include a valid reference to a KMS key.
  3. Plan and apply again - it should work just fine but this isn't actually valid.
@kavya498 kavya498 added the service/Object Storage Issues related to Cloud Object Storage label Mar 30, 2021
@kavya498
Copy link
Collaborator

Available in latest 1.22.0

@kavya498
Copy link
Collaborator

Closing this issue..
thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service/Object Storage Issues related to Cloud Object Storage
Projects
None yet
Development

No branches or pull requests

2 participants