Skip to content

Issues with storage bucket #1369

@Chilinot

Description

@Chilinot

Description

It seems the opentofu stackit provider version v0.90.0 is not in sync with the stackit API. The provider expects an API call to objectstorage to return a value that is not part of the response body.

Steps to reproduce

  1. Using Opentofu + Stackit provider version v0.90.0.
  2. Use the following tofu/terraform code to manage a pre-existing bucket:
resource "stackit_objectstorage_bucket" "asdf" {
  project_id = "<projectid>"
  name       = "<bucketname>"
  region     = "eu02"
}
  1. Then run tofu, and you will get this error:
╷
  │ Error: Error reading bucket
  │ 
  │   with stackit_objectstorage_bucket.eu02,
  │   on bucket.tf line 1, in resource "stackit_objectstorage_bucket" "eu02":
  │    1: resource "stackit_objectstorage_bucket" "eu02" {
  │ 
  │ Calling API: no value given for required property objectLockEnabled, status
  │ code 200, Body:
  │ {"project":"x-x-x-x-x","bucket":{"name":"<bucketname>","region":"eu02","urlPathStyle":"https://object.storage.eu02.onstackit.cloud/<bucketname>","urlVirtualHostedStyle":"https://<bucketname>.object.storage.eu02.onstackit.cloud"}}
  │

Expected behavior

We expect the bucket to be unchanged. This bucket was setup a couple of months ago with the same code. Now we re-ran that code and got this issue.

Environment

  • Opentofu version 1.11.3
  • Stackit provider version v0.90.0

Additional information

Feel free to add any additional information here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions