Not familiar with terraform, but you should be able to create an index template (in elastic through kibana) where you can specify that any index (ex: test_index*) by default has 1 primary and 0 replicas. My guess is you then wouldn't have to specify that in terraform. Hope that helps.
Hi Andrew - thanks for the suggestion. I guess that would probably work and would be a workaround - but it's a bit hacky. Looks like this is a known bug in the provider - also it seems to have been reported and close although it's not fixed. See here.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.