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

elasticstack.ElasticsearchDataStream

Explore with Pulumi AI

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

    Manages data streams. This resource can create, delete and show the information about the created data stream. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/data-stream-apis.html

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    // Create an ILM policy for our data stream
    const myIlm = new elasticstack.ElasticsearchIndexLifecycle("myIlm", {
        hot: {
            minAge: "1h",
            setPriority: {
                priority: 10,
            },
            rollover: {
                maxAge: "1d",
            },
            readonly: {},
        },
        "delete": {
            minAge: "2d",
            "delete": {},
        },
    });
    // First we must have a index template created
    const myDataStreamTemplate = new elasticstack.ElasticsearchIndexTemplate("myDataStreamTemplate", {
        indexPatterns: ["my-stream*"],
        template: {
            settings: pulumi.jsonStringify({
                "lifecycle.name": myIlm.name,
            }),
        },
        dataStream: {},
    });
    // and now we can create data stream based on the index template
    const myDataStream = new elasticstack.ElasticsearchDataStream("myDataStream", {}, {
        dependsOn: [myDataStreamTemplate],
    });
    
    import pulumi
    import json
    import pulumi_elasticstack as elasticstack
    
    # Create an ILM policy for our data stream
    my_ilm = elasticstack.ElasticsearchIndexLifecycle("myIlm",
        hot={
            "min_age": "1h",
            "set_priority": {
                "priority": 10,
            },
            "rollover": {
                "max_age": "1d",
            },
            "readonly": {},
        },
        delete={
            "min_age": "2d",
            "delete": {},
        })
    # First we must have a index template created
    my_data_stream_template = elasticstack.ElasticsearchIndexTemplate("myDataStreamTemplate",
        index_patterns=["my-stream*"],
        template={
            "settings": pulumi.Output.json_dumps({
                "lifecycle.name": my_ilm.name,
            }),
        },
        data_stream={})
    # and now we can create data stream based on the index template
    my_data_stream = elasticstack.ElasticsearchDataStream("myDataStream", opts = pulumi.ResourceOptions(depends_on=[my_data_stream_template]))
    
    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 {
    		// Create an ILM policy for our data stream
    		myIlm, err := elasticstack.NewElasticsearchIndexLifecycle(ctx, "myIlm", &elasticstack.ElasticsearchIndexLifecycleArgs{
    			Hot: &elasticstack.ElasticsearchIndexLifecycleHotArgs{
    				MinAge: pulumi.String("1h"),
    				SetPriority: &elasticstack.ElasticsearchIndexLifecycleHotSetPriorityArgs{
    					Priority: pulumi.Float64(10),
    				},
    				Rollover: &elasticstack.ElasticsearchIndexLifecycleHotRolloverArgs{
    					MaxAge: pulumi.String("1d"),
    				},
    				Readonly: &elasticstack.ElasticsearchIndexLifecycleHotReadonlyArgs{},
    			},
    			Delete: &elasticstack.ElasticsearchIndexLifecycleDeleteArgs{
    				MinAge: pulumi.String("2d"),
    				Delete: &elasticstack.ElasticsearchIndexLifecycleDeleteDeleteArgs{},
    			},
    		})
    		if err != nil {
    			return err
    		}
    		// First we must have a index template created
    		myDataStreamTemplate, err := elasticstack.NewElasticsearchIndexTemplate(ctx, "myDataStreamTemplate", &elasticstack.ElasticsearchIndexTemplateArgs{
    			IndexPatterns: pulumi.StringArray{
    				pulumi.String("my-stream*"),
    			},
    			Template: &elasticstack.ElasticsearchIndexTemplateTemplateArgs{
    				Settings: myIlm.Name.ApplyT(func(name string) (pulumi.String, error) {
    					var _zero pulumi.String
    					tmpJSON0, err := json.Marshal(map[string]interface{}{
    						"lifecycle.name": name,
    					})
    					if err != nil {
    						return _zero, err
    					}
    					json0 := string(tmpJSON0)
    					return pulumi.String(json0), nil
    				}).(pulumi.StringOutput),
    			},
    			DataStream: &elasticstack.ElasticsearchIndexTemplateDataStreamArgs{},
    		})
    		if err != nil {
    			return err
    		}
    		// and now we can create data stream based on the index template
    		_, err = elasticstack.NewElasticsearchDataStream(ctx, "myDataStream", nil, pulumi.DependsOn([]pulumi.Resource{
    			myDataStreamTemplate,
    		}))
    		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(() => 
    {
        // Create an ILM policy for our data stream
        var myIlm = new Elasticstack.ElasticsearchIndexLifecycle("myIlm", new()
        {
            Hot = new Elasticstack.Inputs.ElasticsearchIndexLifecycleHotArgs
            {
                MinAge = "1h",
                SetPriority = new Elasticstack.Inputs.ElasticsearchIndexLifecycleHotSetPriorityArgs
                {
                    Priority = 10,
                },
                Rollover = new Elasticstack.Inputs.ElasticsearchIndexLifecycleHotRolloverArgs
                {
                    MaxAge = "1d",
                },
                Readonly = null,
            },
            Delete = new Elasticstack.Inputs.ElasticsearchIndexLifecycleDeleteArgs
            {
                MinAge = "2d",
                Delete = null,
            },
        });
    
        // First we must have a index template created
        var myDataStreamTemplate = new Elasticstack.ElasticsearchIndexTemplate("myDataStreamTemplate", new()
        {
            IndexPatterns = new[]
            {
                "my-stream*",
            },
            Template = new Elasticstack.Inputs.ElasticsearchIndexTemplateTemplateArgs
            {
                Settings = Output.JsonSerialize(Output.Create(new Dictionary<string, object?>
                {
                    ["lifecycle.name"] = myIlm.Name,
                })),
            },
            DataStream = null,
        });
    
        // and now we can create data stream based on the index template
        var myDataStream = new Elasticstack.ElasticsearchDataStream("myDataStream", new()
        {
        }, new CustomResourceOptions
        {
            DependsOn =
            {
                myDataStreamTemplate,
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.elasticstack.ElasticsearchIndexLifecycle;
    import com.pulumi.elasticstack.ElasticsearchIndexLifecycleArgs;
    import com.pulumi.elasticstack.inputs.ElasticsearchIndexLifecycleHotArgs;
    import com.pulumi.elasticstack.inputs.ElasticsearchIndexLifecycleHotSetPriorityArgs;
    import com.pulumi.elasticstack.inputs.ElasticsearchIndexLifecycleHotRolloverArgs;
    import com.pulumi.elasticstack.inputs.ElasticsearchIndexLifecycleHotReadonlyArgs;
    import com.pulumi.elasticstack.inputs.ElasticsearchIndexLifecycleDeleteArgs;
    import com.pulumi.elasticstack.inputs.ElasticsearchIndexLifecycleDeleteDeleteArgs;
    import com.pulumi.elasticstack.ElasticsearchIndexTemplate;
    import com.pulumi.elasticstack.ElasticsearchIndexTemplateArgs;
    import com.pulumi.elasticstack.inputs.ElasticsearchIndexTemplateTemplateArgs;
    import com.pulumi.elasticstack.inputs.ElasticsearchIndexTemplateDataStreamArgs;
    import com.pulumi.elasticstack.ElasticsearchDataStream;
    import com.pulumi.elasticstack.ElasticsearchDataStreamArgs;
    import static com.pulumi.codegen.internal.Serialization.*;
    import com.pulumi.resources.CustomResourceOptions;
    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) {
            // Create an ILM policy for our data stream
            var myIlm = new ElasticsearchIndexLifecycle("myIlm", ElasticsearchIndexLifecycleArgs.builder()
                .hot(ElasticsearchIndexLifecycleHotArgs.builder()
                    .minAge("1h")
                    .setPriority(ElasticsearchIndexLifecycleHotSetPriorityArgs.builder()
                        .priority(10)
                        .build())
                    .rollover(ElasticsearchIndexLifecycleHotRolloverArgs.builder()
                        .maxAge("1d")
                        .build())
                    .readonly()
                    .build())
                .delete(ElasticsearchIndexLifecycleDeleteArgs.builder()
                    .minAge("2d")
                    .delete()
                    .build())
                .build());
    
            // First we must have a index template created
            var myDataStreamTemplate = new ElasticsearchIndexTemplate("myDataStreamTemplate", ElasticsearchIndexTemplateArgs.builder()
                .indexPatterns("my-stream*")
                .template(ElasticsearchIndexTemplateTemplateArgs.builder()
                    .settings(myIlm.name().applyValue(name -> serializeJson(
                        jsonObject(
                            jsonProperty("lifecycle.name", name)
                        ))))
                    .build())
                .dataStream()
                .build());
    
            // and now we can create data stream based on the index template
            var myDataStream = new ElasticsearchDataStream("myDataStream", ElasticsearchDataStreamArgs.Empty, CustomResourceOptions.builder()
                .dependsOn(myDataStreamTemplate)
                .build());
    
        }
    }
    
    resources:
      # Create an ILM policy for our data stream
      myIlm:
        type: elasticstack:ElasticsearchIndexLifecycle
        properties:
          hot:
            minAge: 1h
            setPriority:
              priority: 10
            rollover:
              maxAge: 1d
            readonly: {}
          delete:
            minAge: 2d
            delete: {}
      # First we must have a index template created
      myDataStreamTemplate:
        type: elasticstack:ElasticsearchIndexTemplate
        properties:
          indexPatterns:
            - my-stream*
          template:
            settings:
              fn::toJSON:
                lifecycle.name: ${myIlm.name}
          dataStream: {}
      # and now we can create data stream based on the index template
      myDataStream:
        type: elasticstack:ElasticsearchDataStream
        options:
          dependsOn:
            - ${myDataStreamTemplate}
    

    Create ElasticsearchDataStream Resource

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

    Constructor syntax

    new ElasticsearchDataStream(name: string, args?: ElasticsearchDataStreamArgs, opts?: CustomResourceOptions);
    @overload
    def ElasticsearchDataStream(resource_name: str,
                                args: Optional[ElasticsearchDataStreamArgs] = None,
                                opts: Optional[ResourceOptions] = None)
    
    @overload
    def ElasticsearchDataStream(resource_name: str,
                                opts: Optional[ResourceOptions] = None,
                                elasticsearch_connection: Optional[ElasticsearchDataStreamElasticsearchConnectionArgs] = None,
                                name: Optional[str] = None)
    func NewElasticsearchDataStream(ctx *Context, name string, args *ElasticsearchDataStreamArgs, opts ...ResourceOption) (*ElasticsearchDataStream, error)
    public ElasticsearchDataStream(string name, ElasticsearchDataStreamArgs? args = null, CustomResourceOptions? opts = null)
    public ElasticsearchDataStream(String name, ElasticsearchDataStreamArgs args)
    public ElasticsearchDataStream(String name, ElasticsearchDataStreamArgs args, CustomResourceOptions options)
    
    type: elasticstack:ElasticsearchDataStream
    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 ElasticsearchDataStreamArgs
    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 ElasticsearchDataStreamArgs
    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 ElasticsearchDataStreamArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ElasticsearchDataStreamArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ElasticsearchDataStreamArgs
    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 elasticsearchDataStreamResource = new Elasticstack.ElasticsearchDataStream("elasticsearchDataStreamResource", new()
    {
        Name = "string",
    });
    
    example, err := elasticstack.NewElasticsearchDataStream(ctx, "elasticsearchDataStreamResource", &elasticstack.ElasticsearchDataStreamArgs{
    	Name: pulumi.String("string"),
    })
    
    var elasticsearchDataStreamResource = new ElasticsearchDataStream("elasticsearchDataStreamResource", ElasticsearchDataStreamArgs.builder()
        .name("string")
        .build());
    
    elasticsearch_data_stream_resource = elasticstack.ElasticsearchDataStream("elasticsearchDataStreamResource", name="string")
    
    const elasticsearchDataStreamResource = new elasticstack.ElasticsearchDataStream("elasticsearchDataStreamResource", {name: "string"});
    
    type: elasticstack:ElasticsearchDataStream
    properties:
        name: string
    

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

    ElasticsearchConnection ElasticsearchDataStreamElasticsearchConnection
    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

    Name string
    Name of the data stream to create.
    ElasticsearchConnection ElasticsearchDataStreamElasticsearchConnectionArgs
    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

    Name string
    Name of the data stream to create.
    elasticsearchConnection ElasticsearchDataStreamElasticsearchConnection
    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

    name String
    Name of the data stream to create.
    elasticsearchConnection ElasticsearchDataStreamElasticsearchConnection
    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

    name string
    Name of the data stream to create.
    elasticsearch_connection ElasticsearchDataStreamElasticsearchConnectionArgs
    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

    name str
    Name of the data stream to create.
    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

    name String
    Name of the data stream to create.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ElasticsearchDataStream resource produces the following output properties:

    Generation double
    Current generation for the data stream.
    Hidden bool
    If true, the data stream is hidden.
    Id string
    The provider-assigned unique ID for this managed resource.
    IlmPolicy string
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    Indices List<ElasticsearchDataStreamIndex>
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    Metadata string
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    Replicated bool
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    Status string
    Health status of the data stream.
    System bool
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    Template string
    Name of the index template used to create the data stream’s backing indices.
    TimestampField string
    Contains information about the data stream’s @timestamp field.
    Generation float64
    Current generation for the data stream.
    Hidden bool
    If true, the data stream is hidden.
    Id string
    The provider-assigned unique ID for this managed resource.
    IlmPolicy string
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    Indices []ElasticsearchDataStreamIndex
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    Metadata string
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    Replicated bool
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    Status string
    Health status of the data stream.
    System bool
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    Template string
    Name of the index template used to create the data stream’s backing indices.
    TimestampField string
    Contains information about the data stream’s @timestamp field.
    generation Double
    Current generation for the data stream.
    hidden Boolean
    If true, the data stream is hidden.
    id String
    The provider-assigned unique ID for this managed resource.
    ilmPolicy String
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    indices List<ElasticsearchDataStreamIndex>
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    metadata String
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    replicated Boolean
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    status String
    Health status of the data stream.
    system Boolean
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    template String
    Name of the index template used to create the data stream’s backing indices.
    timestampField String
    Contains information about the data stream’s @timestamp field.
    generation number
    Current generation for the data stream.
    hidden boolean
    If true, the data stream is hidden.
    id string
    The provider-assigned unique ID for this managed resource.
    ilmPolicy string
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    indices ElasticsearchDataStreamIndex[]
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    metadata string
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    replicated boolean
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    status string
    Health status of the data stream.
    system boolean
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    template string
    Name of the index template used to create the data stream’s backing indices.
    timestampField string
    Contains information about the data stream’s @timestamp field.
    generation float
    Current generation for the data stream.
    hidden bool
    If true, the data stream is hidden.
    id str
    The provider-assigned unique ID for this managed resource.
    ilm_policy str
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    indices Sequence[ElasticsearchDataStreamIndex]
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    metadata str
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    replicated bool
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    status str
    Health status of the data stream.
    system bool
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    template str
    Name of the index template used to create the data stream’s backing indices.
    timestamp_field str
    Contains information about the data stream’s @timestamp field.
    generation Number
    Current generation for the data stream.
    hidden Boolean
    If true, the data stream is hidden.
    id String
    The provider-assigned unique ID for this managed resource.
    ilmPolicy String
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    indices List<Property Map>
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    metadata String
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    replicated Boolean
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    status String
    Health status of the data stream.
    system Boolean
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    template String
    Name of the index template used to create the data stream’s backing indices.
    timestampField String
    Contains information about the data stream’s @timestamp field.

    Look up Existing ElasticsearchDataStream Resource

    Get an existing ElasticsearchDataStream 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?: ElasticsearchDataStreamState, opts?: CustomResourceOptions): ElasticsearchDataStream
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            elasticsearch_connection: Optional[ElasticsearchDataStreamElasticsearchConnectionArgs] = None,
            generation: Optional[float] = None,
            hidden: Optional[bool] = None,
            ilm_policy: Optional[str] = None,
            indices: Optional[Sequence[ElasticsearchDataStreamIndexArgs]] = None,
            metadata: Optional[str] = None,
            name: Optional[str] = None,
            replicated: Optional[bool] = None,
            status: Optional[str] = None,
            system: Optional[bool] = None,
            template: Optional[str] = None,
            timestamp_field: Optional[str] = None) -> ElasticsearchDataStream
    func GetElasticsearchDataStream(ctx *Context, name string, id IDInput, state *ElasticsearchDataStreamState, opts ...ResourceOption) (*ElasticsearchDataStream, error)
    public static ElasticsearchDataStream Get(string name, Input<string> id, ElasticsearchDataStreamState? state, CustomResourceOptions? opts = null)
    public static ElasticsearchDataStream get(String name, Output<String> id, ElasticsearchDataStreamState state, CustomResourceOptions options)
    resources:  _:    type: elasticstack:ElasticsearchDataStream    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 ElasticsearchDataStreamElasticsearchConnection
    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

    Generation double
    Current generation for the data stream.
    Hidden bool
    If true, the data stream is hidden.
    IlmPolicy string
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    Indices List<ElasticsearchDataStreamIndex>
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    Metadata string
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    Name string
    Name of the data stream to create.
    Replicated bool
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    Status string
    Health status of the data stream.
    System bool
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    Template string
    Name of the index template used to create the data stream’s backing indices.
    TimestampField string
    Contains information about the data stream’s @timestamp field.
    ElasticsearchConnection ElasticsearchDataStreamElasticsearchConnectionArgs
    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

    Generation float64
    Current generation for the data stream.
    Hidden bool
    If true, the data stream is hidden.
    IlmPolicy string
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    Indices []ElasticsearchDataStreamIndexArgs
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    Metadata string
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    Name string
    Name of the data stream to create.
    Replicated bool
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    Status string
    Health status of the data stream.
    System bool
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    Template string
    Name of the index template used to create the data stream’s backing indices.
    TimestampField string
    Contains information about the data stream’s @timestamp field.
    elasticsearchConnection ElasticsearchDataStreamElasticsearchConnection
    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

    generation Double
    Current generation for the data stream.
    hidden Boolean
    If true, the data stream is hidden.
    ilmPolicy String
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    indices List<ElasticsearchDataStreamIndex>
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    metadata String
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    name String
    Name of the data stream to create.
    replicated Boolean
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    status String
    Health status of the data stream.
    system Boolean
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    template String
    Name of the index template used to create the data stream’s backing indices.
    timestampField String
    Contains information about the data stream’s @timestamp field.
    elasticsearchConnection ElasticsearchDataStreamElasticsearchConnection
    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

    generation number
    Current generation for the data stream.
    hidden boolean
    If true, the data stream is hidden.
    ilmPolicy string
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    indices ElasticsearchDataStreamIndex[]
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    metadata string
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    name string
    Name of the data stream to create.
    replicated boolean
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    status string
    Health status of the data stream.
    system boolean
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    template string
    Name of the index template used to create the data stream’s backing indices.
    timestampField string
    Contains information about the data stream’s @timestamp field.
    elasticsearch_connection ElasticsearchDataStreamElasticsearchConnectionArgs
    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

    generation float
    Current generation for the data stream.
    hidden bool
    If true, the data stream is hidden.
    ilm_policy str
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    indices Sequence[ElasticsearchDataStreamIndexArgs]
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    metadata str
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    name str
    Name of the data stream to create.
    replicated bool
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    status str
    Health status of the data stream.
    system bool
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    template str
    Name of the index template used to create the data stream’s backing indices.
    timestamp_field str
    Contains information about the data stream’s @timestamp field.
    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

    generation Number
    Current generation for the data stream.
    hidden Boolean
    If true, the data stream is hidden.
    ilmPolicy String
    Name of the current ILM lifecycle policy in the stream’s matching index template.
    indices List<Property Map>
    Array of objects containing information about the data stream’s backing indices. The last item in this array contains information about the stream’s current write index.
    metadata String
    Custom metadata for the stream, copied from the _meta object of the stream’s matching index template.
    name String
    Name of the data stream to create.
    replicated Boolean
    If true, the data stream is created and managed by cross-cluster replication and the local cluster can not write into this data stream or change its mappings.
    status String
    Health status of the data stream.
    system Boolean
    If true, the data stream is created and managed by an Elastic stack component and cannot be modified through normal user interaction.
    template String
    Name of the index template used to create the data stream’s backing indices.
    timestampField String
    Contains information about the data stream’s @timestamp field.

    Supporting Types

    ElasticsearchDataStreamElasticsearchConnection, ElasticsearchDataStreamElasticsearchConnectionArgs

    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.

    ElasticsearchDataStreamIndex, ElasticsearchDataStreamIndexArgs

    IndexName string
    IndexUuid string
    IndexName string
    IndexUuid string
    indexName String
    indexUuid String
    indexName string
    indexUuid string
    indexName String
    indexUuid String

    Import

    $ pulumi import elasticstack:index/elasticsearchDataStream:ElasticsearchDataStream my_data_stream <cluster_uuid>/<data_stream_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