Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import of existing S3 bucket fails #564

Closed
steschuser opened this issue May 28, 2024 · 4 comments
Closed

Import of existing S3 bucket fails #564

steschuser opened this issue May 28, 2024 · 4 comments
Labels

Comments

@steschuser
Copy link

Description

Trying to import an existing bucket fails

Steps to Reproduce

  1. create a bucket outside of terraform
> mc mb juice/foo
Bucket created successfully `juice/foo`.
  1. generate minimal terraform config
# Import Test
resource "minio_s3_bucket" "foo" {
}
  1. try to import
> terraform import minio_s3_bucket.foo foo
minio_s3_bucket.foo: Importing from ID "foo"...
╷
│ Error: error importing Minio S3 bucket policy: The specified bucket does not exist.
│

Expected behavior:
a successfull import :)

Actual behavior:
Throws "bucket does not exist"

Reproduces how often: 100%

Versions

Terraform v1.8.4
on linux_amd64

  • provider registry.terraform.io/aminueza/minio v2.2.1

MinIO VERSION
2024-04-18T19:09:19Z

@steschuser
Copy link
Author

any love?

@lorenzofelletti
Copy link
Contributor

I tried to reproduce your issue on my setup and didn't have any issue.

My code:

resource "minio_s3_bucket" "test" {
  bucket = "test"
}

Command I run: terraform import -var-file="dev.tfvars" 'minio_s3_bucket.test' 'test' (quoting is important when running terraform imports to avoid unexpected behaviour)

Also, your error seems to refer to a S3 bucket policy, not a bucket:
│ Error: error importing Minio S3 bucket policy: The specified bucket does not exist.

Copy link

This issue has been automatically marked as stale due to inactivity. It will be closed in 7 days if no further activity occurs. Please comment or remove the stale label to keep it open.

@github-actions github-actions bot added the stale label Feb 15, 2025
Copy link

This issue has been closed due to prolonged inactivity. Feel free to reopen if you need more information or further assistance.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Feb 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants