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

Normalize JSON when doing comparison for mappings, etc. #362

Open
subsetpark opened this issue Nov 30, 2023 · 0 comments
Open

Normalize JSON when doing comparison for mappings, etc. #362

subsetpark opened this issue Nov 30, 2023 · 0 comments

Comments

@subsetpark
Copy link
Contributor

Here's a TF plan that I'm currently getting:

  # module.es-prod-22-search.elasticsearch_index.block[1] must be replaced
-/+ resource "elasticsearch_index" "block" {
     ...
      ~ id                                     = "block-deleted-1" -> (known after apply)
      ~ mappings                               = jsonencode( # whitespace changes force replacement
            {
                _routing   = {
                    required = true
                }
...

That is, it suggests that even though the json value of my index mappings hasn't changed at all, the whitespace that I input is not identical to the whitespace in the ES cluster.

I've done some googling about this, and most reports seem to say something like "it's the responsibility of the provider" to ignore whitespace when comparing to the value on the state.

Some citations:

Is this somethat that can be fixed in this provider? Because of this spurious change, we're not able to make any live changes to our cluster.

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

No branches or pull requests

1 participant