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

Add import for index mappings #145

Merged

Conversation

rblcoder
Copy link
Collaborator

Description

Implement import of index mappings

Issues Resolved

#135 #71

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Rupa Lahiri <[email protected]>
@rblcoder
Copy link
Collaborator Author

Hi @prudhvigodithi , please review this PR.

@prudhvigodithi
Copy link
Member

Hey @rblcoder thanks for your contribution, one question I have is since this logic is added to the resourceOpensearchIndexRead function is behaviour to 1st read the existing mapping and continue them with next terraform apply operations ? When I import the mappings which will be stored in StateContext with this code change in resourceOpensearchIndexRead does it read the imported mappings and continue with terraform apply operation?

Thank you

@rblcoder
Copy link
Collaborator Author

@prudhvigodithi The read function is now able to read the mappings attribute from the underlying infrastructure.
I have tested by removing the resource from state. Then imported it using the import command. The state file is getting updated successfully with the mappings information. Post this, I am able to run and continue with apply.

@prudhvigodithi
Copy link
Member

Thanks @rblcoder, LGTM.
@bbarani @peterzhuamazon @phillbaker

@prudhvigodithi prudhvigodithi merged commit 1c27b66 into opensearch-project:main Jan 13, 2024
5 checks passed
jmaitrehenry pushed a commit to jmaitrehenry/terraform-provider-opensearch that referenced this pull request Jan 23, 2024
* Add import for index mappings

Signed-off-by: Rupa Lahiri <[email protected]>

* Format json using terrafmt

Signed-off-by: Rupa Lahiri <[email protected]>

---------

Signed-off-by: Rupa Lahiri <[email protected]>
@xsnrg
Copy link

xsnrg commented Jan 30, 2024

@rblcoder Thank you. @prudhvigodithi any chance of getting a new release created with this 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 this pull request may close these issues.

3 participants