elasticstack.ElasticsearchIndexTemplate
Explore with Pulumi AI
Creates or updates an index template. Index templates define settings, mappings, and aliases that can be applied automatically to new indices. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-put-template.html
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";
const myTemplate = new elasticstack.ElasticsearchIndexTemplate("myTemplate", {
priority: 42,
indexPatterns: [
"logstash*",
"filebeat*",
],
template: {
aliases: [
{
name: "my_template_test",
},
{
name: "another_test",
},
],
settings: JSON.stringify({
number_of_shards: "3",
}),
},
});
const myDataStream = new elasticstack.ElasticsearchIndexTemplate("myDataStream", {
indexPatterns: ["stream*"],
dataStream: {},
});
import pulumi
import json
import pulumi_elasticstack as elasticstack
my_template = elasticstack.ElasticsearchIndexTemplate("myTemplate",
priority=42,
index_patterns=[
"logstash*",
"filebeat*",
],
template={
"aliases": [
{
"name": "my_template_test",
},
{
"name": "another_test",
},
],
"settings": json.dumps({
"number_of_shards": "3",
}),
})
my_data_stream = elasticstack.ElasticsearchIndexTemplate("myDataStream",
index_patterns=["stream*"],
data_stream={})
package main
import (
"encoding/json"
"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 {
tmpJSON0, err := json.Marshal(map[string]interface{}{
"number_of_shards": "3",
})
if err != nil {
return err
}
json0 := string(tmpJSON0)
_, err = elasticstack.NewElasticsearchIndexTemplate(ctx, "myTemplate", &elasticstack.ElasticsearchIndexTemplateArgs{
Priority: pulumi.Float64(42),
IndexPatterns: pulumi.StringArray{
pulumi.String("logstash*"),
pulumi.String("filebeat*"),
},
Template: &elasticstack.ElasticsearchIndexTemplateTemplateArgs{
Aliases: elasticstack.ElasticsearchIndexTemplateTemplateAliasArray{
&elasticstack.ElasticsearchIndexTemplateTemplateAliasArgs{
Name: pulumi.String("my_template_test"),
},
&elasticstack.ElasticsearchIndexTemplateTemplateAliasArgs{
Name: pulumi.String("another_test"),
},
},
Settings: pulumi.String(json0),
},
})
if err != nil {
return err
}
_, err = elasticstack.NewElasticsearchIndexTemplate(ctx, "myDataStream", &elasticstack.ElasticsearchIndexTemplateArgs{
IndexPatterns: pulumi.StringArray{
pulumi.String("stream*"),
},
DataStream: &elasticstack.ElasticsearchIndexTemplateDataStreamArgs{},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using System.Text.Json;
using Pulumi;
using Elasticstack = Pulumi.Elasticstack;
return await Deployment.RunAsync(() =>
{
var myTemplate = new Elasticstack.ElasticsearchIndexTemplate("myTemplate", new()
{
Priority = 42,
IndexPatterns = new[]
{
"logstash*",
"filebeat*",
},
Template = new Elasticstack.Inputs.ElasticsearchIndexTemplateTemplateArgs
{
Aliases = new[]
{
new Elasticstack.Inputs.ElasticsearchIndexTemplateTemplateAliasArgs
{
Name = "my_template_test",
},
new Elasticstack.Inputs.ElasticsearchIndexTemplateTemplateAliasArgs
{
Name = "another_test",
},
},
Settings = JsonSerializer.Serialize(new Dictionary<string, object?>
{
["number_of_shards"] = "3",
}),
},
});
var myDataStream = new Elasticstack.ElasticsearchIndexTemplate("myDataStream", new()
{
IndexPatterns = new[]
{
"stream*",
},
DataStream = null,
});
});
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.inputs.ElasticsearchIndexTemplateTemplateArgs;
import com.pulumi.elasticstack.inputs.ElasticsearchIndexTemplateDataStreamArgs;
import static com.pulumi.codegen.internal.Serialization.*;
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) {
var myTemplate = new ElasticsearchIndexTemplate("myTemplate", ElasticsearchIndexTemplateArgs.builder()
.priority(42)
.indexPatterns(
"logstash*",
"filebeat*")
.template(ElasticsearchIndexTemplateTemplateArgs.builder()
.aliases(
ElasticsearchIndexTemplateTemplateAliasArgs.builder()
.name("my_template_test")
.build(),
ElasticsearchIndexTemplateTemplateAliasArgs.builder()
.name("another_test")
.build())
.settings(serializeJson(
jsonObject(
jsonProperty("number_of_shards", "3")
)))
.build())
.build());
var myDataStream = new ElasticsearchIndexTemplate("myDataStream", ElasticsearchIndexTemplateArgs.builder()
.indexPatterns("stream*")
.dataStream()
.build());
}
}
resources:
myTemplate:
type: elasticstack:ElasticsearchIndexTemplate
properties:
priority: 42
indexPatterns:
- logstash*
- filebeat*
template:
aliases:
- name: my_template_test
- name: another_test
settings:
fn::toJSON:
number_of_shards: '3'
myDataStream:
type: elasticstack:ElasticsearchIndexTemplate
properties:
indexPatterns:
- stream*
dataStream: {}
Create ElasticsearchIndexTemplate Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new ElasticsearchIndexTemplate(name: string, args: ElasticsearchIndexTemplateArgs, opts?: CustomResourceOptions);
@overload
def ElasticsearchIndexTemplate(resource_name: str,
args: ElasticsearchIndexTemplateArgs,
opts: Optional[ResourceOptions] = None)
@overload
def ElasticsearchIndexTemplate(resource_name: str,
opts: Optional[ResourceOptions] = None,
index_patterns: Optional[Sequence[str]] = None,
composed_ofs: Optional[Sequence[str]] = None,
data_stream: Optional[ElasticsearchIndexTemplateDataStreamArgs] = None,
elasticsearch_connection: Optional[ElasticsearchIndexTemplateElasticsearchConnectionArgs] = None,
metadata: Optional[str] = None,
name: Optional[str] = None,
priority: Optional[float] = None,
template: Optional[ElasticsearchIndexTemplateTemplateArgs] = None,
version: Optional[float] = None)
func NewElasticsearchIndexTemplate(ctx *Context, name string, args ElasticsearchIndexTemplateArgs, opts ...ResourceOption) (*ElasticsearchIndexTemplate, error)
public ElasticsearchIndexTemplate(string name, ElasticsearchIndexTemplateArgs args, CustomResourceOptions? opts = null)
public ElasticsearchIndexTemplate(String name, ElasticsearchIndexTemplateArgs args)
public ElasticsearchIndexTemplate(String name, ElasticsearchIndexTemplateArgs args, CustomResourceOptions options)
type: elasticstack:ElasticsearchIndexTemplate
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.
Parameters
- name string
- The unique name of the resource.
- args ElasticsearchIndexTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name str
- The unique name of the resource.
- args ElasticsearchIndexTemplateArgs
- The arguments to resource properties.
- opts ResourceOptions
- Bag of options to control resource's behavior.
- ctx Context
- Context object for the current deployment.
- name string
- The unique name of the resource.
- args ElasticsearchIndexTemplateArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args ElasticsearchIndexTemplateArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args ElasticsearchIndexTemplateArgs
- The arguments to resource properties.
- options CustomResourceOptions
- Bag of options to control resource's behavior.
Constructor example
The following reference example uses placeholder values for all input properties.
var elasticsearchIndexTemplateResource = new Elasticstack.ElasticsearchIndexTemplate("elasticsearchIndexTemplateResource", new()
{
IndexPatterns = new[]
{
"string",
},
ComposedOfs = new[]
{
"string",
},
DataStream = new Elasticstack.Inputs.ElasticsearchIndexTemplateDataStreamArgs
{
AllowCustomRouting = false,
Hidden = false,
},
Metadata = "string",
Name = "string",
Priority = 0,
Template = new Elasticstack.Inputs.ElasticsearchIndexTemplateTemplateArgs
{
Aliases = new[]
{
new Elasticstack.Inputs.ElasticsearchIndexTemplateTemplateAliasArgs
{
Name = "string",
Filter = "string",
IndexRouting = "string",
IsHidden = false,
IsWriteIndex = false,
Routing = "string",
SearchRouting = "string",
},
},
Lifecycle = new Elasticstack.Inputs.ElasticsearchIndexTemplateTemplateLifecycleArgs
{
DataRetention = "string",
},
Mappings = "string",
Settings = "string",
},
Version = 0,
});
example, err := elasticstack.NewElasticsearchIndexTemplate(ctx, "elasticsearchIndexTemplateResource", &elasticstack.ElasticsearchIndexTemplateArgs{
IndexPatterns: pulumi.StringArray{
pulumi.String("string"),
},
ComposedOfs: pulumi.StringArray{
pulumi.String("string"),
},
DataStream: &elasticstack.ElasticsearchIndexTemplateDataStreamArgs{
AllowCustomRouting: pulumi.Bool(false),
Hidden: pulumi.Bool(false),
},
Metadata: pulumi.String("string"),
Name: pulumi.String("string"),
Priority: pulumi.Float64(0),
Template: &elasticstack.ElasticsearchIndexTemplateTemplateArgs{
Aliases: elasticstack.ElasticsearchIndexTemplateTemplateAliasArray{
&elasticstack.ElasticsearchIndexTemplateTemplateAliasArgs{
Name: pulumi.String("string"),
Filter: pulumi.String("string"),
IndexRouting: pulumi.String("string"),
IsHidden: pulumi.Bool(false),
IsWriteIndex: pulumi.Bool(false),
Routing: pulumi.String("string"),
SearchRouting: pulumi.String("string"),
},
},
Lifecycle: &elasticstack.ElasticsearchIndexTemplateTemplateLifecycleArgs{
DataRetention: pulumi.String("string"),
},
Mappings: pulumi.String("string"),
Settings: pulumi.String("string"),
},
Version: pulumi.Float64(0),
})
var elasticsearchIndexTemplateResource = new ElasticsearchIndexTemplate("elasticsearchIndexTemplateResource", ElasticsearchIndexTemplateArgs.builder()
.indexPatterns("string")
.composedOfs("string")
.dataStream(ElasticsearchIndexTemplateDataStreamArgs.builder()
.allowCustomRouting(false)
.hidden(false)
.build())
.metadata("string")
.name("string")
.priority(0)
.template(ElasticsearchIndexTemplateTemplateArgs.builder()
.aliases(ElasticsearchIndexTemplateTemplateAliasArgs.builder()
.name("string")
.filter("string")
.indexRouting("string")
.isHidden(false)
.isWriteIndex(false)
.routing("string")
.searchRouting("string")
.build())
.lifecycle(ElasticsearchIndexTemplateTemplateLifecycleArgs.builder()
.dataRetention("string")
.build())
.mappings("string")
.settings("string")
.build())
.version(0)
.build());
elasticsearch_index_template_resource = elasticstack.ElasticsearchIndexTemplate("elasticsearchIndexTemplateResource",
index_patterns=["string"],
composed_ofs=["string"],
data_stream={
"allow_custom_routing": False,
"hidden": False,
},
metadata="string",
name="string",
priority=0,
template={
"aliases": [{
"name": "string",
"filter": "string",
"index_routing": "string",
"is_hidden": False,
"is_write_index": False,
"routing": "string",
"search_routing": "string",
}],
"lifecycle": {
"data_retention": "string",
},
"mappings": "string",
"settings": "string",
},
version=0)
const elasticsearchIndexTemplateResource = new elasticstack.ElasticsearchIndexTemplate("elasticsearchIndexTemplateResource", {
indexPatterns: ["string"],
composedOfs: ["string"],
dataStream: {
allowCustomRouting: false,
hidden: false,
},
metadata: "string",
name: "string",
priority: 0,
template: {
aliases: [{
name: "string",
filter: "string",
indexRouting: "string",
isHidden: false,
isWriteIndex: false,
routing: "string",
searchRouting: "string",
}],
lifecycle: {
dataRetention: "string",
},
mappings: "string",
settings: "string",
},
version: 0,
});
type: elasticstack:ElasticsearchIndexTemplate
properties:
composedOfs:
- string
dataStream:
allowCustomRouting: false
hidden: false
indexPatterns:
- string
metadata: string
name: string
priority: 0
template:
aliases:
- filter: string
indexRouting: string
isHidden: false
isWriteIndex: false
name: string
routing: string
searchRouting: string
lifecycle:
dataRetention: string
mappings: string
settings: string
version: 0
ElasticsearchIndexTemplate Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The ElasticsearchIndexTemplate resource accepts the following input properties:
- Index
Patterns List<string> - Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
- Composed
Ofs List<string> - An ordered list of component template names.
- Data
Stream ElasticsearchIndex Template Data Stream - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- Elasticsearch
Connection ElasticsearchIndex 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.
- Metadata string
- Optional user metadata about the index template.
- Name string
- Name of the index template to create.
- Priority double
- Priority to determine index template precedence when a new data stream or index is created.
- Template
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.
- Index
Patterns []string - Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
- Composed
Ofs []string - An ordered list of component template names.
- Data
Stream ElasticsearchIndex Template Data Stream Args - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- Elasticsearch
Connection ElasticsearchIndex Template Elasticsearch Connection Args - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- Metadata string
- Optional user metadata about the index template.
- Name string
- Name of the index template to create.
- Priority float64
- Priority to determine index template precedence when a new data stream or index is created.
- Template
Elasticsearch
Index Template Template Args - 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.
- index
Patterns List<String> - Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
- composed
Ofs List<String> - An ordered list of component template names.
- data
Stream ElasticsearchIndex Template Data Stream - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- elasticsearch
Connection ElasticsearchIndex 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.
- metadata String
- Optional user metadata about the index template.
- name String
- Name of the index template to create.
- priority Double
- Priority to determine index template precedence when a new data stream or index is created.
- template
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.
- index
Patterns string[] - Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
- composed
Ofs string[] - An ordered list of component template names.
- data
Stream ElasticsearchIndex Template Data Stream - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- elasticsearch
Connection ElasticsearchIndex 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.
- metadata string
- Optional user metadata about the index template.
- name string
- Name of the index template to create.
- priority number
- Priority to determine index template precedence when a new data stream or index is created.
- template
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.
- index_
patterns Sequence[str] - Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
- composed_
ofs Sequence[str] - An ordered list of component template names.
- data_
stream ElasticsearchIndex Template Data Stream Args - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- elasticsearch_
connection ElasticsearchIndex Template Elasticsearch Connection Args - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- metadata str
- Optional user metadata about the index template.
- name str
- Name of the index template to create.
- priority float
- Priority to determine index template precedence when a new data stream or index is created.
- template
Elasticsearch
Index Template Template Args - 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.
- index
Patterns List<String> - Array of wildcard (*) expressions used to match the names of data streams and indices during creation.
- composed
Ofs List<String> - An ordered list of component template names.
- data
Stream Property Map - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- 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.
- metadata String
- Optional user metadata about the index template.
- name String
- Name of the index template to create.
- priority Number
- Priority to determine index template precedence when a new data stream or index is created.
- template 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.
Outputs
All input properties are implicitly available as output properties. Additionally, the ElasticsearchIndexTemplate resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Id string
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
- id string
- The provider-assigned unique ID for this managed resource.
- id str
- The provider-assigned unique ID for this managed resource.
- id String
- The provider-assigned unique ID for this managed resource.
Look up Existing ElasticsearchIndexTemplate Resource
Get an existing ElasticsearchIndexTemplate resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.
public static get(name: string, id: Input<ID>, state?: ElasticsearchIndexTemplateState, opts?: CustomResourceOptions): ElasticsearchIndexTemplate
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
composed_ofs: Optional[Sequence[str]] = None,
data_stream: Optional[ElasticsearchIndexTemplateDataStreamArgs] = None,
elasticsearch_connection: Optional[ElasticsearchIndexTemplateElasticsearchConnectionArgs] = None,
index_patterns: Optional[Sequence[str]] = None,
metadata: Optional[str] = None,
name: Optional[str] = None,
priority: Optional[float] = None,
template: Optional[ElasticsearchIndexTemplateTemplateArgs] = None,
version: Optional[float] = None) -> ElasticsearchIndexTemplate
func GetElasticsearchIndexTemplate(ctx *Context, name string, id IDInput, state *ElasticsearchIndexTemplateState, opts ...ResourceOption) (*ElasticsearchIndexTemplate, error)
public static ElasticsearchIndexTemplate Get(string name, Input<string> id, ElasticsearchIndexTemplateState? state, CustomResourceOptions? opts = null)
public static ElasticsearchIndexTemplate get(String name, Output<String> id, ElasticsearchIndexTemplateState state, CustomResourceOptions options)
resources: _: type: elasticstack:ElasticsearchIndexTemplate get: id: ${id}
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- resource_name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- name
- The unique name of the resulting resource.
- id
- The unique provider ID of the resource to lookup.
- state
- Any extra arguments used during the lookup.
- opts
- A bag of options that control this resource's behavior.
- Composed
Ofs List<string> - An ordered list of component template names.
- Data
Stream ElasticsearchIndex Template Data Stream - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- Elasticsearch
Connection ElasticsearchIndex 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.
- 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
- Name of the index template to create.
- Priority double
- Priority to determine index template precedence when a new data stream or index is created.
- Template
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.
- Composed
Ofs []string - An ordered list of component template names.
- Data
Stream ElasticsearchIndex Template Data Stream Args - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- Elasticsearch
Connection ElasticsearchIndex Template Elasticsearch Connection Args - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- 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
- Name of the index template to create.
- Priority float64
- Priority to determine index template precedence when a new data stream or index is created.
- Template
Elasticsearch
Index Template Template Args - 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.
- composed
Ofs List<String> - An ordered list of component template names.
- data
Stream ElasticsearchIndex Template Data Stream - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- elasticsearch
Connection ElasticsearchIndex 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.
- 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
- Name of the index template to create.
- priority Double
- Priority to determine index template precedence when a new data stream or index is created.
- template
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.
- composed
Ofs string[] - An ordered list of component template names.
- data
Stream ElasticsearchIndex Template Data Stream - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- elasticsearch
Connection ElasticsearchIndex 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.
- 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
- Name of the index template to create.
- priority number
- Priority to determine index template precedence when a new data stream or index is created.
- template
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.
- composed_
ofs Sequence[str] - An ordered list of component template names.
- data_
stream ElasticsearchIndex Template Data Stream Args - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- elasticsearch_
connection ElasticsearchIndex Template Elasticsearch Connection Args - Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.
- 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
- Name of the index template to create.
- priority float
- Priority to determine index template precedence when a new data stream or index is created.
- template
Elasticsearch
Index Template Template Args - 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.
- composed
Ofs List<String> - An ordered list of component template names.
- data
Stream Property Map - If this object is included, the template is used to create data streams and their backing indices. Supports an empty object.
- 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.
- 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
- Name of the index template to create.
- priority Number
- Priority to determine index template precedence when a new data stream or index is created.
- template 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.
Supporting Types
ElasticsearchIndexTemplateDataStream, ElasticsearchIndexTemplateDataStreamArgs
- Allow
Custom boolRouting - If
true
, the data stream supports custom routing. Defaults tofalse
. Available only in 8.x - bool
- If true, the data stream is hidden.
- Allow
Custom boolRouting - If
true
, the data stream supports custom routing. Defaults tofalse
. Available only in 8.x - bool
- If true, the data stream is hidden.
- allow
Custom BooleanRouting - If
true
, the data stream supports custom routing. Defaults tofalse
. Available only in 8.x - Boolean
- If true, the data stream is hidden.
- allow
Custom booleanRouting - If
true
, the data stream supports custom routing. Defaults tofalse
. Available only in 8.x - boolean
- If true, the data stream is hidden.
- allow_
custom_ boolrouting - If
true
, the data stream supports custom routing. Defaults tofalse
. Available only in 8.x - bool
- If true, the data stream is hidden.
- allow
Custom BooleanRouting - If
true
, the data stream supports custom routing. Defaults tofalse
. Available only in 8.x - Boolean
- If true, the data stream is hidden.
ElasticsearchIndexTemplateElasticsearchConnection, ElasticsearchIndexTemplateElasticsearchConnectionArgs
- 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.
ElasticsearchIndexTemplateTemplate, ElasticsearchIndexTemplateTemplateArgs
- Aliases
List<Elasticsearch
Index Template Template Alias> - Alias to add.
- Lifecycle
Elasticsearch
Index Template Template Lifecycle - 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
[]Elasticsearch
Index Template Template Alias - Alias to add.
- Lifecycle
Elasticsearch
Index Template Template Lifecycle - 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<Elasticsearch
Index Template Template Alias> - Alias to add.
- lifecycle
Elasticsearch
Index Template Template Lifecycle - 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
Elasticsearch
Index Template Template Alias[] - Alias to add.
- lifecycle
Elasticsearch
Index Template Template Lifecycle - 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
Sequence[Elasticsearch
Index Template Template Alias] - Alias to add.
- lifecycle
Elasticsearch
Index Template Template Lifecycle - 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 List<Property Map>
- Alias to add.
- lifecycle Property Map
- 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
ElasticsearchIndexTemplateTemplateAlias, ElasticsearchIndexTemplateTemplateAliasArgs
- Name string
- The alias name.
- 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. - bool
- If true, the alias is hidden.
- Is
Write boolIndex - If true, the index is the write index for the alias.
- 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.
- Name string
- The alias name.
- 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. - bool
- If true, the alias is hidden.
- Is
Write boolIndex - If true, the index is the write index for the alias.
- 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.
- name String
- The alias name.
- 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. - Boolean
- If true, the alias is hidden.
- is
Write BooleanIndex - If true, the index is the write index for the alias.
- 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.
- name string
- The alias name.
- 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. - boolean
- If true, the alias is hidden.
- is
Write booleanIndex - If true, the index is the write index for the alias.
- 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.
- name str
- The alias name.
- 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. - bool
- If true, the alias is hidden.
- is_
write_ boolindex - If true, the index is the write index for the alias.
- 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.
- name String
- The alias name.
- 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. - Boolean
- If true, the alias is hidden.
- is
Write BooleanIndex - If true, the index is the write index for the alias.
- 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.
ElasticsearchIndexTemplateTemplateLifecycle, ElasticsearchIndexTemplateTemplateLifecycleArgs
- Data
Retention 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.
- data
Retention 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.
- data_
retention str - 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.
Import
$ pulumi import elasticstack:index/elasticsearchIndexTemplate:ElasticsearchIndexTemplate my_template <cluster_uuid>/<template_name>
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstack
Terraform Provider.