Skip to content

lifecycle_configuration with newer_noncurrent_versions throws an error #28

@rwunderer

Description

@rwunderer

Trying to apply the following objsto_bucket_lifecycle_configuration throws an error:

resource "objsto_bucket_lifecycle_configuration" "main" {
  bucket = objsto_bucket.main.bucket

  rule {
    id = "Expire non-current versions after 1 year"

    filter {
      prefix = ""
    }

    noncurrent_version_expiration {
      newer_noncurrent_versions = 3
    }
  }
}

the error thrown is:

│ Error: Unable to create bucket lifecycle configuration
│ 
│   with module.object_storage_mirror["caprisys-gitlab-registry"].objsto_bucket_lifecycle_configuration.main,
│   on ../../modules/upcloud/mirror_target_bucket/main.tf line 13, in resource "objsto_bucket_lifecycle_configuration" "main":
│   13: resource "objsto_bucket_lifecycle_configuration" "main" {
│ 
│ operation error S3: PutBucketLifecycleConfiguration, https response error StatusCode: 400, RequestID: 647e0208:19690c66cf3:2112b0:34e09, HostID: , api error
│ MalformedXML: The XML you provided was not well-formed or did not validate against our published schema.

When I replace newer_noncurrent_versions = 3 with a time constraint, eg noncurrent_days = 365 everything works as expected

Provider version: 0.2.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions