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

[BUG] 2.0 beta cannot import index template - not found - still happening in 2.2.1 #67

Open
xsnrg opened this issue Aug 14, 2023 · 7 comments
Labels
bug Something isn't working

Comments

@xsnrg
Copy link

xsnrg commented Aug 14, 2023

What is the bug?

terraform cannot import index template - not found

How can one reproduce the bug?

Create an index template in some way. In this case I create an index template with an older provider. Switch to the new provider and try to import, and it is not able to find the index.

What is the expected behavior?

The index template should import from the existing configuration by name

What is your host/environment?

MacOS for the terraform client, Server cluster is AWS Opensearch 2.7

Do you have any screenshots?

GET _cat/templates - shows the templates
GET _index_template/* - does not show templates

Do you have any additional context?

The cluster is running in compatibility mode, and the index template API may have changed between the provider that created the template and the one trying to import it. The console shows the index template though, so the new provider should be able to find it and import it.

@xsnrg xsnrg added bug Something isn't working untriaged labels Aug 14, 2023
@zelinh
Copy link
Member

zelinh commented Aug 17, 2023

[Triage] @prudhvigodithi @phillbaker Could you help look into this issue as well? Thanks!

@zelinh zelinh removed the untriaged label Aug 17, 2023
@prudhvigodithi
Copy link
Member

Related Similar issue #71
Closing this, @xsnrg please re-open if required.
Adding @phillbaker @david-alpert-nl @bbarani @peterzhuamazon

@xsnrg xsnrg changed the title [BUG] 2.0 beta cannot import index template - not found [BUG] 2.0 beta cannot import index template - not found - still happening in 2.1 Apr 4, 2024
@xsnrg
Copy link
Author

xsnrg commented Apr 4, 2024

This is still happening, and I do not seem to have the ability to re-open.

@xsnrg
Copy link
Author

xsnrg commented Apr 4, 2024

terraform import module.es-indexes.opensearch_index_template.app app
Running (inside redacted):
module.es-indexes.data.aws_opensearch_domain.domain: Reading...
module.es-indexes.data.aws_opensearch_domain.domain: Read complete after 1s [redacted]
module.es-indexes.opensearch_index_template.app: Importing from ID "app"...
module.es-indexes.opensearch_index_template.app: Import prepared!
Prepared opensearch_index_template for import
module.es-indexes.opensearch_index_template.app: Refreshing state... [id=app]

│ Error: Cannot import non-existent remote object

│ While attempting to import an existing object to "module.es-indexes.opensearch_index_template.app", 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.

$ curl -H GET https://[URL]/_template/app
{"app":{"order":10,"index_patterns":["app-*"],"settings":{"index":{"refresh_interval":"5s"}},"mappings":{"dynamic":"false","properties":{"exception":{"type":"text","fields":{"keyword":{"ignore_ab......

@xsnrg xsnrg changed the title [BUG] 2.0 beta cannot import index template - not found - still happening in 2.1 [BUG] 2.0 beta cannot import index template - not found - still happening in 2.2.1 Apr 4, 2024
@xsnrg
Copy link
Author

xsnrg commented Apr 4, 2024

@prudhvigodithi - Are you able to re-open?

@prudhvigodithi
Copy link
Member

Sure @xsnrg,
Adding @getsaurabh02

@dblock
Copy link
Member

dblock commented Jul 29, 2024

[Catch All Triage - 1, 2]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants