Skip to content

Importing Bucket from eu-central-4 is not working. #921

@smoebody

Description

@smoebody

Description

Importing a bucket resource from eu-central-4 is not possible.

Expected behavior

To properly import a bucket resource from eu-central-4

Environment

Terraform Opentofu version:

OpenTofu v1.10.7

Provider version:

+ provider registry.opentofu.org/ionos-cloud/ionoscloud v6.7.22

OS:

linux_amd64

Configuration Files

IONOS_USERNAME=<redacted>
IONOS_PASSWORD=<redacted>
IONOS_S3_ACCESS_KEY=<redacted>
IONOS_S3_SECRET_KEY=<redacted>

main.tf:

import {
  to = ionoscloud_s3_bucket.example-bucket
  id = "my-example-bucket"
}

resource "ionoscloud_s3_bucket" "example-bucket" {
  name                = "example-bucket"
  region              = "eu-central-4"
  object_lock_enabled = false
  force_destroy       = false
}

How to Reproduce

Steps to reproduce the behavior:

  1. create bucket in eu-central-4
  2. create main.tf as above
  3. Execute tofu plan or `tofu import s3_bucket.example-bucket my-example-bucket
  4. Observe the error message

Error and Debug Output

$ tofu plan
ionoscloud_s3_bucket.example-bucket Preparing import... [id=my-example-bucket]
ionoscloud_s3_bucket.example-bucket: Refreshing state...

Planning failed. OpenTofu encountered an error while generating this plan.

╷
│ Error: Bucket API error
│ 
│ failed to get bucket: Head "https://s3.eu-central-3.ionoscloud.com/my-example-bucket": stopped after 10 redirects
╵

Additional Notes

Of course i replaced the bucket names with generic ones.

References

Might be related to #888

Metadata

Metadata

Assignees

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