1. Packages
  2. Packages
  3. Elasticstack Provider
  4. API Docs
  5. getElasticsearchIndexTemplate
Viewing docs for elasticstack 0.15.0
published on Thursday, May 14, 2026 by elastic
Viewing docs for elasticstack 0.15.0
published on Thursday, May 14, 2026 by elastic

    Retrieves information about an existing index template definition. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-get-template.html

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    // Minimal template so the data source reads a predictable shape you control. This mirrors the
    // acceptance-test pattern (resource + data source). The examples PlanOnly harness does not
    // apply changes; the data source then uses the provider's legacy "not found" behavior (name only)
    // instead of depending on built-in cluster templates, whose API responses vary by version.
    const exampleElasticsearchIndexTemplate = new elasticstack.ElasticsearchIndexTemplate("example", {
        name: "terraform-provider-elasticstack-example-index-template-ds",
        priority: 100,
        indexPatterns: ["tf-example-index-template-ds-*"],
    });
    const example = elasticstack.getElasticsearchIndexTemplateOutput({
        name: exampleElasticsearchIndexTemplate.name,
    });
    export const template = example;
    
    import pulumi
    import pulumi_elasticstack as elasticstack
    
    # Minimal template so the data source reads a predictable shape you control. This mirrors the
    # acceptance-test pattern (resource + data source). The examples PlanOnly harness does not
    # apply changes; the data source then uses the provider's legacy "not found" behavior (name only)
    # instead of depending on built-in cluster templates, whose API responses vary by version.
    example_elasticsearch_index_template = elasticstack.ElasticsearchIndexTemplate("example",
        name="terraform-provider-elasticstack-example-index-template-ds",
        priority=100,
        index_patterns=["tf-example-index-template-ds-*"])
    example = elasticstack.get_elasticsearch_index_template_output(name=example_elasticsearch_index_template.name)
    pulumi.export("template", example)
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/elasticstack/elasticstack"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Minimal template so the data source reads a predictable shape you control. This mirrors the
    		// acceptance-test pattern (resource + data source). The examples PlanOnly harness does not
    		// apply changes; the data source then uses the provider's legacy "not found" behavior (name only)
    		// instead of depending on built-in cluster templates, whose API responses vary by version.
    		exampleElasticsearchIndexTemplate, err := elasticstack.NewElasticsearchIndexTemplate(ctx, "example", &elasticstack.ElasticsearchIndexTemplateArgs{
    			Name:     pulumi.String("terraform-provider-elasticstack-example-index-template-ds"),
    			Priority: pulumi.Float64(100),
    			IndexPatterns: pulumi.StringArray{
    				pulumi.String("tf-example-index-template-ds-*"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		example := elasticstack.LookupElasticsearchIndexTemplateOutput(ctx, elasticstack.GetElasticsearchIndexTemplateOutputArgs{
    			Name: exampleElasticsearchIndexTemplate.Name,
    		}, nil)
    		ctx.Export("template", example)
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Elasticstack = Pulumi.Elasticstack;
    
    return await Deployment.RunAsync(() => 
    {
        // Minimal template so the data source reads a predictable shape you control. This mirrors the
        // acceptance-test pattern (resource + data source). The examples PlanOnly harness does not
        // apply changes; the data source then uses the provider's legacy "not found" behavior (name only)
        // instead of depending on built-in cluster templates, whose API responses vary by version.
        var exampleElasticsearchIndexTemplate = new Elasticstack.ElasticsearchIndexTemplate("example", new()
        {
            Name = "terraform-provider-elasticstack-example-index-template-ds",
            Priority = 100,
            IndexPatterns = new[]
            {
                "tf-example-index-template-ds-*",
            },
        });
    
        var example = Elasticstack.GetElasticsearchIndexTemplate.Invoke(new()
        {
            Name = exampleElasticsearchIndexTemplate.Name,
        });
    
        return new Dictionary<string, object?>
        {
            ["template"] = example,
        };
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.elasticstack.ElasticsearchIndexTemplate;
    import com.pulumi.elasticstack.ElasticsearchIndexTemplateArgs;
    import com.pulumi.elasticstack.ElasticstackFunctions;
    import com.pulumi.elasticstack.inputs.GetElasticsearchIndexTemplateArgs;
    import java.util.List;
    import java.util.ArrayList;
    import java.util.Map;
    import java.io.File;
    import java.nio.file.Files;
    import java.nio.file.Paths;
    
    public class App {
        public static void main(String[] args) {
            Pulumi.run(App::stack);
        }
    
        public static void stack(Context ctx) {
            // Minimal template so the data source reads a predictable shape you control. This mirrors the
            // acceptance-test pattern (resource + data source). The examples PlanOnly harness does not
            // apply changes; the data source then uses the provider's legacy "not found" behavior (name only)
            // instead of depending on built-in cluster templates, whose API responses vary by version.
            var exampleElasticsearchIndexTemplate = new ElasticsearchIndexTemplate("exampleElasticsearchIndexTemplate", ElasticsearchIndexTemplateArgs.builder()
                .name("terraform-provider-elasticstack-example-index-template-ds")
                .priority(100.0)
                .indexPatterns("tf-example-index-template-ds-*")
                .build());
    
            final var example = ElasticstackFunctions.getElasticsearchIndexTemplate(GetElasticsearchIndexTemplateArgs.builder()
                .name(exampleElasticsearchIndexTemplate.name())
                .build());
    
            ctx.export("template", example);
        }
    }
    
    resources:
      # Minimal template so the data source reads a predictable shape you control. This mirrors the
      # acceptance-test pattern (resource + data source). The examples PlanOnly harness does not
      # apply changes; the data source then uses the provider's legacy "not found" behavior (name only)
      # instead of depending on built-in cluster templates, whose API responses vary by version.
      exampleElasticsearchIndexTemplate:
        type: elasticstack:ElasticsearchIndexTemplate
        name: example
        properties:
          name: terraform-provider-elasticstack-example-index-template-ds
          priority: 100
          indexPatterns:
            - tf-example-index-template-ds-*
    variables:
      example:
        fn::invoke:
          function: elasticstack:getElasticsearchIndexTemplate
          arguments:
            name: ${exampleElasticsearchIndexTemplate.name}
    outputs:
      template: ${example}
    
    Example coming soon!
    

    Using getElasticsearchIndexTemplate

    Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.

    function getElasticsearchIndexTemplate(args: GetElasticsearchIndexTemplateArgs, opts?: InvokeOptions): Promise<GetElasticsearchIndexTemplateResult>
    function getElasticsearchIndexTemplateOutput(args: GetElasticsearchIndexTemplateOutputArgs, opts?: InvokeOptions): Output<GetElasticsearchIndexTemplateResult>
    def get_elasticsearch_index_template(data_stream: Optional[GetElasticsearchIndexTemplateDataStream] = None,
                                         elasticsearch_connections: Optional[Sequence[GetElasticsearchIndexTemplateElasticsearchConnection]] = None,
                                         name: Optional[str] = None,
                                         template: Optional[GetElasticsearchIndexTemplateTemplate] = None,
                                         opts: Optional[InvokeOptions] = None) -> GetElasticsearchIndexTemplateResult
    def get_elasticsearch_index_template_output(data_stream: pulumi.Input[Optional[GetElasticsearchIndexTemplateDataStreamArgs]] = None,
                                         elasticsearch_connections: pulumi.Input[Optional[Sequence[pulumi.Input[GetElasticsearchIndexTemplateElasticsearchConnectionArgs]]]] = None,
                                         name: pulumi.Input[Optional[str]] = None,
                                         template: pulumi.Input[Optional[GetElasticsearchIndexTemplateTemplateArgs]] = None,
                                         opts: Optional[InvokeOptions] = None) -> Output[GetElasticsearchIndexTemplateResult]
    func LookupElasticsearchIndexTemplate(ctx *Context, args *LookupElasticsearchIndexTemplateArgs, opts ...InvokeOption) (*LookupElasticsearchIndexTemplateResult, error)
    func LookupElasticsearchIndexTemplateOutput(ctx *Context, args *LookupElasticsearchIndexTemplateOutputArgs, opts ...InvokeOption) LookupElasticsearchIndexTemplateResultOutput

    > Note: This function is named LookupElasticsearchIndexTemplate in the Go SDK.

    public static class GetElasticsearchIndexTemplate 
    {
        public static Task<GetElasticsearchIndexTemplateResult> InvokeAsync(GetElasticsearchIndexTemplateArgs args, InvokeOptions? opts = null)
        public static Output<GetElasticsearchIndexTemplateResult> Invoke(GetElasticsearchIndexTemplateInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetElasticsearchIndexTemplateResult> getElasticsearchIndexTemplate(GetElasticsearchIndexTemplateArgs args, InvokeOptions options)
    public static Output<GetElasticsearchIndexTemplateResult> getElasticsearchIndexTemplate(GetElasticsearchIndexTemplateArgs args, InvokeOptions options)
    
    fn::invoke:
      function: elasticstack:index/getElasticsearchIndexTemplate:getElasticsearchIndexTemplate
      arguments:
        # arguments dictionary
    data "elasticstack_getelasticsearchindextemplate" "name" {
        # arguments
    }

    The following arguments are supported:

    Name string
    The name of the index template.
    DataStream GetElasticsearchIndexTemplateDataStream
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    ElasticsearchConnections List<GetElasticsearchIndexTemplateElasticsearchConnection>
    Elasticsearch connection configuration block.
    Template GetElasticsearchIndexTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    Name string
    The name of the index template.
    DataStream GetElasticsearchIndexTemplateDataStream
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    ElasticsearchConnections []GetElasticsearchIndexTemplateElasticsearchConnection
    Elasticsearch connection configuration block.
    Template GetElasticsearchIndexTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    name string
    The name of the index template.
    data_stream object
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    elasticsearch_connections list(object)
    Elasticsearch connection configuration block.
    template object
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    name String
    The name of the index template.
    dataStream GetElasticsearchIndexTemplateDataStream
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    elasticsearchConnections List<GetElasticsearchIndexTemplateElasticsearchConnection>
    Elasticsearch connection configuration block.
    template GetElasticsearchIndexTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    name string
    The name of the index template.
    dataStream GetElasticsearchIndexTemplateDataStream
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    elasticsearchConnections GetElasticsearchIndexTemplateElasticsearchConnection[]
    Elasticsearch connection configuration block.
    template GetElasticsearchIndexTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    name str
    The name of the index template.
    data_stream GetElasticsearchIndexTemplateDataStream
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    elasticsearch_connections Sequence[GetElasticsearchIndexTemplateElasticsearchConnection]
    Elasticsearch connection configuration block.
    template GetElasticsearchIndexTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    name String
    The name of the index template.
    dataStream Property Map
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    elasticsearchConnections List<Property Map>
    Elasticsearch connection configuration block.
    template Property Map
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.

    getElasticsearchIndexTemplate Result

    The following output properties are available:

    ComposedOfs List<string>
    An ordered list of component template names.
    Id string
    Internal identifier of the resource
    IgnoreMissingComponentTemplates List<string>
    A list of component template names that are ignored if missing.
    IndexPatterns List<string>
    Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
    Metadata string
    Optional user metadata about the index template.
    Name string
    The name of the index template.
    Priority double
    Priority to determine index template precedence when a new data stream or index is created.
    Version double
    Version number used to manage index templates externally.
    DataStream GetElasticsearchIndexTemplateDataStream
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    ElasticsearchConnections List<GetElasticsearchIndexTemplateElasticsearchConnection>
    Elasticsearch connection configuration block.
    Template GetElasticsearchIndexTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    ComposedOfs []string
    An ordered list of component template names.
    Id string
    Internal identifier of the resource
    IgnoreMissingComponentTemplates []string
    A list of component template names that are ignored if missing.
    IndexPatterns []string
    Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
    Metadata string
    Optional user metadata about the index template.
    Name string
    The name of the index template.
    Priority float64
    Priority to determine index template precedence when a new data stream or index is created.
    Version float64
    Version number used to manage index templates externally.
    DataStream GetElasticsearchIndexTemplateDataStream
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    ElasticsearchConnections []GetElasticsearchIndexTemplateElasticsearchConnection
    Elasticsearch connection configuration block.
    Template GetElasticsearchIndexTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    composed_ofs list(string)
    An ordered list of component template names.
    id string
    Internal identifier of the resource
    ignore_missing_component_templates list(string)
    A list of component template names that are ignored if missing.
    index_patterns list(string)
    Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
    metadata string
    Optional user metadata about the index template.
    name string
    The name of the index template.
    priority number
    Priority to determine index template precedence when a new data stream or index is created.
    version number
    Version number used to manage index templates externally.
    data_stream object
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    elasticsearch_connections list(object)
    Elasticsearch connection configuration block.
    template object
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    composedOfs List<String>
    An ordered list of component template names.
    id String
    Internal identifier of the resource
    ignoreMissingComponentTemplates List<String>
    A list of component template names that are ignored if missing.
    indexPatterns List<String>
    Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
    metadata String
    Optional user metadata about the index template.
    name String
    The name of the index template.
    priority Double
    Priority to determine index template precedence when a new data stream or index is created.
    version Double
    Version number used to manage index templates externally.
    dataStream GetElasticsearchIndexTemplateDataStream
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    elasticsearchConnections List<GetElasticsearchIndexTemplateElasticsearchConnection>
    Elasticsearch connection configuration block.
    template GetElasticsearchIndexTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    composedOfs string[]
    An ordered list of component template names.
    id string
    Internal identifier of the resource
    ignoreMissingComponentTemplates string[]
    A list of component template names that are ignored if missing.
    indexPatterns string[]
    Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
    metadata string
    Optional user metadata about the index template.
    name string
    The name of the index template.
    priority number
    Priority to determine index template precedence when a new data stream or index is created.
    version number
    Version number used to manage index templates externally.
    dataStream GetElasticsearchIndexTemplateDataStream
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    elasticsearchConnections GetElasticsearchIndexTemplateElasticsearchConnection[]
    Elasticsearch connection configuration block.
    template GetElasticsearchIndexTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    composed_ofs Sequence[str]
    An ordered list of component template names.
    id str
    Internal identifier of the resource
    ignore_missing_component_templates Sequence[str]
    A list of component template names that are ignored if missing.
    index_patterns Sequence[str]
    Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
    metadata str
    Optional user metadata about the index template.
    name str
    The name of the index template.
    priority float
    Priority to determine index template precedence when a new data stream or index is created.
    version float
    Version number used to manage index templates externally.
    data_stream GetElasticsearchIndexTemplateDataStream
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    elasticsearch_connections Sequence[GetElasticsearchIndexTemplateElasticsearchConnection]
    Elasticsearch connection configuration block.
    template GetElasticsearchIndexTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
    composedOfs List<String>
    An ordered list of component template names.
    id String
    Internal identifier of the resource
    ignoreMissingComponentTemplates List<String>
    A list of component template names that are ignored if missing.
    indexPatterns List<String>
    Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
    metadata String
    Optional user metadata about the index template.
    name String
    The name of the index template.
    priority Number
    Priority to determine index template precedence when a new data stream or index is created.
    version Number
    Version number used to manage index templates externally.
    dataStream Property Map
    If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
    elasticsearchConnections List<Property Map>
    Elasticsearch connection configuration block.
    template Property Map
    Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.

    Supporting Types

    GetElasticsearchIndexTemplateDataStream

    AllowCustomRouting bool
    If true, the data stream supports custom routing. Defaults to false. Available only in 8.x
    Hidden bool
    If true, the data stream is hidden.
    AllowCustomRouting bool
    If true, the data stream supports custom routing. Defaults to false. Available only in 8.x
    Hidden bool
    If true, the data stream is hidden.
    allow_custom_routing bool
    If true, the data stream supports custom routing. Defaults to false. Available only in 8.x
    hidden bool
    If true, the data stream is hidden.
    allowCustomRouting Boolean
    If true, the data stream supports custom routing. Defaults to false. Available only in 8.x
    hidden Boolean
    If true, the data stream is hidden.
    allowCustomRouting boolean
    If true, the data stream supports custom routing. Defaults to false. Available only in 8.x
    hidden boolean
    If true, the data stream is hidden.
    allow_custom_routing bool
    If true, the data stream supports custom routing. Defaults to false. Available only in 8.x
    hidden bool
    If true, the data stream is hidden.
    allowCustomRouting Boolean
    If true, the data stream supports custom routing. Defaults to false. Available only in 8.x
    hidden Boolean
    If true, the data stream is hidden.

    GetElasticsearchIndexTemplateElasticsearchConnection

    ApiKey string
    API Key to use for authentication to Elasticsearch
    BearerToken string
    Bearer Token to use for authentication to Elasticsearch
    CaData string
    PEM-encoded custom Certificate Authority certificate
    CaFile string
    Path to a custom Certificate Authority certificate
    CertData string
    PEM encoded certificate for client auth
    CertFile string
    Path to a file containing the PEM encoded certificate for client auth
    Endpoints List<string>
    EsClientAuthentication string
    ES Client Authentication field to be used with the JWT token
    Headers Dictionary<string, string>
    A list of headers to be sent with each request to Elasticsearch.
    Insecure bool
    Disable TLS certificate validation
    KeyData string
    PEM encoded private key for client auth
    KeyFile string
    Path to a file containing the PEM encoded private key for client auth
    Password string
    Password to use for API authentication to Elasticsearch.
    Username string
    Username to use for API authentication to Elasticsearch.
    ApiKey string
    API Key to use for authentication to Elasticsearch
    BearerToken string
    Bearer Token to use for authentication to Elasticsearch
    CaData string
    PEM-encoded custom Certificate Authority certificate
    CaFile string
    Path to a custom Certificate Authority certificate
    CertData string
    PEM encoded certificate for client auth
    CertFile string
    Path to a file containing the PEM encoded certificate for client auth
    Endpoints []string
    EsClientAuthentication string
    ES Client Authentication field to be used with the JWT token
    Headers map[string]string
    A list of headers to be sent with each request to Elasticsearch.
    Insecure bool
    Disable TLS certificate validation
    KeyData string
    PEM encoded private key for client auth
    KeyFile string
    Path to a file containing the PEM encoded private key for client auth
    Password string
    Password to use for API authentication to Elasticsearch.
    Username string
    Username to use for API authentication to Elasticsearch.
    api_key string
    API Key to use for authentication to Elasticsearch
    bearer_token string
    Bearer Token to use for authentication to Elasticsearch
    ca_data string
    PEM-encoded custom Certificate Authority certificate
    ca_file string
    Path to a custom Certificate Authority certificate
    cert_data string
    PEM encoded certificate for client auth
    cert_file string
    Path to a file containing the PEM encoded certificate for client auth
    endpoints list(string)
    es_client_authentication string
    ES Client Authentication field to be used with the JWT token
    headers map(string)
    A list of headers to be sent with each request to Elasticsearch.
    insecure bool
    Disable TLS certificate validation
    key_data string
    PEM encoded private key for client auth
    key_file string
    Path to a file containing the PEM encoded private key for client auth
    password string
    Password to use for API authentication to Elasticsearch.
    username string
    Username to use for API authentication to Elasticsearch.
    apiKey String
    API Key to use for authentication to Elasticsearch
    bearerToken String
    Bearer Token to use for authentication to Elasticsearch
    caData String
    PEM-encoded custom Certificate Authority certificate
    caFile String
    Path to a custom Certificate Authority certificate
    certData String
    PEM encoded certificate for client auth
    certFile String
    Path to a file containing the PEM encoded certificate for client auth
    endpoints List<String>
    esClientAuthentication String
    ES Client Authentication field to be used with the JWT token
    headers Map<String,String>
    A list of headers to be sent with each request to Elasticsearch.
    insecure Boolean
    Disable TLS certificate validation
    keyData String
    PEM encoded private key for client auth
    keyFile String
    Path to a file containing the PEM encoded private key for client auth
    password String
    Password to use for API authentication to Elasticsearch.
    username String
    Username to use for API authentication to Elasticsearch.
    apiKey string
    API Key to use for authentication to Elasticsearch
    bearerToken string
    Bearer Token to use for authentication to Elasticsearch
    caData string
    PEM-encoded custom Certificate Authority certificate
    caFile string
    Path to a custom Certificate Authority certificate
    certData string
    PEM encoded certificate for client auth
    certFile string
    Path to a file containing the PEM encoded certificate for client auth
    endpoints string[]
    esClientAuthentication string
    ES Client Authentication field to be used with the JWT token
    headers {[key: string]: string}
    A list of headers to be sent with each request to Elasticsearch.
    insecure boolean
    Disable TLS certificate validation
    keyData string
    PEM encoded private key for client auth
    keyFile string
    Path to a file containing the PEM encoded private key for client auth
    password string
    Password to use for API authentication to Elasticsearch.
    username string
    Username to use for API authentication to Elasticsearch.
    api_key str
    API Key to use for authentication to Elasticsearch
    bearer_token str
    Bearer Token to use for authentication to Elasticsearch
    ca_data str
    PEM-encoded custom Certificate Authority certificate
    ca_file str
    Path to a custom Certificate Authority certificate
    cert_data str
    PEM encoded certificate for client auth
    cert_file str
    Path to a file containing the PEM encoded certificate for client auth
    endpoints Sequence[str]
    es_client_authentication str
    ES Client Authentication field to be used with the JWT token
    headers Mapping[str, str]
    A list of headers to be sent with each request to Elasticsearch.
    insecure bool
    Disable TLS certificate validation
    key_data str
    PEM encoded private key for client auth
    key_file str
    Path to a file containing the PEM encoded private key for client auth
    password str
    Password to use for API authentication to Elasticsearch.
    username str
    Username to use for API authentication to Elasticsearch.
    apiKey String
    API Key to use for authentication to Elasticsearch
    bearerToken String
    Bearer Token to use for authentication to Elasticsearch
    caData String
    PEM-encoded custom Certificate Authority certificate
    caFile String
    Path to a custom Certificate Authority certificate
    certData String
    PEM encoded certificate for client auth
    certFile String
    Path to a file containing the PEM encoded certificate for client auth
    endpoints List<String>
    esClientAuthentication String
    ES Client Authentication field to be used with the JWT token
    headers Map<String>
    A list of headers to be sent with each request to Elasticsearch.
    insecure Boolean
    Disable TLS certificate validation
    keyData String
    PEM encoded private key for client auth
    keyFile String
    Path to a file containing the PEM encoded private key for client auth
    password String
    Password to use for API authentication to Elasticsearch.
    username String
    Username to use for API authentication to Elasticsearch.

    GetElasticsearchIndexTemplateTemplate

    Mappings string
    Mapping for fields in the index. Should be specified as a JSON object of field mappings. See the documentation (https://www.elastic.co/guide/en/elasticsearch/reference/current/explicit-mapping.html) for more details
    Settings string
    Configuration options for the index. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings
    Aliases List<GetElasticsearchIndexTemplateTemplateAlias>
    Alias to add.
    DataStreamOptions GetElasticsearchIndexTemplateTemplateDataStreamOptions
    Options for data streams created by this template. Available only for Elasticsearch 9.1.0 and above.
    Lifecycle GetElasticsearchIndexTemplateTemplateLifecycle
    Lifecycle of data stream. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/data-stream-lifecycle.html
    Mappings string
    Mapping for fields in the index. Should be specified as a JSON object of field mappings. See the documentation (https://www.elastic.co/guide/en/elasticsearch/reference/current/explicit-mapping.html) for more details
    Settings string
    Configuration options for the index. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings
    Aliases []GetElasticsearchIndexTemplateTemplateAlias
    Alias to add.
    DataStreamOptions GetElasticsearchIndexTemplateTemplateDataStreamOptions
    Options for data streams created by this template. Available only for Elasticsearch 9.1.0 and above.
    Lifecycle GetElasticsearchIndexTemplateTemplateLifecycle
    Lifecycle of data stream. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/data-stream-lifecycle.html
    mappings string
    Mapping for fields in the index. Should be specified as a JSON object of field mappings. See the documentation (https://www.elastic.co/guide/en/elasticsearch/reference/current/explicit-mapping.html) for more details
    settings string
    Configuration options for the index. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings
    aliases list(object)
    Alias to add.
    data_stream_options object
    Options for data streams created by this template. Available only for Elasticsearch 9.1.0 and above.
    lifecycle object
    Lifecycle of data stream. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/data-stream-lifecycle.html
    mappings String
    Mapping for fields in the index. Should be specified as a JSON object of field mappings. See the documentation (https://www.elastic.co/guide/en/elasticsearch/reference/current/explicit-mapping.html) for more details
    settings String
    Configuration options for the index. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings
    aliases List<GetElasticsearchIndexTemplateTemplateAlias>
    Alias to add.
    dataStreamOptions GetElasticsearchIndexTemplateTemplateDataStreamOptions
    Options for data streams created by this template. Available only for Elasticsearch 9.1.0 and above.
    lifecycle GetElasticsearchIndexTemplateTemplateLifecycle
    Lifecycle of data stream. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/data-stream-lifecycle.html
    mappings string
    Mapping for fields in the index. Should be specified as a JSON object of field mappings. See the documentation (https://www.elastic.co/guide/en/elasticsearch/reference/current/explicit-mapping.html) for more details
    settings string
    Configuration options for the index. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings
    aliases GetElasticsearchIndexTemplateTemplateAlias[]
    Alias to add.
    dataStreamOptions GetElasticsearchIndexTemplateTemplateDataStreamOptions
    Options for data streams created by this template. Available only for Elasticsearch 9.1.0 and above.
    lifecycle GetElasticsearchIndexTemplateTemplateLifecycle
    Lifecycle of data stream. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/data-stream-lifecycle.html
    mappings str
    Mapping for fields in the index. Should be specified as a JSON object of field mappings. See the documentation (https://www.elastic.co/guide/en/elasticsearch/reference/current/explicit-mapping.html) for more details
    settings str
    Configuration options for the index. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings
    aliases Sequence[GetElasticsearchIndexTemplateTemplateAlias]
    Alias to add.
    data_stream_options GetElasticsearchIndexTemplateTemplateDataStreamOptions
    Options for data streams created by this template. Available only for Elasticsearch 9.1.0 and above.
    lifecycle GetElasticsearchIndexTemplateTemplateLifecycle
    Lifecycle of data stream. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/data-stream-lifecycle.html
    mappings String
    Mapping for fields in the index. Should be specified as a JSON object of field mappings. See the documentation (https://www.elastic.co/guide/en/elasticsearch/reference/current/explicit-mapping.html) for more details
    settings String
    Configuration options for the index. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/index-modules.html#index-modules-settings
    aliases List<Property Map>
    Alias to add.
    dataStreamOptions Property Map
    Options for data streams created by this template. Available only for Elasticsearch 9.1.0 and above.
    lifecycle Property Map
    Lifecycle of data stream. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/data-stream-lifecycle.html

    GetElasticsearchIndexTemplateTemplateAlias

    Filter string
    Query used to limit documents the alias can access.
    IndexRouting string
    Value used to route indexing operations to a specific shard. If specified, this overwrites the routing value for indexing operations.
    IsHidden bool
    If true, the alias is hidden.
    IsWriteIndex bool
    If true, the index is the write index for the alias.
    Name string
    The alias name.
    Routing string
    Value used to route indexing and search operations to a specific shard.
    SearchRouting string
    Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations.
    Filter string
    Query used to limit documents the alias can access.
    IndexRouting string
    Value used to route indexing operations to a specific shard. If specified, this overwrites the routing value for indexing operations.
    IsHidden bool
    If true, the alias is hidden.
    IsWriteIndex bool
    If true, the index is the write index for the alias.
    Name string
    The alias name.
    Routing string
    Value used to route indexing and search operations to a specific shard.
    SearchRouting string
    Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations.
    filter string
    Query used to limit documents the alias can access.
    index_routing string
    Value used to route indexing operations to a specific shard. If specified, this overwrites the routing value for indexing operations.
    is_hidden bool
    If true, the alias is hidden.
    is_write_index bool
    If true, the index is the write index for the alias.
    name string
    The alias name.
    routing string
    Value used to route indexing and search operations to a specific shard.
    search_routing string
    Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations.
    filter String
    Query used to limit documents the alias can access.
    indexRouting String
    Value used to route indexing operations to a specific shard. If specified, this overwrites the routing value for indexing operations.
    isHidden Boolean
    If true, the alias is hidden.
    isWriteIndex Boolean
    If true, the index is the write index for the alias.
    name String
    The alias name.
    routing String
    Value used to route indexing and search operations to a specific shard.
    searchRouting String
    Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations.
    filter string
    Query used to limit documents the alias can access.
    indexRouting string
    Value used to route indexing operations to a specific shard. If specified, this overwrites the routing value for indexing operations.
    isHidden boolean
    If true, the alias is hidden.
    isWriteIndex boolean
    If true, the index is the write index for the alias.
    name string
    The alias name.
    routing string
    Value used to route indexing and search operations to a specific shard.
    searchRouting string
    Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations.
    filter str
    Query used to limit documents the alias can access.
    index_routing str
    Value used to route indexing operations to a specific shard. If specified, this overwrites the routing value for indexing operations.
    is_hidden bool
    If true, the alias is hidden.
    is_write_index bool
    If true, the index is the write index for the alias.
    name str
    The alias name.
    routing str
    Value used to route indexing and search operations to a specific shard.
    search_routing str
    Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations.
    filter String
    Query used to limit documents the alias can access.
    indexRouting String
    Value used to route indexing operations to a specific shard. If specified, this overwrites the routing value for indexing operations.
    isHidden Boolean
    If true, the alias is hidden.
    isWriteIndex Boolean
    If true, the index is the write index for the alias.
    name String
    The alias name.
    routing String
    Value used to route indexing and search operations to a specific shard.
    searchRouting String
    Value used to route search operations to a specific shard. If specified, this overwrites the routing value for search operations.

    GetElasticsearchIndexTemplateTemplateDataStreamOptions

    failure_store object
    Failure store configuration.
    failureStore Property Map
    Failure store configuration.

    GetElasticsearchIndexTemplateTemplateDataStreamOptionsFailureStore

    Enabled bool
    If true, document redirection to the failure store is enabled for new matching data streams.
    Lifecycle GetElasticsearchIndexTemplateTemplateDataStreamOptionsFailureStoreLifecycle
    Lifecycle configuration for the failure store.
    Enabled bool
    If true, document redirection to the failure store is enabled for new matching data streams.
    Lifecycle GetElasticsearchIndexTemplateTemplateDataStreamOptionsFailureStoreLifecycle
    Lifecycle configuration for the failure store.
    enabled bool
    If true, document redirection to the failure store is enabled for new matching data streams.
    lifecycle object
    Lifecycle configuration for the failure store.
    enabled Boolean
    If true, document redirection to the failure store is enabled for new matching data streams.
    lifecycle GetElasticsearchIndexTemplateTemplateDataStreamOptionsFailureStoreLifecycle
    Lifecycle configuration for the failure store.
    enabled boolean
    If true, document redirection to the failure store is enabled for new matching data streams.
    lifecycle GetElasticsearchIndexTemplateTemplateDataStreamOptionsFailureStoreLifecycle
    Lifecycle configuration for the failure store.
    enabled bool
    If true, document redirection to the failure store is enabled for new matching data streams.
    lifecycle GetElasticsearchIndexTemplateTemplateDataStreamOptionsFailureStoreLifecycle
    Lifecycle configuration for the failure store.
    enabled Boolean
    If true, document redirection to the failure store is enabled for new matching data streams.
    lifecycle Property Map
    Lifecycle configuration for the failure store.

    GetElasticsearchIndexTemplateTemplateDataStreamOptionsFailureStoreLifecycle

    DataRetention string
    The retention period for failure store documents (e.g. "30d").
    DataRetention string
    The retention period for failure store documents (e.g. "30d").
    data_retention string
    The retention period for failure store documents (e.g. "30d").
    dataRetention String
    The retention period for failure store documents (e.g. "30d").
    dataRetention string
    The retention period for failure store documents (e.g. "30d").
    data_retention str
    The retention period for failure store documents (e.g. "30d").
    dataRetention String
    The retention period for failure store documents (e.g. "30d").

    GetElasticsearchIndexTemplateTemplateLifecycle

    DataRetention string
    The retention period of the data indexed in this data stream.
    DataRetention string
    The retention period of the data indexed in this data stream.
    data_retention string
    The retention period of the data indexed in this data stream.
    dataRetention String
    The retention period of the data indexed in this data stream.
    dataRetention string
    The retention period of the data indexed in this data stream.
    data_retention str
    The retention period of the data indexed in this data stream.
    dataRetention String
    The retention period of the data indexed in this data stream.

    Package Details

    Repository
    elasticstack elastic/terraform-provider-elasticstack
    License
    Notes
    This Pulumi package is based on the elasticstack Terraform Provider.
    Viewing docs for elasticstack 0.15.0
    published on Thursday, May 14, 2026 by elastic
      Try Pulumi Cloud free. Your team will thank you.