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

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

You would use the REST API here

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

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:

                     "user_settings_json" : {},
                     "user_settings_override_json" : {},
                     "user_settings_override_yaml" : "string",
                     "user_settings_yaml" : "string",
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

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 :slight_smile: 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

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

1 Like

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

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.

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