# How to update elasticsearch.yml if I am using Elastic cloud through API

**URL:** https://discuss.elastic.co/t/how-to-update-elasticsearch-yml-if-i-am-using-elastic-cloud-through-api/279505
**Category:** Elasticsearch
**Created:** [July 23, 2021, 4:44pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch-yml-if-i-am-using-elastic-cloud-through-api/279505 "2021-07-23T16:44:13Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![idelix](https://avatars.discourse-cdn.com/v4/letter/i/ecd19e/32.png) [@idelix](https://discuss.elastic.co/u/idelix)
#### Post date: [July 23, 2021, 4:44pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch-yml-if-i-am-using-elastic-cloud-through-api/279505/1 "2021-07-23T16:44:13Z")

</div>

Hello,

I'm trying to update elasticsearch.yml and kibana.yml in elastic cloud through API but I cannot find any reference.

Basically I need to be able to configure it fully through API as it will be done by ci/cd pipeline

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [July 23, 2021, 4:51pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch-yml-if-i-am-using-elastic-cloud-through-api/279505/2 "2021-07-23T16:51:37Z")

</div>

You would use the REST API [here](https://www.elastic.co/guide/en/cloud/current/Deployment_-_CRUD.html)

I would recommend setting one up through the UI and then You can see what the equivalent API call would be. You can fully configure a deployment via the API.

There is also a new terraform provider that you can look at [here](https://registry.terraform.io/providers/elastic/ec/latest/docs)

---

<div class="post-metadata">

### Author: ![idelix](https://avatars.discourse-cdn.com/v4/letter/i/ecd19e/32.png) [@idelix](https://discuss.elastic.co/u/idelix)
#### Post date: [July 23, 2021, 5:01pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch-yml-if-i-am-using-elastic-cloud-through-api/279505/3 "2021-07-23T17:01:45Z")

</div>

Thanks so I need to basically add following bit to configure OpenID Connect with Azure, does it means that I need to put all this content below into one of those:

```auto
                     "user_settings_json" : {},
                     "user_settings_override_json" : {},
                     "user_settings_override_yaml" : "string",
                     "user_settings_yaml" : "string",

```

```auto
xpack:
  security:
    authc:
      realms:
        oidc:
          oidc1:
            order: 2
            rp.client_id: "..."
            rp.response_type: "code"
            rp.requested_scopes: ["openid", "email"]
            rp.redirect_uri: "https://.../callback"
            op.issuer: "https://login.microsoftonline.com/.../v2.0"
            op.authorization_endpoint: "https://login.microsoftonline.com/.../oauth2/v2.0/authorize"
            op.token_endpoint: "https://login.microsoftonline.com/.../oauth2/v2.0/token"
            op.userinfo_endpoint: "https://graph.microsoft.com/oidc/userinfo"
            op.endsession_endpoint: "https://login.microsoftonline.com/.../oauth2/v2.0/logout"
            rp.post_logout_redirect_uri: "https://.../logged_out"
            op.jwkset_path: "https://login.microsoftonline.com/.../discovery/v2.0/keys"
            claims.principal: sub
            claims.groups: groups

```

would be great to see some working examples if its available

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [July 23, 2021, 5:17pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch-yml-if-i-am-using-elastic-cloud-through-api/279505/4 "2021-07-23T17:17:41Z")

</div>

Like I said ... I would create a deployment via the UI and then Click the Equivalent REST API but ... and whalluh! Your working Example... You don't even have to actually create the deployment just configure it and look 🙂 Better than examples you have to adjust...

And yes there are a couple different ways to configure via the `user_settings_yaml` or `user_settings_json` typically programmatically you would use the `user_settings_json`

 ![Screen Shot 2021-07-23 at 10.16.14 AM](https://us1.discourse-cdn.com/elastic/original/3X/a/f/afe8f3656fccfb4bb485a6106a02dec17acbb2c3.jpeg)

---

<div class="post-metadata">

### Author: ![idelix](https://avatars.discourse-cdn.com/v4/letter/i/ecd19e/32.png) [@idelix](https://discuss.elastic.co/u/idelix)
#### Post date: [July 23, 2021, 5:26pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch-yml-if-i-am-using-elastic-cloud-through-api/279505/5 "2021-07-23T17:26:27Z")

</div>

oh ok just starting with elk didn't know about the "Equivalent API request" link down there 🙂 it's brilliant Thanks !

---

<div class="post-metadata">

### Author: ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)
#### Post date: [July 23, 2021, 5:30pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch-yml-if-i-am-using-elastic-cloud-through-api/279505/6 "2021-07-23T17:30:05Z")

</div>

Yeah... we couldn't hide it better if we tried! 🙂

What I see as a normal path is do that... then edit from there.

you can use the user settings yams or json for user settings... json will be easier programmatically after you get going.

---

<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: [August 20, 2021, 5:30pm UTC](https://discuss.elastic.co/t/how-to-update-elasticsearch-yml-if-i-am-using-elastic-cloud-through-api/279505/7 "2021-08-20T17:30:18Z")

</div>

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