We just upgraded to Terraform 0.7 and it seems that the handling of boolean values has changed. We are using Terraform to manage an aws_elasticsearch_domain resource and our configuration looks like this:
resource "aws_elasticsearch_domain" "test" {
domain_name = "REDACTED"
access_policies = "${template_file.elasticsearch_policy.rendered}"
advanced_options {
"indices.fielddata.cache.size" = 40
"rest.action.multi.allow_explicit_index" = true
}
# ...
}
Upgrading to Terraform 0.7 broke our Elasticsearch configuration because terraform apply produces the following change:
~ aws_elasticsearch_domain.REDACTED
advanced_options.rest.action.multi.allow_explicit_index: "true" => "1"
This ended up setting rest.action.multi.allow_explicit_index to false when we viewed the value in the AWS console.
As a workaround, changing "rest.action.multi.allow_explicit_index" = true to "rest.action.multi.allow_explicit_index" = "true" seems to fix the issue.
We run into the same problem...
Just so that people are aware, the "1" is evaluated to false in the ES API calls and in this particular case, the indexing option will be set to undesired value. This might cause problems in some applications.
I strongly suspect that the root cause of this is what's described in #13512. The list/map support added in 0.7 introduced some extra layers into the complicated value-marshalling path, including the part that caused the problem described there.
Although this issue is the older one, I'm going to close this one to consolidate over there since I left some debug notes in that one. Thanks for reporting this!
I'm going to lock this issue because it has been closed for _30 days_ โณ. This helps our maintainers find and focus on the active issues.
If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.
Most helpful comment
As a workaround, changing
"rest.action.multi.allow_explicit_index" = trueto"rest.action.multi.allow_explicit_index" = "true"seems to fix the issue.