You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When importing an existing opensearch index, the captured/imported terraform state doesn't include any indices, which results in a plan/apply for the imported opensearch_index resource replacing the already created index because the alias isn't captured.
How can one reproduce the bug?
Perform a terraform import opensearch_index.my-example-index-v1 my-example-index-v1
Perform a terraform show state opensearch_index.my-example-index-v1.
Look at the output and see that the aliases block is missing for my index with an alias of my-example-index when it's created and shows up in the Opensearch Kibana.
What is the expected behavior?
Performing a terraform import should import any aliases that already exist for opensearch indices.
Output of a terraform show state after performing a terraform import should look like this
Hey @thejettanderson AFAIK this PR i have created #212 should fix the issue. The logic is added to the PR to update the index alias. More details #85 (comment).
What is the bug?
When importing an existing opensearch index, the captured/imported terraform state doesn't include any indices, which results in a plan/apply for the imported opensearch_index resource replacing the already created index because the alias isn't captured.
How can one reproduce the bug?
Perform a
terraform import opensearch_index.my-example-index-v1 my-example-index-v1
Perform a
terraform show state opensearch_index.my-example-index-v1
.Look at the output and see that the
aliases
block is missing for my index with an alias ofmy-example-index
when it's created and shows up in the Opensearch Kibana.What is the expected behavior?
Performing a terraform import should import any aliases that already exist for opensearch indices.
Output of a
terraform show state
after performing aterraform import
should look like thisbut instead performing a
terraform show state opensearch_index.my-example-index-v1
gives this:resulting in a terraform apply replacing the existing index even though the
my-example-index
alias already exists for the index.What is your host/environment?
Docker/k8s, ubuntu base image.
Do you have any additional context?
Add any other context about the problem.
The text was updated successfully, but these errors were encountered: