elasticstack 0.12.0 published on Wednesday, Oct 15, 2025 by elastic
elasticstack.getElasticsearchIngestProcessorEnrich
elasticstack 0.12.0 published on Wednesday, Oct 15, 2025 by elastic
Helper data source which can be used to create the configuration for an enrich processor. The enrich processor can enrich documents with data from another index. See: https://www.elastic.co/guide/en/elasticsearch/reference/current/enrich-processor.html
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as elasticstack from "@pulumi/elasticstack";
const enrich = elasticstack.getElasticsearchIngestProcessorEnrich({
policyName: "users-policy",
field: "email",
targetField: "user",
maxMatches: 1,
});
const myIngestPipeline = new elasticstack.ElasticsearchIngestPipeline("myIngestPipeline", {processors: [enrich.then(enrich => enrich.json)]});
import pulumi
import pulumi_elasticstack as elasticstack
enrich = elasticstack.get_elasticsearch_ingest_processor_enrich(policy_name="users-policy",
field="email",
target_field="user",
max_matches=1)
my_ingest_pipeline = elasticstack.ElasticsearchIngestPipeline("myIngestPipeline", processors=[enrich.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 {
enrich, err := elasticstack.GetElasticsearchIngestProcessorEnrich(ctx, &elasticstack.GetElasticsearchIngestProcessorEnrichArgs{
PolicyName: "users-policy",
Field: "email",
TargetField: "user",
MaxMatches: pulumi.Float64Ref(1),
}, nil)
if err != nil {
return err
}
_, err = elasticstack.NewElasticsearchIngestPipeline(ctx, "myIngestPipeline", &elasticstack.ElasticsearchIngestPipelineArgs{
Processors: pulumi.StringArray{
pulumi.String(enrich.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 enrich = Elasticstack.GetElasticsearchIngestProcessorEnrich.Invoke(new()
{
PolicyName = "users-policy",
Field = "email",
TargetField = "user",
MaxMatches = 1,
});
var myIngestPipeline = new Elasticstack.ElasticsearchIngestPipeline("myIngestPipeline", new()
{
Processors = new[]
{
enrich.Apply(getElasticsearchIngestProcessorEnrichResult => getElasticsearchIngestProcessorEnrichResult.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.GetElasticsearchIngestProcessorEnrichArgs;
import com.pulumi.elasticstack.ElasticsearchIngestPipeline;
import com.pulumi.elasticstack.ElasticsearchIngestPipelineArgs;
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 enrich = ElasticstackFunctions.getElasticsearchIngestProcessorEnrich(GetElasticsearchIngestProcessorEnrichArgs.builder()
.policyName("users-policy")
.field("email")
.targetField("user")
.maxMatches(1)
.build());
var myIngestPipeline = new ElasticsearchIngestPipeline("myIngestPipeline", ElasticsearchIngestPipelineArgs.builder()
.processors(enrich.applyValue(getElasticsearchIngestProcessorEnrichResult -> getElasticsearchIngestProcessorEnrichResult.json()))
.build());
}
}
resources:
myIngestPipeline:
type: elasticstack:ElasticsearchIngestPipeline
properties:
processors:
- ${enrich.json}
variables:
enrich:
fn::invoke:
function: elasticstack:getElasticsearchIngestProcessorEnrich
arguments:
policyName: users-policy
field: email
targetField: user
maxMatches: 1
Using getElasticsearchIngestProcessorEnrich
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 getElasticsearchIngestProcessorEnrich(args: GetElasticsearchIngestProcessorEnrichArgs, opts?: InvokeOptions): Promise<GetElasticsearchIngestProcessorEnrichResult>
function getElasticsearchIngestProcessorEnrichOutput(args: GetElasticsearchIngestProcessorEnrichOutputArgs, opts?: InvokeOptions): Output<GetElasticsearchIngestProcessorEnrichResult>
def get_elasticsearch_ingest_processor_enrich(description: Optional[str] = None,
field: Optional[str] = None,
if_: Optional[str] = None,
ignore_failure: Optional[bool] = None,
ignore_missing: Optional[bool] = None,
max_matches: Optional[float] = None,
on_failures: Optional[Sequence[str]] = None,
override: Optional[bool] = None,
policy_name: Optional[str] = None,
shape_relation: Optional[str] = None,
tag: Optional[str] = None,
target_field: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetElasticsearchIngestProcessorEnrichResult
def get_elasticsearch_ingest_processor_enrich_output(description: Optional[pulumi.Input[str]] = None,
field: Optional[pulumi.Input[str]] = None,
if_: Optional[pulumi.Input[str]] = None,
ignore_failure: Optional[pulumi.Input[bool]] = None,
ignore_missing: Optional[pulumi.Input[bool]] = None,
max_matches: Optional[pulumi.Input[float]] = None,
on_failures: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
override: Optional[pulumi.Input[bool]] = None,
policy_name: Optional[pulumi.Input[str]] = None,
shape_relation: Optional[pulumi.Input[str]] = None,
tag: Optional[pulumi.Input[str]] = None,
target_field: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetElasticsearchIngestProcessorEnrichResult]
func GetElasticsearchIngestProcessorEnrich(ctx *Context, args *GetElasticsearchIngestProcessorEnrichArgs, opts ...InvokeOption) (*GetElasticsearchIngestProcessorEnrichResult, error)
func GetElasticsearchIngestProcessorEnrichOutput(ctx *Context, args *GetElasticsearchIngestProcessorEnrichOutputArgs, opts ...InvokeOption) GetElasticsearchIngestProcessorEnrichResultOutput
> Note: This function is named GetElasticsearchIngestProcessorEnrich
in the Go SDK.
public static class GetElasticsearchIngestProcessorEnrich
{
public static Task<GetElasticsearchIngestProcessorEnrichResult> InvokeAsync(GetElasticsearchIngestProcessorEnrichArgs args, InvokeOptions? opts = null)
public static Output<GetElasticsearchIngestProcessorEnrichResult> Invoke(GetElasticsearchIngestProcessorEnrichInvokeArgs args, InvokeOptions? opts = null)
}
public static CompletableFuture<GetElasticsearchIngestProcessorEnrichResult> getElasticsearchIngestProcessorEnrich(GetElasticsearchIngestProcessorEnrichArgs args, InvokeOptions options)
public static Output<GetElasticsearchIngestProcessorEnrichResult> getElasticsearchIngestProcessorEnrich(GetElasticsearchIngestProcessorEnrichArgs args, InvokeOptions options)
fn::invoke:
function: elasticstack:index/getElasticsearchIngestProcessorEnrich:getElasticsearchIngestProcessorEnrich
arguments:
# arguments dictionary
The following arguments are supported:
- Field string
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- Policy
Name string - The name of the enrich policy to use.
- Target
Field string - Field added to incoming documents to contain enrich data.
- Description string
- Description of the processor.
- If string
- Conditionally execute the processor
- Ignore
Failure bool - Ignore failures for the processor.
- Ignore
Missing bool - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - Max
Matches double - The maximum number of matched documents to include under the configured target field.
- On
Failures List<string> - Handle failures for the processor.
- Override bool
- If processor will update fields with pre-existing non-null-valued field.
- Shape
Relation string - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- Tag string
- Identifier for the processor.
- Field string
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- Policy
Name string - The name of the enrich policy to use.
- Target
Field string - Field added to incoming documents to contain enrich data.
- Description string
- Description of the processor.
- If string
- Conditionally execute the processor
- Ignore
Failure bool - Ignore failures for the processor.
- Ignore
Missing bool - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - Max
Matches float64 - The maximum number of matched documents to include under the configured target field.
- On
Failures []string - Handle failures for the processor.
- Override bool
- If processor will update fields with pre-existing non-null-valued field.
- Shape
Relation string - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- Tag string
- Identifier for the processor.
- field String
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- policy
Name String - The name of the enrich policy to use.
- target
Field String - Field added to incoming documents to contain enrich data.
- description String
- Description of the processor.
- if_ String
- Conditionally execute the processor
- ignore
Failure Boolean - Ignore failures for the processor.
- ignore
Missing Boolean - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - max
Matches Double - The maximum number of matched documents to include under the configured target field.
- on
Failures List<String> - Handle failures for the processor.
- override Boolean
- If processor will update fields with pre-existing non-null-valued field.
- shape
Relation String - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- tag String
- Identifier for the processor.
- field string
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- policy
Name string - The name of the enrich policy to use.
- target
Field string - Field added to incoming documents to contain enrich data.
- description string
- Description of the processor.
- if string
- Conditionally execute the processor
- ignore
Failure boolean - Ignore failures for the processor.
- ignore
Missing boolean - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - max
Matches number - The maximum number of matched documents to include under the configured target field.
- on
Failures string[] - Handle failures for the processor.
- override boolean
- If processor will update fields with pre-existing non-null-valued field.
- shape
Relation string - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- tag string
- Identifier for the processor.
- field str
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- policy_
name str - The name of the enrich policy to use.
- target_
field str - Field added to incoming documents to contain enrich data.
- description str
- Description of the processor.
- if_ str
- Conditionally execute the processor
- ignore_
failure bool - Ignore failures for the processor.
- ignore_
missing bool - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - max_
matches float - The maximum number of matched documents to include under the configured target field.
- on_
failures Sequence[str] - Handle failures for the processor.
- override bool
- If processor will update fields with pre-existing non-null-valued field.
- shape_
relation str - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- tag str
- Identifier for the processor.
- field String
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- policy
Name String - The name of the enrich policy to use.
- target
Field String - Field added to incoming documents to contain enrich data.
- description String
- Description of the processor.
- if String
- Conditionally execute the processor
- ignore
Failure Boolean - Ignore failures for the processor.
- ignore
Missing Boolean - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - max
Matches Number - The maximum number of matched documents to include under the configured target field.
- on
Failures List<String> - Handle failures for the processor.
- override Boolean
- If processor will update fields with pre-existing non-null-valued field.
- shape
Relation String - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- tag String
- Identifier for the processor.
getElasticsearchIngestProcessorEnrich Result
The following output properties are available:
- Field string
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- Id string
- Internal identifier of the resource
- Json string
- JSON representation of this data source.
- Policy
Name string - The name of the enrich policy to use.
- Target
Field string - Field added to incoming documents to contain enrich data.
- Description string
- Description of the processor.
- If string
- Conditionally execute the processor
- Ignore
Failure bool - Ignore failures for the processor.
- Ignore
Missing bool - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - Max
Matches double - The maximum number of matched documents to include under the configured target field.
- On
Failures List<string> - Handle failures for the processor.
- Override bool
- If processor will update fields with pre-existing non-null-valued field.
- Shape
Relation string - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- Tag string
- Identifier for the processor.
- Field string
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- Id string
- Internal identifier of the resource
- Json string
- JSON representation of this data source.
- Policy
Name string - The name of the enrich policy to use.
- Target
Field string - Field added to incoming documents to contain enrich data.
- Description string
- Description of the processor.
- If string
- Conditionally execute the processor
- Ignore
Failure bool - Ignore failures for the processor.
- Ignore
Missing bool - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - Max
Matches float64 - The maximum number of matched documents to include under the configured target field.
- On
Failures []string - Handle failures for the processor.
- Override bool
- If processor will update fields with pre-existing non-null-valued field.
- Shape
Relation string - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- Tag string
- Identifier for the processor.
- field String
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- id String
- Internal identifier of the resource
- json String
- JSON representation of this data source.
- policy
Name String - The name of the enrich policy to use.
- target
Field String - Field added to incoming documents to contain enrich data.
- description String
- Description of the processor.
- if_ String
- Conditionally execute the processor
- ignore
Failure Boolean - Ignore failures for the processor.
- ignore
Missing Boolean - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - max
Matches Double - The maximum number of matched documents to include under the configured target field.
- on
Failures List<String> - Handle failures for the processor.
- override Boolean
- If processor will update fields with pre-existing non-null-valued field.
- shape
Relation String - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- tag String
- Identifier for the processor.
- field string
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- id string
- Internal identifier of the resource
- json string
- JSON representation of this data source.
- policy
Name string - The name of the enrich policy to use.
- target
Field string - Field added to incoming documents to contain enrich data.
- description string
- Description of the processor.
- if string
- Conditionally execute the processor
- ignore
Failure boolean - Ignore failures for the processor.
- ignore
Missing boolean - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - max
Matches number - The maximum number of matched documents to include under the configured target field.
- on
Failures string[] - Handle failures for the processor.
- override boolean
- If processor will update fields with pre-existing non-null-valued field.
- shape
Relation string - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- tag string
- Identifier for the processor.
- field str
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- id str
- Internal identifier of the resource
- json str
- JSON representation of this data source.
- policy_
name str - The name of the enrich policy to use.
- target_
field str - Field added to incoming documents to contain enrich data.
- description str
- Description of the processor.
- if_ str
- Conditionally execute the processor
- ignore_
failure bool - Ignore failures for the processor.
- ignore_
missing bool - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - max_
matches float - The maximum number of matched documents to include under the configured target field.
- on_
failures Sequence[str] - Handle failures for the processor.
- override bool
- If processor will update fields with pre-existing non-null-valued field.
- shape_
relation str - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- tag str
- Identifier for the processor.
- field String
- The field in the input document that matches the policies match_field used to retrieve the enrichment data.
- id String
- Internal identifier of the resource
- json String
- JSON representation of this data source.
- policy
Name String - The name of the enrich policy to use.
- target
Field String - Field added to incoming documents to contain enrich data.
- description String
- Description of the processor.
- if String
- Conditionally execute the processor
- ignore
Failure Boolean - Ignore failures for the processor.
- ignore
Missing Boolean - If
true
andfield
does not exist or isnull
, the processor quietly exits without modifying the document. - max
Matches Number - The maximum number of matched documents to include under the configured target field.
- on
Failures List<String> - Handle failures for the processor.
- override Boolean
- If processor will update fields with pre-existing non-null-valued field.
- shape
Relation String - A spatial relation operator used to match the geoshape of incoming documents to documents in the enrich index.
- tag String
- Identifier for the processor.
Package Details
- Repository
- elasticstack elastic/terraform-provider-elasticstack
- License
- Notes
- This Pulumi package is based on the
elasticstack
Terraform Provider.
elasticstack 0.12.0 published on Wednesday, Oct 15, 2025 by elastic