phillbaker / terraform-provider-elasticsearch

An elasticsearch provider for terraform
https://registry.terraform.io/providers/phillbaker/elasticsearch
Mozilla Public License 2.0
306 stars 134 forks source link

[BUG] Problem when importing multiple elasticsearch_snapshot_repository ressources in same workspace #364

Open ChrisFraun opened 9 months ago

ChrisFraun commented 9 months ago

I didn't dig too deep into this issue, so there is also a chance that I simply used the wrong command. My setup is the following I have one workspace where I manage two Opensearch clusters. My task is basically moving the configuration and module from A to B. However, I was not able to successfulle import any of the aws_elasticsearch_domain_policy with: terraform import aws_elasticsearch_domain_policy.example domain_name as indicated in https://github.com/hashicorp/terraform-provider-aws/issues/22691

Also I was not able to differentiate between the two snapshot repository configurations: terraform import 'module.opensearch-A.elasticsearch_snapshot_repository.repo[0]' 's3-name' and terraform import 'module.opensearch-B.elasticsearch_snapshot_repository.repo[0]' 's3-name' resulted in having the same snapshot repository imported instead of separate ones. I found no way to differentiate between the two ressources.

The same happened to role mappings.

Probably I missed something but I would be greatful for any advice,

Thanks!