Skip to content

Object Storage: Activate Versioning via Terraform #1048

@alexrothgit

Description

@alexrothgit

Problem description

Currently it is not possible to activate Versioning for an Object Storage bucket via Terraform.
As I understand, it is necessary to use the command line tool s5cmd (which is working fine) but as it is outside of Terraform and therefore outside of the statefile, it is not perfekt for us.

Proposed solution

Possibility to enable versioning in the terraform module for object storage or an extra module.

Example:

resource "stackit_objectstorage_bucket" "example" {
  project_id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
  name       = "example-bucket"
  versioning_enabled = true 
  version_retention_days = 15
}

Additional information

Additionally it would be good, to set the retention of the versions preferably (at least) in days and/or a max. number of versions. That would help to control the storage costs.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions