elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic
elasticstack.getElasticsearchIndexTemplate
Explore with Pulumi AI
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic
Use this data source to retrieve information about existing Elasticsearch index templates. 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";
const ilm_history_7 = elasticstack.getElasticsearchIndexTemplate({
name: "ilm-history-7",
});
export const template = ilm_history_7;
import pulumi
import pulumi_elasticstack as elasticstack
ilm_history_7 = elasticstack.get_elasticsearch_index_template(name="ilm-history-7")
pulumi.export("template", ilm_history_7)
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 {
ilm_history_7, err := elasticstack.LookupElasticsearchIndexTemplate(ctx, &elasticstack.LookupElasticsearchIndexTemplateArgs{
Name: "ilm-history-7",
}, nil)
if err != nil {
return err
}
ctx.Export("template", ilm_history_7)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Elasticstack = Pulumi.Elasticstack;
return await Deployment.RunAsync(() =>
{
var ilm_history_7 = Elasticstack.GetElasticsearchIndexTemplate.Invoke(new()
{
Name = "ilm-history-7",
});
return new Dictionary<string, object?>
{
["template"] = ilm_history_7,
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
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) {
final var ilm-history-7 = ElasticstackFunctions.getElasticsearchIndexTemplate(GetElasticsearchIndexTemplateArgs.builder()
.name("ilm-history-7")
.build());
ctx.export("template", ilm_history_7);
}
}
variables:
ilm-history-7:
fn::invoke:
function: elasticstack:getElasticsearchIndexTemplate
arguments:
name: ilm-history-7
outputs:
template: ${["ilm-history-7"]}
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(elasticsearch_connection: Optional[GetElasticsearchIndexTemplateElasticsearchConnection] = None,
name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetElasticsearchIndexTemplateResult
def get_elasticsearch_index_template_output(elasticsearch_connection: Optional[pulumi.Input[GetElasticsearchIndexTemplateElasticsearchConnectionArgs]] = None,
name: Optional[pulumi.Input[str]] = 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
The following arguments are supported:
- Name string
- The name of the index template.
- Elasticsearch
Connection GetElasticsearch Index Template Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- Name string
- The name of the index template.
- Elasticsearch
Connection GetElasticsearch Index Template Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- name String
- The name of the index template.
- elasticsearch
Connection GetElasticsearch Index Template Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- name string
- The name of the index template.
- elasticsearch
Connection GetElasticsearch Index Template Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- name str
- The name of the index template.
- elasticsearch_
connection GetElasticsearch Index Template Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- name String
- The name of the index template.
- elasticsearch
Connection Property Map - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
getElasticsearchIndexTemplate Result
The following output properties are available:
- Composed
Ofs List<string> - An ordered list of component template names.
- Data
Streams List<GetElasticsearch Index Template Data Stream> - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- Id string
- Internal identifier of the resource
- 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 double
- Priority to determine index template precedence when a new data stream or index is created.
- Templates
List<Get
Elasticsearch Index Template Template> - Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
- Version double
- Version number used to manage index templates externally.
- Elasticsearch
Connection GetElasticsearch Index Template Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- Composed
Ofs []string - An ordered list of component template names.
- Data
Streams []GetElasticsearch Index Template Data Stream - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- Id string
- Internal identifier of the resource
- Index
Patterns []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.
- Templates
[]Get
Elasticsearch Index Template Template - Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
- Version float64
- Version number used to manage index templates externally.
- Elasticsearch
Connection GetElasticsearch Index Template Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- composed
Ofs List<String> - An ordered list of component template names.
- data
Streams List<GetElasticsearch Index Template Data Stream> - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- id String
- Internal identifier of the resource
- 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 Double
- Priority to determine index template precedence when a new data stream or index is created.
- templates
List<Get
Elasticsearch Index Template Template> - Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
- version Double
- Version number used to manage index templates externally.
- elasticsearch
Connection GetElasticsearch Index Template Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- composed
Ofs string[] - An ordered list of component template names.
- data
Streams GetElasticsearch Index Template Data Stream[] - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- id string
- Internal identifier of the resource
- index
Patterns 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.
- templates
Get
Elasticsearch Index Template Template[] - Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
- version number
- Version number used to manage index templates externally.
- elasticsearch
Connection GetElasticsearch Index Template Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- composed_
ofs Sequence[str] - An ordered list of component template names.
- data_
streams Sequence[GetElasticsearch Index Template Data Stream] - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- id str
- Internal identifier of the resource
- 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.
- templates
Sequence[Get
Elasticsearch Index Template Template] - Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
- version float
- Version number used to manage index templates externally.
- elasticsearch_
connection GetElasticsearch Index Template Elasticsearch Connection - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- composed
Ofs List<String> - An ordered list of component template names.
- data
Streams List<Property Map> - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- id String
- Internal identifier of the resource
- 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.
- templates List<Property Map>
- Template to be applied. It may optionally include an aliases, mappings, lifecycle, or settings configuration.
- version Number
- Version number used to manage index templates externally.
- elasticsearch
Connection Property Map - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
Supporting Types
GetElasticsearchIndexTemplateDataStream
- Allow
Custom boolRouting - bool
- Allow
Custom boolRouting - bool
- allow
Custom BooleanRouting - Boolean
- allow
Custom booleanRouting - boolean
- allow_
custom_ boolrouting - bool
- allow
Custom BooleanRouting - Boolean
GetElasticsearchIndexTemplateElasticsearchConnection
- 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 stringAuthentication - ES Client Authentication field to be used with the JWT token
- 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.
- 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 []string
- Es
Client stringAuthentication - ES Client Authentication field to be used with the JWT token
- 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.
- 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 StringAuthentication - ES Client Authentication field to be used with the JWT token
- insecure Boolean
- 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.
- 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 string[]
- es
Client stringAuthentication - ES Client Authentication field to be used with the JWT token
- insecure boolean
- 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.
- 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_ strauthentication - ES Client Authentication field to be used with the JWT token
- 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.
- 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 StringAuthentication - ES Client Authentication field to be used with the JWT token
- insecure Boolean
- 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.
GetElasticsearchIndexTemplateTemplate
GetElasticsearchIndexTemplateTemplateAlias
- Filter string
- Index
Routing string - bool
- Is
Write boolIndex - Name string
- Routing string
- Search
Routing string
- Filter string
- Index
Routing string - bool
- Is
Write boolIndex - Name string
- Routing string
- Search
Routing string
- filter String
- index
Routing String - Boolean
- is
Write BooleanIndex - name String
- routing String
- search
Routing String
- filter string
- index
Routing string - boolean
- is
Write booleanIndex - name string
- routing string
- search
Routing string
- filter str
- index_
routing str - bool
- is_
write_ boolindex - name str
- routing str
- search_
routing str
- filter String
- index
Routing String - Boolean
- is
Write BooleanIndex - name String
- routing String
- search
Routing String
GetElasticsearchIndexTemplateTemplateLifecycle
- Data
Retention string
- Data
Retention string
- data
Retention String
- data
Retention string
- data_
retention str
- data
Retention String
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstack
Terraform Provider.
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic