Skip to content

[terraform-ibm-landing-zone] Retention Policy for COS Buckets. #978

@Xallarap

Description

@Xallarap

Description

IBM Cloud for Financial Services requires a Retention Policy to be set for all buckets containing log data.

While IBM Terraform Module "ibm_cos_bucket" provides the parameters for this, the Landing Zone "cos.tf" file does not provide it.
See retention rule in:
https://registry.terraform.io/providers/IBM-Cloud/ibm/latest/docs/resources/cos_bucket

Affected modules

https://github.com/terraform-ibm-modules/terraform-ibm-landing-zone/blob/main/cos.tf

The logic in "cos.tf" needs to be enhanced to support the following example snippet from the ibm_cos_bucket

### Configure retention rule on COS bucket

resource "ibm_cos_bucket" "retention_cos" {
  bucket_name          = "a-bucket-retention"
  resource_instance_id = ibm_resource_instance.cos_instance.id
  region_location      = "jp-tok"
  storage_class        = standard
  hard_quota           = 1024
  force_delete        = true
  retention_rule {
    default = 1
    maximum = 1
    minimum = 1
    permanent = false
  }
}


By submitting this issue, you agree to follow our Code of Conduct

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions