# Configure Elasticsearch with script

**URL:** https://discuss.elastic.co/t/configure-elasticsearch-with-script/351264
**Category:** Elasticsearch
**Created:** [January 17, 2024, 11:37am UTC](https://discuss.elastic.co/t/configure-elasticsearch-with-script/351264 "2024-01-17T11:37:23Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![cv123](https://avatars.discourse-cdn.com/v4/letter/c/e9c0ed/32.png) [@cv123](https://discuss.elastic.co/u/cv123)
#### Post date: [January 17, 2024, 11:37am UTC](https://discuss.elastic.co/t/configure-elasticsearch-with-script/351264/1 "2024-01-17T11:37:23Z")

</div>

Hi everyone,

i tried to deploy and configure an Elastic instance via script (first test with powershell)

For that i wrote a terraform script to create 2 docker container (elasticsearch and kibana), create the enrollment token, the validation key, reset the passwort for the elastic user, everything is fine until i have to go to the browser and insert both (enrollment token and validation key) manually

Is there a possability to do that in my script?  
I use this  
`docker exec -it $kibanaContainerId /usr/share/kibana/bin/kibana-setup --enrollment-token $enrollmentToken`

with following output:

```auto
Kibana is currently running with legacy OpenSSL providers enabled! For details and instructions on how to disable see https://www.elastic.co/guide/en/kibana/8.11/production.html#openssl-legacy-provider

✔ Kibana configured successfully.

To start Kibana run:
  bin/kibana

```

result is nothing happend, i have to insert the enrollment token manually.

do anyone has a solution here?  
Thanks in advance

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 14, 2024, 11:38am UTC](https://discuss.elastic.co/t/configure-elasticsearch-with-script/351264/2 "2024-02-14T11:38:11Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
