elasticstack 0.11.14 published on Monday, Apr 14, 2025 by elastic
elasticstack.getElasticsearchIngestProcessorPipeline
Explore with Pulumi AI
elasticstack 0.11.14 published on Monday, Apr 14, 2025 by elastic
Executes another pipeline.
The name of the current pipeline can be accessed from the _ingest.pipeline ingest metadata key.
See: https://www.elastic.co/guide/en/elasticsearch/reference/current/pipeline-processor.html
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";
const appendTags = elasticstack.getElasticsearchIngestProcessorAppend({
    field: "tags",
    values: [
        "production",
        "{{{app}}}",
        "{{{owner}}}",
    ],
});
const pipelineA = new elasticstack.ElasticsearchIngestPipeline("pipelineA", {processors: [appendTags.then(appendTags => appendTags.json)]});
const fingerprint = elasticstack.getElasticsearchIngestProcessorFingerprint({
    fields: ["owner"],
});
const pipeline = elasticstack.getElasticsearchIngestProcessorPipelineOutput({
    name: pipelineA.name,
});
const pipelineB = new elasticstack.ElasticsearchIngestPipeline("pipelineB", {processors: [
    pipeline.apply(pipeline => pipeline.json),
    fingerprint.then(fingerprint => fingerprint.json),
]});
import pulumi
import pulumi_elasticstack as elasticstack
append_tags = elasticstack.get_elasticsearch_ingest_processor_append(field="tags",
    values=[
        "production",
        "{{{app}}}",
        "{{{owner}}}",
    ])
pipeline_a = elasticstack.ElasticsearchIngestPipeline("pipelineA", processors=[append_tags.json])
fingerprint = elasticstack.get_elasticsearch_ingest_processor_fingerprint(fields=["owner"])
pipeline = elasticstack.get_elasticsearch_ingest_processor_pipeline_output(name=pipeline_a.name)
pipeline_b = elasticstack.ElasticsearchIngestPipeline("pipelineB", processors=[
    pipeline.json,
    fingerprint.json,
])
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 {
		appendTags, err := elasticstack.GetElasticsearchIngestProcessorAppend(ctx, &elasticstack.GetElasticsearchIngestProcessorAppendArgs{
			Field: "tags",
			Values: []string{
				"production",
				"{{{app}}}",
				"{{{owner}}}",
			},
		}, nil)
		if err != nil {
			return err
		}
		pipelineA, err := elasticstack.NewElasticsearchIngestPipeline(ctx, "pipelineA", &elasticstack.ElasticsearchIngestPipelineArgs{
			Processors: pulumi.StringArray{
				pulumi.String(appendTags.Json),
			},
		})
		if err != nil {
			return err
		}
		fingerprint, err := elasticstack.GetElasticsearchIngestProcessorFingerprint(ctx, &elasticstack.GetElasticsearchIngestProcessorFingerprintArgs{
			Fields: []string{
				"owner",
			},
		}, nil)
		if err != nil {
			return err
		}
		pipeline := elasticstack.GetElasticsearchIngestProcessorPipelineOutput(ctx, elasticstack.GetElasticsearchIngestProcessorPipelineOutputArgs{
			Name: pipelineA.Name,
		}, nil)
		_, err = elasticstack.NewElasticsearchIngestPipeline(ctx, "pipelineB", &elasticstack.ElasticsearchIngestPipelineArgs{
			Processors: pulumi.StringArray{
				pulumi.String(pipeline.ApplyT(func(pipeline elasticstack.GetElasticsearchIngestProcessorPipelineResult) (*string, error) {
					return &pipeline.Json, nil
				}).(pulumi.StringPtrOutput)),
				pulumi.String(fingerprint.Json),
			},
		})
		if err != nil {
			return err
		}
		return nil
	})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Elasticstack = Pulumi.Elasticstack;
return await Deployment.RunAsync(() => 
{
    var appendTags = Elasticstack.GetElasticsearchIngestProcessorAppend.Invoke(new()
    {
        Field = "tags",
        Values = new[]
        {
            "production",
            "{{{app}}}",
            "{{{owner}}}",
        },
    });
    var pipelineA = new Elasticstack.ElasticsearchIngestPipeline("pipelineA", new()
    {
        Processors = new[]
        {
            appendTags.Apply(getElasticsearchIngestProcessorAppendResult => getElasticsearchIngestProcessorAppendResult.Json),
        },
    });
    var fingerprint = Elasticstack.GetElasticsearchIngestProcessorFingerprint.Invoke(new()
    {
        Fields = new[]
        {
            "owner",
        },
    });
    var pipeline = Elasticstack.GetElasticsearchIngestProcessorPipeline.Invoke(new()
    {
        Name = pipelineA.Name,
    });
    var pipelineB = new Elasticstack.ElasticsearchIngestPipeline("pipelineB", new()
    {
        Processors = new[]
        {
            pipeline.Apply(getElasticsearchIngestProcessorPipelineResult => getElasticsearchIngestProcessorPipelineResult.Json),
            fingerprint.Apply(getElasticsearchIngestProcessorFingerprintResult => getElasticsearchIngestProcessorFingerprintResult.Json),
        },
    });
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.elasticstack.ElasticstackFunctions;
import com.pulumi.elasticstack.inputs.GetElasticsearchIngestProcessorAppendArgs;
import com.pulumi.elasticstack.ElasticsearchIngestPipeline;
import com.pulumi.elasticstack.ElasticsearchIngestPipelineArgs;
import com.pulumi.elasticstack.inputs.GetElasticsearchIngestProcessorFingerprintArgs;
import com.pulumi.elasticstack.inputs.GetElasticsearchIngestProcessorPipelineArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;
public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }
    public static void stack(Context ctx) {
        final var appendTags = ElasticstackFunctions.getElasticsearchIngestProcessorAppend(GetElasticsearchIngestProcessorAppendArgs.builder()
            .field("tags")
            .values(            
                "production",
                "{{{app}}}",
                "{{{owner}}}")
            .build());
        var pipelineA = new ElasticsearchIngestPipeline("pipelineA", ElasticsearchIngestPipelineArgs.builder()
            .processors(appendTags.applyValue(getElasticsearchIngestProcessorAppendResult -> getElasticsearchIngestProcessorAppendResult.json()))
            .build());
        final var fingerprint = ElasticstackFunctions.getElasticsearchIngestProcessorFingerprint(GetElasticsearchIngestProcessorFingerprintArgs.builder()
            .fields("owner")
            .build());
        final var pipeline = ElasticstackFunctions.getElasticsearchIngestProcessorPipeline(GetElasticsearchIngestProcessorPipelineArgs.builder()
            .name(pipelineA.name())
            .build());
        var pipelineB = new ElasticsearchIngestPipeline("pipelineB", ElasticsearchIngestPipelineArgs.builder()
            .processors(            
                pipeline.applyValue(getElasticsearchIngestProcessorPipelineResult -> getElasticsearchIngestProcessorPipelineResult).applyValue(pipeline -> pipeline.applyValue(getElasticsearchIngestProcessorPipelineResult -> getElasticsearchIngestProcessorPipelineResult.json())),
                fingerprint.applyValue(getElasticsearchIngestProcessorFingerprintResult -> getElasticsearchIngestProcessorFingerprintResult.json()))
            .build());
    }
}
resources:
  pipelineA:
    type: elasticstack:ElasticsearchIngestPipeline
    properties:
      processors:
        - ${appendTags.json}
  pipelineB:
    type: elasticstack:ElasticsearchIngestPipeline
    properties:
      processors:
        - ${pipeline.json}
        - ${fingerprint.json}
variables:
  appendTags:
    fn::invoke:
      function: elasticstack:getElasticsearchIngestProcessorAppend
      arguments:
        field: tags
        values:
          - production
          - '{{{app}}}'
          - '{{{owner}}}'
  fingerprint:
    fn::invoke:
      function: elasticstack:getElasticsearchIngestProcessorFingerprint
      arguments:
        fields:
          - owner
  pipeline:
    fn::invoke:
      function: elasticstack:getElasticsearchIngestProcessorPipeline
      arguments:
        name: ${pipelineA.name}
Using getElasticsearchIngestProcessorPipeline
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getElasticsearchIngestProcessorPipeline(args: GetElasticsearchIngestProcessorPipelineArgs, opts?: InvokeOptions): Promise<GetElasticsearchIngestProcessorPipelineResult>
function getElasticsearchIngestProcessorPipelineOutput(args: GetElasticsearchIngestProcessorPipelineOutputArgs, opts?: InvokeOptions): Output<GetElasticsearchIngestProcessorPipelineResult>def get_elasticsearch_ingest_processor_pipeline(description: Optional[str] = None,
                                                if_: Optional[str] = None,
                                                ignore_failure: Optional[bool] = None,
                                                name: Optional[str] = None,
                                                on_failures: Optional[Sequence[str]] = None,
                                                tag: Optional[str] = None,
                                                opts: Optional[InvokeOptions] = None) -> GetElasticsearchIngestProcessorPipelineResult
def get_elasticsearch_ingest_processor_pipeline_output(description: Optional[pulumi.Input[str]] = None,
                                                if_: Optional[pulumi.Input[str]] = None,
                                                ignore_failure: Optional[pulumi.Input[bool]] = None,
                                                name: Optional[pulumi.Input[str]] = None,
                                                on_failures: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                                tag: Optional[pulumi.Input[str]] = None,
                                                opts: Optional[InvokeOptions] = None) -> Output[GetElasticsearchIngestProcessorPipelineResult]func GetElasticsearchIngestProcessorPipeline(ctx *Context, args *GetElasticsearchIngestProcessorPipelineArgs, opts ...InvokeOption) (*GetElasticsearchIngestProcessorPipelineResult, error)
func GetElasticsearchIngestProcessorPipelineOutput(ctx *Context, args *GetElasticsearchIngestProcessorPipelineOutputArgs, opts ...InvokeOption) GetElasticsearchIngestProcessorPipelineResultOutput> Note: This function is named GetElasticsearchIngestProcessorPipeline in the Go SDK.
public static class GetElasticsearchIngestProcessorPipeline 
{
    public static Task<GetElasticsearchIngestProcessorPipelineResult> InvokeAsync(GetElasticsearchIngestProcessorPipelineArgs args, InvokeOptions? opts = null)
    public static Output<GetElasticsearchIngestProcessorPipelineResult> Invoke(GetElasticsearchIngestProcessorPipelineInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetElasticsearchIngestProcessorPipelineResult> getElasticsearchIngestProcessorPipeline(GetElasticsearchIngestProcessorPipelineArgs args, InvokeOptions options)
public static Output<GetElasticsearchIngestProcessorPipelineResult> getElasticsearchIngestProcessorPipeline(GetElasticsearchIngestProcessorPipelineArgs args, InvokeOptions options)
fn::invoke:
  function: elasticstack:index/getElasticsearchIngestProcessorPipeline:getElasticsearchIngestProcessorPipeline
  arguments:
    # arguments dictionaryThe following arguments are supported:
- Name string
 - The name of the pipeline to execute.
 - Description string
 - Description of the processor.
 - If string
 - Conditionally execute the processor
 - Ignore
Failure bool - Ignore failures for the processor.
 - On
Failures List<string> - Handle failures for the processor.
 - Tag string
 - Identifier for the processor.
 
- Name string
 - The name of the pipeline to execute.
 - Description string
 - Description of the processor.
 - If string
 - Conditionally execute the processor
 - Ignore
Failure bool - Ignore failures for the processor.
 - On
Failures []string - Handle failures for the processor.
 - Tag string
 - Identifier for the processor.
 
- name String
 - The name of the pipeline to execute.
 - description String
 - Description of the processor.
 - if_ String
 - Conditionally execute the processor
 - ignore
Failure Boolean - Ignore failures for the processor.
 - on
Failures List<String> - Handle failures for the processor.
 - tag String
 - Identifier for the processor.
 
- name string
 - The name of the pipeline to execute.
 - description string
 - Description of the processor.
 - if string
 - Conditionally execute the processor
 - ignore
Failure boolean - Ignore failures for the processor.
 - on
Failures string[] - Handle failures for the processor.
 - tag string
 - Identifier for the processor.
 
- name str
 - The name of the pipeline to execute.
 - description str
 - Description of the processor.
 - if_ str
 - Conditionally execute the processor
 - ignore_
failure bool - Ignore failures for the processor.
 - on_
failures Sequence[str] - Handle failures for the processor.
 - tag str
 - Identifier for the processor.
 
- name String
 - The name of the pipeline to execute.
 - description String
 - Description of the processor.
 - if String
 - Conditionally execute the processor
 - ignore
Failure Boolean - Ignore failures for the processor.
 - on
Failures List<String> - Handle failures for the processor.
 - tag String
 - Identifier for the processor.
 
getElasticsearchIngestProcessorPipeline Result
The following output properties are available:
- Id string
 - Internal identifier of the resource.
 - Json string
 - JSON representation of this data source.
 - Name string
 - The name of the pipeline to execute.
 - Description string
 - Description of the processor.
 - If string
 - Conditionally execute the processor
 - Ignore
Failure bool - Ignore failures for the processor.
 - On
Failures List<string> - Handle failures for the processor.
 - Tag string
 - Identifier for the processor.
 
- Id string
 - Internal identifier of the resource.
 - Json string
 - JSON representation of this data source.
 - Name string
 - The name of the pipeline to execute.
 - Description string
 - Description of the processor.
 - If string
 - Conditionally execute the processor
 - Ignore
Failure bool - Ignore failures for the processor.
 - On
Failures []string - Handle failures for the processor.
 - Tag string
 - Identifier for the processor.
 
- id String
 - Internal identifier of the resource.
 - json String
 - JSON representation of this data source.
 - name String
 - The name of the pipeline to execute.
 - description String
 - Description of the processor.
 - if_ String
 - Conditionally execute the processor
 - ignore
Failure Boolean - Ignore failures for the processor.
 - on
Failures List<String> - Handle failures for the processor.
 - tag String
 - Identifier for the processor.
 
- id string
 - Internal identifier of the resource.
 - json string
 - JSON representation of this data source.
 - name string
 - The name of the pipeline to execute.
 - description string
 - Description of the processor.
 - if string
 - Conditionally execute the processor
 - ignore
Failure boolean - Ignore failures for the processor.
 - on
Failures string[] - Handle failures for the processor.
 - tag string
 - Identifier for the processor.
 
- id str
 - Internal identifier of the resource.
 - json str
 - JSON representation of this data source.
 - name str
 - The name of the pipeline to execute.
 - description str
 - Description of the processor.
 - if_ str
 - Conditionally execute the processor
 - ignore_
failure bool - Ignore failures for the processor.
 - on_
failures Sequence[str] - Handle failures for the processor.
 - tag str
 - Identifier for the processor.
 
- id String
 - Internal identifier of the resource.
 - json String
 - JSON representation of this data source.
 - name String
 - The name of the pipeline to execute.
 - description String
 - Description of the processor.
 - if String
 - Conditionally execute the processor
 - ignore
Failure Boolean - Ignore failures for the processor.
 - on
Failures List<String> - Handle failures for the processor.
 - tag String
 - Identifier for the processor.
 
Package Details
- Repository
 - elasticstack elastic/terraform-provider-elasticstack
 - License
 - Notes
 - This Pulumi package is based on the 
elasticstackTerraform Provider. 
elasticstack 0.11.14 published on Monday, Apr 14, 2025 by elastic