Skip to content
New issue

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

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

Already on GitHub? # to your account

feat(provider): migrate to dedicated OpenSearch provider #59

Merged
merged 2 commits into from
Dec 5, 2023

Conversation

steveteuber
Copy link
Member

This pull request migrates all resources to the new dedicated provider for OpenSearch. Fixes #53.

BREAKING CHANGE: All `elasticsearch_*` resources have been renamed to `opensearch_*`.
@steveteuber steveteuber requested a review from smlgbl as a code owner December 4, 2023 14:19
@steveteuber
Copy link
Member Author

Unfortunately, terraform state mv and moved blocks are not working.
All affected elasticsearch_* resources must be migrated manually after the upgrade...

terraform state pull > elasticsearch-provider.tfstate
jq '.resources[].type |= sub("^elasticsearch_(opensearch_)?"; "opensearch_")' elasticsearch-provider.tfstate > opensearch-provider.tfstate
terraform state replace-provider -state=opensearch-provider.tfstate -auto-approve phillbaker/elasticsearch opensearch-project/opensearch
terraform state push opensearch-provider.tfstate

Additionally, you have to migrate all legacy index templates to the new format. Actually the aliases, mappings, and settings configs are now nested underneath template: https://opensearch.org/docs/latest/im-plugin/index-templates/

@steveteuber steveteuber merged commit 0388438 into main Dec 5, 2023
1 check passed
Copy link
Contributor

github-actions bot commented Dec 5, 2023

🎉 This PR is included in version 2.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@steveteuber steveteuber deleted the provider branch December 5, 2023 10:31
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] Add support for OpenSearch v2 and the new dedicated provider
1 participant