elastic / terraform-provider-ec

https://registry.terraform.io/providers/elastic/ec/latest/docs
Apache License 2.0
176 stars 89 forks source link

Docs Improvement: Include example for enabling built-in plugins #851

Open VimCommando opened 2 months ago

VimCommando commented 2 months ago

The docs page for ec_deployment_provider does not give an example for how to enable built-in plugins:

https://registry.terraform.io/providers/elastic/ec/latest/docs/resources/deployment_extension#schema

The two examples both use a download_url, which a built-in plugin does not use.

In the Elastic Cloud deployment API defines the DeploymentUpdateRequest here:

https://www.elastic.co/guide/en/cloud/current/definitions.html#DeploymentUpdateRequest

In this body the sub-section treats user-defined and built-in plugins differently. For example:

{
  // Rest of body omitted
            "elasticsearch": {
              "user_plugins": [],
              "user_bundles": [],
              "version": "8.14.3",
              "enabled_built_in_plugins": [
                "analysis-icu"  // <-- this here
              ]
            }
}

It would be great to have an example of how Terraform handles defining this.

VimCommando commented 2 months ago

Related to https://github.com/elastic/terraform-provider-ec/issues/230