1. Packages
  2. Elasticstack Provider
  3. API Docs
  4. ElasticsearchDataStreamLifecycle
elasticstack 0.11.14 published on Monday, Apr 14, 2025 by elastic

elasticstack.ElasticsearchDataStreamLifecycle

Explore with Pulumi AI

Configures the data stream lifecycle for the targeted data streams, 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";

// First we must have a index template created
const myDataStreamTemplate = new elasticstack.ElasticsearchIndexTemplate("myDataStreamTemplate", {
    indexPatterns: ["my-stream*"],
    dataStream: {},
});
// and now we can create data stream based on the index template
const myDataStream = new elasticstack.ElasticsearchDataStream("myDataStream", {}, {
    dependsOn: [myDataStreamTemplate],
});
// finally we can manage lifecycle of data stream
const myDataStreamLifecycle = new elasticstack.ElasticsearchDataStreamLifecycle("myDataStreamLifecycle", {dataRetention: "3d"}, {
    dependsOn: [myDataStream],
});
// or you can use wildcards to manage multiple lifecycles at once
const myDataStreamLifecycleMultiple = new elasticstack.ElasticsearchDataStreamLifecycle("myDataStreamLifecycleMultiple", {dataRetention: "3d"});
Copy
import pulumi
import pulumi_elasticstack as elasticstack

# First we must have a index template created
my_data_stream_template = elasticstack.ElasticsearchIndexTemplate("myDataStreamTemplate",
    index_patterns=["my-stream*"],
    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]))
# finally we can manage lifecycle of data stream
my_data_stream_lifecycle = elasticstack.ElasticsearchDataStreamLifecycle("myDataStreamLifecycle", data_retention="3d",
opts = pulumi.ResourceOptions(depends_on=[my_data_stream]))
# or you can use wildcards to manage multiple lifecycles at once
my_data_stream_lifecycle_multiple = elasticstack.ElasticsearchDataStreamLifecycle("myDataStreamLifecycleMultiple", data_retention="3d")
Copy
package main

import (
	"github.com/pulumi/pulumi-terraform-provider/sdks/go/elasticstack/elasticstack"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		// First we must have a index template created
		myDataStreamTemplate, err := elasticstack.NewElasticsearchIndexTemplate(ctx, "myDataStreamTemplate", &elasticstack.ElasticsearchIndexTemplateArgs{
			IndexPatterns: pulumi.StringArray{
				pulumi.String("my-stream*"),
			},
			DataStream: &elasticstack.ElasticsearchIndexTemplateDataStreamArgs{},
		})
		if err != nil {
			return err
		}
		// and now we can create data stream based on the index template
		myDataStream, err := elasticstack.NewElasticsearchDataStream(ctx, "myDataStream", nil, pulumi.DependsOn([]pulumi.Resource{
			myDataStreamTemplate,
		}))
		if err != nil {
			return err
		}
		// finally we can manage lifecycle of data stream
		_, err = elasticstack.NewElasticsearchDataStreamLifecycle(ctx, "myDataStreamLifecycle", &elasticstack.ElasticsearchDataStreamLifecycleArgs{
			DataRetention: pulumi.String("3d"),
		}, pulumi.DependsOn([]pulumi.Resource{
			myDataStream,
		}))
		if err != nil {
			return err
		}
		// or you can use wildcards to manage multiple lifecycles at once
		_, err = elasticstack.NewElasticsearchDataStreamLifecycle(ctx, "myDataStreamLifecycleMultiple", &elasticstack.ElasticsearchDataStreamLifecycleArgs{
			DataRetention: pulumi.String("3d"),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
Copy
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Elasticstack = Pulumi.Elasticstack;

return await Deployment.RunAsync(() => 
{
    // First we must have a index template created
    var myDataStreamTemplate = new Elasticstack.ElasticsearchIndexTemplate("myDataStreamTemplate", new()
    {
        IndexPatterns = new[]
        {
            "my-stream*",
        },
        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,
        },
    });

    // finally we can manage lifecycle of data stream
    var myDataStreamLifecycle = new Elasticstack.ElasticsearchDataStreamLifecycle("myDataStreamLifecycle", new()
    {
        DataRetention = "3d",
    }, new CustomResourceOptions
    {
        DependsOn =
        {
            myDataStream,
        },
    });

    // or you can use wildcards to manage multiple lifecycles at once
    var myDataStreamLifecycleMultiple = new Elasticstack.ElasticsearchDataStreamLifecycle("myDataStreamLifecycleMultiple", new()
    {
        DataRetention = "3d",
    });

});
Copy
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.ElasticsearchIndexTemplateDataStreamArgs;
import com.pulumi.elasticstack.ElasticsearchDataStream;
import com.pulumi.elasticstack.ElasticsearchDataStreamArgs;
import com.pulumi.elasticstack.ElasticsearchDataStreamLifecycle;
import com.pulumi.elasticstack.ElasticsearchDataStreamLifecycleArgs;
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) {
        // First we must have a index template created
        var myDataStreamTemplate = new ElasticsearchIndexTemplate("myDataStreamTemplate", ElasticsearchIndexTemplateArgs.builder()
            .indexPatterns("my-stream*")
            .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());

        // finally we can manage lifecycle of data stream
        var myDataStreamLifecycle = new ElasticsearchDataStreamLifecycle("myDataStreamLifecycle", ElasticsearchDataStreamLifecycleArgs.builder()
            .dataRetention("3d")
            .build(), CustomResourceOptions.builder()
                .dependsOn(myDataStream)
                .build());

        // or you can use wildcards to manage multiple lifecycles at once
        var myDataStreamLifecycleMultiple = new ElasticsearchDataStreamLifecycle("myDataStreamLifecycleMultiple", ElasticsearchDataStreamLifecycleArgs.builder()
            .dataRetention("3d")
            .build());

    }
}
Copy
resources:
  # First we must have a index template created
  myDataStreamTemplate:
    type: elasticstack:ElasticsearchIndexTemplate
    properties:
      indexPatterns:
        - my-stream*
      dataStream: {}
  # and now we can create data stream based on the index template
  myDataStream:
    type: elasticstack:ElasticsearchDataStream
    options:
      dependsOn:
        - ${myDataStreamTemplate}
  # finally we can manage lifecycle of data stream
  myDataStreamLifecycle:
    type: elasticstack:ElasticsearchDataStreamLifecycle
    properties:
      dataRetention: 3d
    options:
      dependsOn:
        - ${myDataStream}
  # or you can use wildcards to manage multiple lifecycles at once
  myDataStreamLifecycleMultiple:
    type: elasticstack:ElasticsearchDataStreamLifecycle
    properties:
      dataRetention: 3d
Copy

Create ElasticsearchDataStreamLifecycle Resource

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

Constructor syntax

new ElasticsearchDataStreamLifecycle(name: string, args?: ElasticsearchDataStreamLifecycleArgs, opts?: CustomResourceOptions);
@overload
def ElasticsearchDataStreamLifecycle(resource_name: str,
                                     args: Optional[ElasticsearchDataStreamLifecycleArgs] = None,
                                     opts: Optional[ResourceOptions] = None)

@overload
def ElasticsearchDataStreamLifecycle(resource_name: str,
                                     opts: Optional[ResourceOptions] = None,
                                     data_retention: Optional[str] = None,
                                     downsamplings: Optional[Sequence[ElasticsearchDataStreamLifecycleDownsamplingArgs]] = None,
                                     elasticsearch_connections: Optional[Sequence[ElasticsearchDataStreamLifecycleElasticsearchConnectionArgs]] = None,
                                     enabled: Optional[bool] = None,
                                     expand_wildcards: Optional[str] = None,
                                     name: Optional[str] = None)
func NewElasticsearchDataStreamLifecycle(ctx *Context, name string, args *ElasticsearchDataStreamLifecycleArgs, opts ...ResourceOption) (*ElasticsearchDataStreamLifecycle, error)
public ElasticsearchDataStreamLifecycle(string name, ElasticsearchDataStreamLifecycleArgs? args = null, CustomResourceOptions? opts = null)
public ElasticsearchDataStreamLifecycle(String name, ElasticsearchDataStreamLifecycleArgs args)
public ElasticsearchDataStreamLifecycle(String name, ElasticsearchDataStreamLifecycleArgs args, CustomResourceOptions options)
type: elasticstack:ElasticsearchDataStreamLifecycle
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args ElasticsearchDataStreamLifecycleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args ElasticsearchDataStreamLifecycleArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args ElasticsearchDataStreamLifecycleArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args ElasticsearchDataStreamLifecycleArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. ElasticsearchDataStreamLifecycleArgs
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 elasticsearchDataStreamLifecycleResource = new Elasticstack.ElasticsearchDataStreamLifecycle("elasticsearchDataStreamLifecycleResource", new()
{
    DataRetention = "string",
    Downsamplings = new[]
    {
        new Elasticstack.Inputs.ElasticsearchDataStreamLifecycleDownsamplingArgs
        {
            After = "string",
            FixedInterval = "string",
        },
    },
    Enabled = false,
    ExpandWildcards = "string",
    Name = "string",
});
Copy
example, err := elasticstack.NewElasticsearchDataStreamLifecycle(ctx, "elasticsearchDataStreamLifecycleResource", &elasticstack.ElasticsearchDataStreamLifecycleArgs{
DataRetention: pulumi.String("string"),
Downsamplings: .ElasticsearchDataStreamLifecycleDownsamplingArray{
&.ElasticsearchDataStreamLifecycleDownsamplingArgs{
After: pulumi.String("string"),
FixedInterval: pulumi.String("string"),
},
},
Enabled: pulumi.Bool(false),
ExpandWildcards: pulumi.String("string"),
Name: pulumi.String("string"),
})
Copy
var elasticsearchDataStreamLifecycleResource = new ElasticsearchDataStreamLifecycle("elasticsearchDataStreamLifecycleResource", ElasticsearchDataStreamLifecycleArgs.builder()
    .dataRetention("string")
    .downsamplings(ElasticsearchDataStreamLifecycleDownsamplingArgs.builder()
        .after("string")
        .fixedInterval("string")
        .build())
    .enabled(false)
    .expandWildcards("string")
    .name("string")
    .build());
Copy
elasticsearch_data_stream_lifecycle_resource = elasticstack.ElasticsearchDataStreamLifecycle("elasticsearchDataStreamLifecycleResource",
    data_retention="string",
    downsamplings=[{
        "after": "string",
        "fixed_interval": "string",
    }],
    enabled=False,
    expand_wildcards="string",
    name="string")
Copy
const elasticsearchDataStreamLifecycleResource = new elasticstack.ElasticsearchDataStreamLifecycle("elasticsearchDataStreamLifecycleResource", {
    dataRetention: "string",
    downsamplings: [{
        after: "string",
        fixedInterval: "string",
    }],
    enabled: false,
    expandWildcards: "string",
    name: "string",
});
Copy
type: elasticstack:ElasticsearchDataStreamLifecycle
properties:
    dataRetention: string
    downsamplings:
        - after: string
          fixedInterval: string
    enabled: false
    expandWildcards: string
    name: string
Copy

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

DataRetention string
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
Downsamplings List<ElasticsearchDataStreamLifecycleDownsampling>
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
ElasticsearchConnections List<ElasticsearchDataStreamLifecycleElasticsearchConnection>
Elasticsearch connection configuration block.

Deprecated: Deprecated

Enabled bool
Data stream lifecycle on/off.
ExpandWildcards string
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
Name string
Name of the data stream. Supports wildcards.
DataRetention string
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
Downsamplings []ElasticsearchDataStreamLifecycleDownsamplingArgs
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
ElasticsearchConnections []ElasticsearchDataStreamLifecycleElasticsearchConnectionArgs
Elasticsearch connection configuration block.

Deprecated: Deprecated

Enabled bool
Data stream lifecycle on/off.
ExpandWildcards string
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
Name string
Name of the data stream. Supports wildcards.
dataRetention String
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
downsamplings List<ElasticsearchDataStreamLifecycleDownsampling>
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
elasticsearchConnections List<ElasticsearchDataStreamLifecycleElasticsearchConnection>
Elasticsearch connection configuration block.

Deprecated: Deprecated

enabled Boolean
Data stream lifecycle on/off.
expandWildcards String
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
name String
Name of the data stream. Supports wildcards.
dataRetention string
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
downsamplings ElasticsearchDataStreamLifecycleDownsampling[]
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
elasticsearchConnections ElasticsearchDataStreamLifecycleElasticsearchConnection[]
Elasticsearch connection configuration block.

Deprecated: Deprecated

enabled boolean
Data stream lifecycle on/off.
expandWildcards string
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
name string
Name of the data stream. Supports wildcards.
data_retention str
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
downsamplings Sequence[ElasticsearchDataStreamLifecycleDownsamplingArgs]
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
elasticsearch_connections Sequence[ElasticsearchDataStreamLifecycleElasticsearchConnectionArgs]
Elasticsearch connection configuration block.

Deprecated: Deprecated

enabled bool
Data stream lifecycle on/off.
expand_wildcards str
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
name str
Name of the data stream. Supports wildcards.
dataRetention String
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
downsamplings List<Property Map>
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
elasticsearchConnections List<Property Map>
Elasticsearch connection configuration block.

Deprecated: Deprecated

enabled Boolean
Data stream lifecycle on/off.
expandWildcards String
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
name String
Name of the data stream. Supports wildcards.

Outputs

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

Get an existing ElasticsearchDataStreamLifecycle 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?: ElasticsearchDataStreamLifecycleState, opts?: CustomResourceOptions): ElasticsearchDataStreamLifecycle
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        data_retention: Optional[str] = None,
        downsamplings: Optional[Sequence[ElasticsearchDataStreamLifecycleDownsamplingArgs]] = None,
        elasticsearch_connections: Optional[Sequence[ElasticsearchDataStreamLifecycleElasticsearchConnectionArgs]] = None,
        enabled: Optional[bool] = None,
        expand_wildcards: Optional[str] = None,
        name: Optional[str] = None) -> ElasticsearchDataStreamLifecycle
func GetElasticsearchDataStreamLifecycle(ctx *Context, name string, id IDInput, state *ElasticsearchDataStreamLifecycleState, opts ...ResourceOption) (*ElasticsearchDataStreamLifecycle, error)
public static ElasticsearchDataStreamLifecycle Get(string name, Input<string> id, ElasticsearchDataStreamLifecycleState? state, CustomResourceOptions? opts = null)
public static ElasticsearchDataStreamLifecycle get(String name, Output<String> id, ElasticsearchDataStreamLifecycleState state, CustomResourceOptions options)
resources:  _:    type: elasticstack:ElasticsearchDataStreamLifecycle    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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 This property is required.
The unique name of the resulting resource.
id This property is required.
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:
DataRetention string
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
Downsamplings List<ElasticsearchDataStreamLifecycleDownsampling>
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
ElasticsearchConnections List<ElasticsearchDataStreamLifecycleElasticsearchConnection>
Elasticsearch connection configuration block.

Deprecated: Deprecated

Enabled bool
Data stream lifecycle on/off.
ExpandWildcards string
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
Name string
Name of the data stream. Supports wildcards.
DataRetention string
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
Downsamplings []ElasticsearchDataStreamLifecycleDownsamplingArgs
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
ElasticsearchConnections []ElasticsearchDataStreamLifecycleElasticsearchConnectionArgs
Elasticsearch connection configuration block.

Deprecated: Deprecated

Enabled bool
Data stream lifecycle on/off.
ExpandWildcards string
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
Name string
Name of the data stream. Supports wildcards.
dataRetention String
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
downsamplings List<ElasticsearchDataStreamLifecycleDownsampling>
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
elasticsearchConnections List<ElasticsearchDataStreamLifecycleElasticsearchConnection>
Elasticsearch connection configuration block.

Deprecated: Deprecated

enabled Boolean
Data stream lifecycle on/off.
expandWildcards String
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
name String
Name of the data stream. Supports wildcards.
dataRetention string
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
downsamplings ElasticsearchDataStreamLifecycleDownsampling[]
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
elasticsearchConnections ElasticsearchDataStreamLifecycleElasticsearchConnection[]
Elasticsearch connection configuration block.

Deprecated: Deprecated

enabled boolean
Data stream lifecycle on/off.
expandWildcards string
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
name string
Name of the data stream. Supports wildcards.
data_retention str
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
downsamplings Sequence[ElasticsearchDataStreamLifecycleDownsamplingArgs]
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
elasticsearch_connections Sequence[ElasticsearchDataStreamLifecycleElasticsearchConnectionArgs]
Elasticsearch connection configuration block.

Deprecated: Deprecated

enabled bool
Data stream lifecycle on/off.
expand_wildcards str
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
name str
Name of the data stream. Supports wildcards.
dataRetention String
Every document added to this data stream will be stored at least for this time frame. When empty, every document in this data stream will be stored indefinitely
downsamplings List<Property Map>
Downsampling configuration objects, each defining an after interval representing when the backing index is meant to be downsampled and a fixed_interval representing the downsampling interval.
elasticsearchConnections List<Property Map>
Elasticsearch connection configuration block.

Deprecated: Deprecated

enabled Boolean
Data stream lifecycle on/off.
expandWildcards String
Determines how wildcard patterns in the indices parameter match data streams and indices. Supports comma-separated values, such as closed,hidden.
name String
Name of the data stream. Supports wildcards.

Supporting Types

ElasticsearchDataStreamLifecycleDownsampling
, ElasticsearchDataStreamLifecycleDownsamplingArgs

After This property is required. string
Interval representing when the backing index is meant to be downsampled
FixedInterval This property is required. string
The interval at which to aggregate the original time series index.
After This property is required. string
Interval representing when the backing index is meant to be downsampled
FixedInterval This property is required. string
The interval at which to aggregate the original time series index.
after This property is required. String
Interval representing when the backing index is meant to be downsampled
fixedInterval This property is required. String
The interval at which to aggregate the original time series index.
after This property is required. string
Interval representing when the backing index is meant to be downsampled
fixedInterval This property is required. string
The interval at which to aggregate the original time series index.
after This property is required. str
Interval representing when the backing index is meant to be downsampled
fixed_interval This property is required. str
The interval at which to aggregate the original time series index.
after This property is required. String
Interval representing when the backing index is meant to be downsampled
fixedInterval This property is required. String
The interval at which to aggregate the original time series index.

ElasticsearchDataStreamLifecycleElasticsearchConnection
, ElasticsearchDataStreamLifecycleElasticsearchConnectionArgs

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.

Import

$ pulumi import elasticstack:index/elasticsearchDataStreamLifecycle:ElasticsearchDataStreamLifecycle my_data_stream_lifecycle <cluster_uuid>/<data_stream_name>
Copy

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.