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 minio_ilm_tier resource #578

Closed
george-zubrienko opened this issue Aug 10, 2024 · 1 comment · Fixed by #579
Closed

Import minio_ilm_tier resource #578

george-zubrienko opened this issue Aug 10, 2024 · 1 comment · Fixed by #579

Comments

@george-zubrienko
Copy link

Description

Import of minio_ilm_tier fails with resource not found, while resource id seems to be equal to tier name.

Steps to Reproduce

  1. Create an ILM tier (s3) through tenant UI, name IA_COLD_STORAGE
  2. atlantis/terraform import -d ... -w .. 'minio_ilm_tier.s3' 'IA_COLD_STORAGE'

Expected behavior: Successful import

Actual behavior:

minio_ilm_tier.s3: Importing from ID "IA_COLD_STORAGE"...
minio_ilm_tier.s3: Import prepared!
  Prepared minio_ilm_tier for import
minio_ilm_tier.s3: Refreshing state... [id=IA_COLD_STORAGE]
╷
│ Error: Cannot import non-existent remote object
│ 
│ While attempting to import an existing object to "minio_ilm_tier.s3", the
│ provider detected that no object exists with the given id. Only
│ pre-existing objects can be imported; check that the id is correct and that
│ it is associated with the provider's configured region or endpoint, or use
│ "terraform apply" to create a new remote object for this resource.
╵

Reproduces how often: I haven't found a workaround :(

On read, id is set to tier name, but import doesn't like that for some reason:

https://github.com/aminueza/terraform-provider-minio/blob/main/minio/resource_minio_ilm_tier.go#L284

Versions

2.4.2

@george-zubrienko
Copy link
Author

@s-vitaliy fyi - maybe you or Adelina can quick fix

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant