1. Packages
  2. Elasticstack Provider
  3. API Docs
  4. ElasticsearchComponentTemplate
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic

elasticstack.ElasticsearchComponentTemplate

Explore with Pulumi AI

elasticstack logo
elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic

    Creates or updates a component template. Component templates are building blocks for constructing index templates that specify index mappings, settings, and aliases. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/indices-component-template.html

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    const myTemplateElasticsearchComponentTemplate = new elasticstack.ElasticsearchComponentTemplate("myTemplateElasticsearchComponentTemplate", {template: {
        aliases: [{
            name: "my_template_test",
        }],
        settings: JSON.stringify({
            number_of_shards: "3",
        }),
    }});
    const myTemplateElasticsearchIndexTemplate = new elasticstack.ElasticsearchIndexTemplate("myTemplateElasticsearchIndexTemplate", {
        indexPatterns: ["stream*"],
        composedOfs: [myTemplateElasticsearchComponentTemplate.name],
    });
    
    import pulumi
    import json
    import pulumi_elasticstack as elasticstack
    
    my_template_elasticsearch_component_template = elasticstack.ElasticsearchComponentTemplate("myTemplateElasticsearchComponentTemplate", template={
        "aliases": [{
            "name": "my_template_test",
        }],
        "settings": json.dumps({
            "number_of_shards": "3",
        }),
    })
    my_template_elasticsearch_index_template = elasticstack.ElasticsearchIndexTemplate("myTemplateElasticsearchIndexTemplate",
        index_patterns=["stream*"],
        composed_ofs=[my_template_elasticsearch_component_template.name])
    
    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)
    		myTemplateElasticsearchComponentTemplate, err := elasticstack.NewElasticsearchComponentTemplate(ctx, "myTemplateElasticsearchComponentTemplate", &elasticstack.ElasticsearchComponentTemplateArgs{
    			Template: &elasticstack.ElasticsearchComponentTemplateTemplateArgs{
    				Aliases: elasticstack.ElasticsearchComponentTemplateTemplateAliasArray{
    					&elasticstack.ElasticsearchComponentTemplateTemplateAliasArgs{
    						Name: pulumi.String("my_template_test"),
    					},
    				},
    				Settings: pulumi.String(json0),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = elasticstack.NewElasticsearchIndexTemplate(ctx, "myTemplateElasticsearchIndexTemplate", &elasticstack.ElasticsearchIndexTemplateArgs{
    			IndexPatterns: pulumi.StringArray{
    				pulumi.String("stream*"),
    			},
    			ComposedOfs: pulumi.StringArray{
    				myTemplateElasticsearchComponentTemplate.Name,
    			},
    		})
    		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 myTemplateElasticsearchComponentTemplate = new Elasticstack.ElasticsearchComponentTemplate("myTemplateElasticsearchComponentTemplate", new()
        {
            Template = new Elasticstack.Inputs.ElasticsearchComponentTemplateTemplateArgs
            {
                Aliases = new[]
                {
                    new Elasticstack.Inputs.ElasticsearchComponentTemplateTemplateAliasArgs
                    {
                        Name = "my_template_test",
                    },
                },
                Settings = JsonSerializer.Serialize(new Dictionary<string, object?>
                {
                    ["number_of_shards"] = "3",
                }),
            },
        });
    
        var myTemplateElasticsearchIndexTemplate = new Elasticstack.ElasticsearchIndexTemplate("myTemplateElasticsearchIndexTemplate", new()
        {
            IndexPatterns = new[]
            {
                "stream*",
            },
            ComposedOfs = new[]
            {
                myTemplateElasticsearchComponentTemplate.Name,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.elasticstack.ElasticsearchComponentTemplate;
    import com.pulumi.elasticstack.ElasticsearchComponentTemplateArgs;
    import com.pulumi.elasticstack.inputs.ElasticsearchComponentTemplateTemplateArgs;
    import com.pulumi.elasticstack.ElasticsearchIndexTemplate;
    import com.pulumi.elasticstack.ElasticsearchIndexTemplateArgs;
    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 myTemplateElasticsearchComponentTemplate = new ElasticsearchComponentTemplate("myTemplateElasticsearchComponentTemplate", ElasticsearchComponentTemplateArgs.builder()
                .template(ElasticsearchComponentTemplateTemplateArgs.builder()
                    .aliases(ElasticsearchComponentTemplateTemplateAliasArgs.builder()
                        .name("my_template_test")
                        .build())
                    .settings(serializeJson(
                        jsonObject(
                            jsonProperty("number_of_shards", "3")
                        )))
                    .build())
                .build());
    
            var myTemplateElasticsearchIndexTemplate = new ElasticsearchIndexTemplate("myTemplateElasticsearchIndexTemplate", ElasticsearchIndexTemplateArgs.builder()
                .indexPatterns("stream*")
                .composedOfs(myTemplateElasticsearchComponentTemplate.name())
                .build());
    
        }
    }
    
    resources:
      myTemplateElasticsearchComponentTemplate:
        type: elasticstack:ElasticsearchComponentTemplate
        properties:
          template:
            aliases:
              - name: my_template_test
            settings:
              fn::toJSON:
                number_of_shards: '3'
      myTemplateElasticsearchIndexTemplate:
        type: elasticstack:ElasticsearchIndexTemplate
        properties:
          indexPatterns:
            - stream*
          composedOfs:
            - ${myTemplateElasticsearchComponentTemplate.name}
    

    Create ElasticsearchComponentTemplate Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ElasticsearchComponentTemplate(name: string, args: ElasticsearchComponentTemplateArgs, opts?: CustomResourceOptions);
    @overload
    def ElasticsearchComponentTemplate(resource_name: str,
                                       args: ElasticsearchComponentTemplateArgs,
                                       opts: Optional[ResourceOptions] = None)
    
    @overload
    def ElasticsearchComponentTemplate(resource_name: str,
                                       opts: Optional[ResourceOptions] = None,
                                       template: Optional[ElasticsearchComponentTemplateTemplateArgs] = None,
                                       elasticsearch_connection: Optional[ElasticsearchComponentTemplateElasticsearchConnectionArgs] = None,
                                       metadata: Optional[str] = None,
                                       name: Optional[str] = None,
                                       version: Optional[float] = None)
    func NewElasticsearchComponentTemplate(ctx *Context, name string, args ElasticsearchComponentTemplateArgs, opts ...ResourceOption) (*ElasticsearchComponentTemplate, error)
    public ElasticsearchComponentTemplate(string name, ElasticsearchComponentTemplateArgs args, CustomResourceOptions? opts = null)
    public ElasticsearchComponentTemplate(String name, ElasticsearchComponentTemplateArgs args)
    public ElasticsearchComponentTemplate(String name, ElasticsearchComponentTemplateArgs args, CustomResourceOptions options)
    
    type: elasticstack:ElasticsearchComponentTemplate
    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 ElasticsearchComponentTemplateArgs
    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 ElasticsearchComponentTemplateArgs
    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 ElasticsearchComponentTemplateArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ElasticsearchComponentTemplateArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ElasticsearchComponentTemplateArgs
    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 elasticsearchComponentTemplateResource = new Elasticstack.ElasticsearchComponentTemplate("elasticsearchComponentTemplateResource", new()
    {
        Template = new Elasticstack.Inputs.ElasticsearchComponentTemplateTemplateArgs
        {
            Aliases = new[]
            {
                new Elasticstack.Inputs.ElasticsearchComponentTemplateTemplateAliasArgs
                {
                    Name = "string",
                    Filter = "string",
                    IndexRouting = "string",
                    IsHidden = false,
                    IsWriteIndex = false,
                    Routing = "string",
                    SearchRouting = "string",
                },
            },
            Mappings = "string",
            Settings = "string",
        },
        Metadata = "string",
        Name = "string",
        Version = 0,
    });
    
    example, err := elasticstack.NewElasticsearchComponentTemplate(ctx, "elasticsearchComponentTemplateResource", &elasticstack.ElasticsearchComponentTemplateArgs{
    	Template: &elasticstack.ElasticsearchComponentTemplateTemplateArgs{
    		Aliases: elasticstack.ElasticsearchComponentTemplateTemplateAliasArray{
    			&elasticstack.ElasticsearchComponentTemplateTemplateAliasArgs{
    				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"),
    			},
    		},
    		Mappings: pulumi.String("string"),
    		Settings: pulumi.String("string"),
    	},
    	Metadata: pulumi.String("string"),
    	Name:     pulumi.String("string"),
    	Version:  pulumi.Float64(0),
    })
    
    var elasticsearchComponentTemplateResource = new ElasticsearchComponentTemplate("elasticsearchComponentTemplateResource", ElasticsearchComponentTemplateArgs.builder()
        .template(ElasticsearchComponentTemplateTemplateArgs.builder()
            .aliases(ElasticsearchComponentTemplateTemplateAliasArgs.builder()
                .name("string")
                .filter("string")
                .indexRouting("string")
                .isHidden(false)
                .isWriteIndex(false)
                .routing("string")
                .searchRouting("string")
                .build())
            .mappings("string")
            .settings("string")
            .build())
        .metadata("string")
        .name("string")
        .version(0)
        .build());
    
    elasticsearch_component_template_resource = elasticstack.ElasticsearchComponentTemplate("elasticsearchComponentTemplateResource",
        template={
            "aliases": [{
                "name": "string",
                "filter": "string",
                "index_routing": "string",
                "is_hidden": False,
                "is_write_index": False,
                "routing": "string",
                "search_routing": "string",
            }],
            "mappings": "string",
            "settings": "string",
        },
        metadata="string",
        name="string",
        version=0)
    
    const elasticsearchComponentTemplateResource = new elasticstack.ElasticsearchComponentTemplate("elasticsearchComponentTemplateResource", {
        template: {
            aliases: [{
                name: "string",
                filter: "string",
                indexRouting: "string",
                isHidden: false,
                isWriteIndex: false,
                routing: "string",
                searchRouting: "string",
            }],
            mappings: "string",
            settings: "string",
        },
        metadata: "string",
        name: "string",
        version: 0,
    });
    
    type: elasticstack:ElasticsearchComponentTemplate
    properties:
        metadata: string
        name: string
        template:
            aliases:
                - filter: string
                  indexRouting: string
                  isHidden: false
                  isWriteIndex: false
                  name: string
                  routing: string
                  searchRouting: string
            mappings: string
            settings: string
        version: 0
    

    ElasticsearchComponentTemplate 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 ElasticsearchComponentTemplate resource accepts the following input properties:

    Template ElasticsearchComponentTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    ElasticsearchConnection ElasticsearchComponentTemplateElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    Metadata string
    Optional user metadata about the component template.
    Name string
    Name of the component template to create.
    Version double
    Version number used to manage component templates externally.
    Template ElasticsearchComponentTemplateTemplateArgs
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    ElasticsearchConnection ElasticsearchComponentTemplateElasticsearchConnectionArgs
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    Metadata string
    Optional user metadata about the component template.
    Name string
    Name of the component template to create.
    Version float64
    Version number used to manage component templates externally.
    template ElasticsearchComponentTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    elasticsearchConnection ElasticsearchComponentTemplateElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    metadata String
    Optional user metadata about the component template.
    name String
    Name of the component template to create.
    version Double
    Version number used to manage component templates externally.
    template ElasticsearchComponentTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    elasticsearchConnection ElasticsearchComponentTemplateElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    metadata string
    Optional user metadata about the component template.
    name string
    Name of the component template to create.
    version number
    Version number used to manage component templates externally.
    template ElasticsearchComponentTemplateTemplateArgs
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    elasticsearch_connection ElasticsearchComponentTemplateElasticsearchConnectionArgs
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    metadata str
    Optional user metadata about the component template.
    name str
    Name of the component template to create.
    version float
    Version number used to manage component templates externally.
    template Property Map
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    elasticsearchConnection 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.

    Deprecated: Deprecated

    metadata String
    Optional user metadata about the component template.
    name String
    Name of the component template to create.
    version Number
    Version number used to manage component templates externally.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ElasticsearchComponentTemplate 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 ElasticsearchComponentTemplate Resource

    Get an existing ElasticsearchComponentTemplate 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?: ElasticsearchComponentTemplateState, opts?: CustomResourceOptions): ElasticsearchComponentTemplate
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            elasticsearch_connection: Optional[ElasticsearchComponentTemplateElasticsearchConnectionArgs] = None,
            metadata: Optional[str] = None,
            name: Optional[str] = None,
            template: Optional[ElasticsearchComponentTemplateTemplateArgs] = None,
            version: Optional[float] = None) -> ElasticsearchComponentTemplate
    func GetElasticsearchComponentTemplate(ctx *Context, name string, id IDInput, state *ElasticsearchComponentTemplateState, opts ...ResourceOption) (*ElasticsearchComponentTemplate, error)
    public static ElasticsearchComponentTemplate Get(string name, Input<string> id, ElasticsearchComponentTemplateState? state, CustomResourceOptions? opts = null)
    public static ElasticsearchComponentTemplate get(String name, Output<String> id, ElasticsearchComponentTemplateState state, CustomResourceOptions options)
    resources:  _:    type: elasticstack:ElasticsearchComponentTemplate    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.
    The following state arguments are supported:
    ElasticsearchConnection ElasticsearchComponentTemplateElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    Metadata string
    Optional user metadata about the component template.
    Name string
    Name of the component template to create.
    Template ElasticsearchComponentTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    Version double
    Version number used to manage component templates externally.
    ElasticsearchConnection ElasticsearchComponentTemplateElasticsearchConnectionArgs
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    Metadata string
    Optional user metadata about the component template.
    Name string
    Name of the component template to create.
    Template ElasticsearchComponentTemplateTemplateArgs
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    Version float64
    Version number used to manage component templates externally.
    elasticsearchConnection ElasticsearchComponentTemplateElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    metadata String
    Optional user metadata about the component template.
    name String
    Name of the component template to create.
    template ElasticsearchComponentTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    version Double
    Version number used to manage component templates externally.
    elasticsearchConnection ElasticsearchComponentTemplateElasticsearchConnection
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    metadata string
    Optional user metadata about the component template.
    name string
    Name of the component template to create.
    template ElasticsearchComponentTemplateTemplate
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    version number
    Version number used to manage component templates externally.
    elasticsearch_connection ElasticsearchComponentTemplateElasticsearchConnectionArgs
    Elasticsearch connection configuration block. This property will be removed in a future provider version. Configure the Elasticsearch connection via the provider configuration instead.

    Deprecated: Deprecated

    metadata str
    Optional user metadata about the component template.
    name str
    Name of the component template to create.
    template ElasticsearchComponentTemplateTemplateArgs
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    version float
    Version number used to manage component templates externally.
    elasticsearchConnection 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.

    Deprecated: Deprecated

    metadata String
    Optional user metadata about the component template.
    name String
    Name of the component template to create.
    template Property Map
    Template to be applied. It may optionally include an aliases, mappings, or settings configuration.
    version Number
    Version number used to manage component templates externally.

    Supporting Types

    ElasticsearchComponentTemplateElasticsearchConnection, ElasticsearchComponentTemplateElasticsearchConnectionArgs

    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
    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
    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 List<String>
    esClientAuthentication String
    ES Client Authentication field to be used with the JWT token
    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
    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
    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
    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.

    ElasticsearchComponentTemplateTemplate, ElasticsearchComponentTemplateTemplateArgs

    Aliases List<ElasticsearchComponentTemplateTemplateAlias>
    Alias to add.
    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 []ElasticsearchComponentTemplateTemplateAlias
    Alias to add.
    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<ElasticsearchComponentTemplateTemplateAlias>
    Alias to add.
    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 ElasticsearchComponentTemplateTemplateAlias[]
    Alias to add.
    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[ElasticsearchComponentTemplateTemplateAlias]
    Alias to add.
    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.
    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

    ElasticsearchComponentTemplateTemplateAlias, ElasticsearchComponentTemplateTemplateAliasArgs

    Name string
    The alias name. Index alias names support date math. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/date-math-index-names.html
    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.
    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.
    Name string
    The alias name. Index alias names support date math. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/date-math-index-names.html
    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.
    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.
    name String
    The alias name. Index alias names support date math. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/date-math-index-names.html
    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.
    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.
    name string
    The alias name. Index alias names support date math. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/date-math-index-names.html
    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.
    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.
    name str
    The alias name. Index alias names support date math. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/date-math-index-names.html
    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.
    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. Index alias names support date math. See, https://www.elastic.co/guide/en/elasticsearch/reference/current/date-math-index-names.html
    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.
    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.

    Import

    $ pulumi import elasticstack:index/elasticsearchComponentTemplate:ElasticsearchComponentTemplate my_template <cluster_uuid>/<component_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.
    elasticstack logo
    elasticstack 0.11.15 published on Wednesday, Apr 23, 2025 by elastic