@@ -13,7 +13,7 @@ For example, using ILM:
1313
14141 . Create the following ` main.tf ` file:
1515
16- ```
16+ ``` hcl
1717provider "elasticsearch" {
1818 url = "http://localhost:9200"
1919}
@@ -73,7 +73,7 @@ resource "elasticsearch_index" "test" {
7373
74742 . Start a new Elasticsearch Container:
7575
76- ```
76+ ``` sh
7777$ export ES_OSS_IMAGE=elasticsearch:7.9.2
7878$ docker-compose up -d elasticsearch
7979Creating network " terraform-provider-elasticsearch_default" with the default driver
@@ -82,7 +82,7 @@ Creating terraform-provider-elasticsearch_elasticsearch_1 ... done
8282
83833 . Create the example Index Lifecycle Policy, Index Template and Index:
8484
85- ```
85+ ``` sh
8686$ terraform apply -auto-approve
8787elasticsearch_xpack_index_lifecycle_policy.test: Creating...
8888elasticsearch_xpack_index_lifecycle_policy.test: Creation complete after 0s [id= test]
@@ -96,14 +96,14 @@ Apply complete! Resources: 3 added, 0 changed, 0 destroyed.
9696
97974 . Manually rollover the example index:
9898
99- ```
99+ ``` sh
100100$ curl -X POST http://localhost:9200/test/_rollover
101101{" acknowledged" :true," shards_acknowledged" :true," old_index" :" test-000001" ," new_index" :" test-000002" ," rolled_over" :true," dry_run" :false," conditions" :{}}
102102```
103103
1041045 . Delete the initial created index:
105105
106- ```
106+ ``` sh
107107$ curl -X DELETE http://localhost:9200/test-000001
108108{" acknowledged" :true}
109109```
0 commit comments