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

elasticstack.getElasticsearchIngestProcessorCommunityId

Explore with Pulumi AI

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

    Helper data source to which can be used to create a processor to compute the Community ID for network flow data as defined in the Community ID Specification. You can use a community ID to correlate network events related to a single flow.

    The community ID processor reads network flow data from related Elastic Common Schema (ECS) fields by default. If you use the ECS, no configuration is required.

    See: https://www.elastic.co/guide/en/elasticsearch/reference/current/community-id-processor.html

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as elasticstack from "@pulumi/elasticstack";
    
    const community = elasticstack.getElasticsearchIngestProcessorCommunityId({});
    const myIngestPipeline = new elasticstack.ElasticsearchIngestPipeline("myIngestPipeline", {processors: [community.then(community => community.json)]});
    
    import pulumi
    import pulumi_elasticstack as elasticstack
    
    community = elasticstack.get_elasticsearch_ingest_processor_community_id()
    my_ingest_pipeline = elasticstack.ElasticsearchIngestPipeline("myIngestPipeline", processors=[community.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 {
    		community, err := elasticstack.GetElasticsearchIngestProcessorCommunityId(ctx, &elasticstack.GetElasticsearchIngestProcessorCommunityIdArgs{}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = elasticstack.NewElasticsearchIngestPipeline(ctx, "myIngestPipeline", &elasticstack.ElasticsearchIngestPipelineArgs{
    			Processors: pulumi.StringArray{
    				pulumi.String(community.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 community = Elasticstack.GetElasticsearchIngestProcessorCommunityId.Invoke();
    
        var myIngestPipeline = new Elasticstack.ElasticsearchIngestPipeline("myIngestPipeline", new()
        {
            Processors = new[]
            {
                community.Apply(getElasticsearchIngestProcessorCommunityIdResult => getElasticsearchIngestProcessorCommunityIdResult.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.GetElasticsearchIngestProcessorCommunityIdArgs;
    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 community = ElasticstackFunctions.getElasticsearchIngestProcessorCommunityId();
    
            var myIngestPipeline = new ElasticsearchIngestPipeline("myIngestPipeline", ElasticsearchIngestPipelineArgs.builder()
                .processors(community.applyValue(getElasticsearchIngestProcessorCommunityIdResult -> getElasticsearchIngestProcessorCommunityIdResult.json()))
                .build());
    
        }
    }
    
    resources:
      myIngestPipeline:
        type: elasticstack:ElasticsearchIngestPipeline
        properties:
          processors:
            - ${community.json}
    variables:
      community:
        fn::invoke:
          function: elasticstack:getElasticsearchIngestProcessorCommunityId
          arguments: {}
    

    Using getElasticsearchIngestProcessorCommunityId

    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 getElasticsearchIngestProcessorCommunityId(args: GetElasticsearchIngestProcessorCommunityIdArgs, opts?: InvokeOptions): Promise<GetElasticsearchIngestProcessorCommunityIdResult>
    function getElasticsearchIngestProcessorCommunityIdOutput(args: GetElasticsearchIngestProcessorCommunityIdOutputArgs, opts?: InvokeOptions): Output<GetElasticsearchIngestProcessorCommunityIdResult>
    def get_elasticsearch_ingest_processor_community_id(description: Optional[str] = None,
                                                        destination_ip: Optional[str] = None,
                                                        destination_port: Optional[float] = None,
                                                        iana_number: Optional[float] = None,
                                                        icmp_code: Optional[float] = None,
                                                        icmp_type: Optional[float] = None,
                                                        if_: Optional[str] = None,
                                                        ignore_failure: Optional[bool] = None,
                                                        ignore_missing: Optional[bool] = None,
                                                        on_failures: Optional[Sequence[str]] = None,
                                                        seed: Optional[float] = None,
                                                        source_ip: Optional[str] = None,
                                                        source_port: Optional[float] = None,
                                                        tag: Optional[str] = None,
                                                        target_field: Optional[str] = None,
                                                        transport: Optional[str] = None,
                                                        opts: Optional[InvokeOptions] = None) -> GetElasticsearchIngestProcessorCommunityIdResult
    def get_elasticsearch_ingest_processor_community_id_output(description: Optional[pulumi.Input[str]] = None,
                                                        destination_ip: Optional[pulumi.Input[str]] = None,
                                                        destination_port: Optional[pulumi.Input[float]] = None,
                                                        iana_number: Optional[pulumi.Input[float]] = None,
                                                        icmp_code: Optional[pulumi.Input[float]] = None,
                                                        icmp_type: Optional[pulumi.Input[float]] = None,
                                                        if_: Optional[pulumi.Input[str]] = None,
                                                        ignore_failure: Optional[pulumi.Input[bool]] = None,
                                                        ignore_missing: Optional[pulumi.Input[bool]] = None,
                                                        on_failures: Optional[pulumi.Input[Sequence[pulumi.Input[str]]]] = None,
                                                        seed: Optional[pulumi.Input[float]] = None,
                                                        source_ip: Optional[pulumi.Input[str]] = None,
                                                        source_port: Optional[pulumi.Input[float]] = None,
                                                        tag: Optional[pulumi.Input[str]] = None,
                                                        target_field: Optional[pulumi.Input[str]] = None,
                                                        transport: Optional[pulumi.Input[str]] = None,
                                                        opts: Optional[InvokeOptions] = None) -> Output[GetElasticsearchIngestProcessorCommunityIdResult]
    func GetElasticsearchIngestProcessorCommunityId(ctx *Context, args *GetElasticsearchIngestProcessorCommunityIdArgs, opts ...InvokeOption) (*GetElasticsearchIngestProcessorCommunityIdResult, error)
    func GetElasticsearchIngestProcessorCommunityIdOutput(ctx *Context, args *GetElasticsearchIngestProcessorCommunityIdOutputArgs, opts ...InvokeOption) GetElasticsearchIngestProcessorCommunityIdResultOutput

    > Note: This function is named GetElasticsearchIngestProcessorCommunityId in the Go SDK.

    public static class GetElasticsearchIngestProcessorCommunityId 
    {
        public static Task<GetElasticsearchIngestProcessorCommunityIdResult> InvokeAsync(GetElasticsearchIngestProcessorCommunityIdArgs args, InvokeOptions? opts = null)
        public static Output<GetElasticsearchIngestProcessorCommunityIdResult> Invoke(GetElasticsearchIngestProcessorCommunityIdInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetElasticsearchIngestProcessorCommunityIdResult> getElasticsearchIngestProcessorCommunityId(GetElasticsearchIngestProcessorCommunityIdArgs args, InvokeOptions options)
    public static Output<GetElasticsearchIngestProcessorCommunityIdResult> getElasticsearchIngestProcessorCommunityId(GetElasticsearchIngestProcessorCommunityIdArgs args, InvokeOptions options)
    
    fn::invoke:
      function: elasticstack:index/getElasticsearchIngestProcessorCommunityId:getElasticsearchIngestProcessorCommunityId
      arguments:
        # arguments dictionary

    The following arguments are supported:

    Description string
    Description of the processor.
    DestinationIp string
    Field containing the destination IP address.
    DestinationPort double
    Field containing the destination port.
    IanaNumber double
    Field containing the IANA number.
    IcmpCode double
    Field containing the ICMP code.
    IcmpType double
    Field containing the ICMP type.
    If string
    Conditionally execute the processor
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    OnFailures List<string>
    Handle failures for the processor.
    Seed double
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    SourceIp string
    Field containing the source IP address.
    SourcePort double
    Field containing the source port.
    Tag string
    Identifier for the processor.
    TargetField string
    Output field for the community ID.
    Transport string
    Field containing the transport protocol. Used only when the iana_number field is not present.
    Description string
    Description of the processor.
    DestinationIp string
    Field containing the destination IP address.
    DestinationPort float64
    Field containing the destination port.
    IanaNumber float64
    Field containing the IANA number.
    IcmpCode float64
    Field containing the ICMP code.
    IcmpType float64
    Field containing the ICMP type.
    If string
    Conditionally execute the processor
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    OnFailures []string
    Handle failures for the processor.
    Seed float64
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    SourceIp string
    Field containing the source IP address.
    SourcePort float64
    Field containing the source port.
    Tag string
    Identifier for the processor.
    TargetField string
    Output field for the community ID.
    Transport string
    Field containing the transport protocol. Used only when the iana_number field is not present.
    description String
    Description of the processor.
    destinationIp String
    Field containing the destination IP address.
    destinationPort Double
    Field containing the destination port.
    ianaNumber Double
    Field containing the IANA number.
    icmpCode Double
    Field containing the ICMP code.
    icmpType Double
    Field containing the ICMP type.
    if_ String
    Conditionally execute the processor
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures List<String>
    Handle failures for the processor.
    seed Double
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    sourceIp String
    Field containing the source IP address.
    sourcePort Double
    Field containing the source port.
    tag String
    Identifier for the processor.
    targetField String
    Output field for the community ID.
    transport String
    Field containing the transport protocol. Used only when the iana_number field is not present.
    description string
    Description of the processor.
    destinationIp string
    Field containing the destination IP address.
    destinationPort number
    Field containing the destination port.
    ianaNumber number
    Field containing the IANA number.
    icmpCode number
    Field containing the ICMP code.
    icmpType number
    Field containing the ICMP type.
    if string
    Conditionally execute the processor
    ignoreFailure boolean
    Ignore failures for the processor.
    ignoreMissing boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures string[]
    Handle failures for the processor.
    seed number
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    sourceIp string
    Field containing the source IP address.
    sourcePort number
    Field containing the source port.
    tag string
    Identifier for the processor.
    targetField string
    Output field for the community ID.
    transport string
    Field containing the transport protocol. Used only when the iana_number field is not present.
    description str
    Description of the processor.
    destination_ip str
    Field containing the destination IP address.
    destination_port float
    Field containing the destination port.
    iana_number float
    Field containing the IANA number.
    icmp_code float
    Field containing the ICMP code.
    icmp_type float
    Field containing the ICMP type.
    if_ str
    Conditionally execute the processor
    ignore_failure bool
    Ignore failures for the processor.
    ignore_missing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    on_failures Sequence[str]
    Handle failures for the processor.
    seed float
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    source_ip str
    Field containing the source IP address.
    source_port float
    Field containing the source port.
    tag str
    Identifier for the processor.
    target_field str
    Output field for the community ID.
    transport str
    Field containing the transport protocol. Used only when the iana_number field is not present.
    description String
    Description of the processor.
    destinationIp String
    Field containing the destination IP address.
    destinationPort Number
    Field containing the destination port.
    ianaNumber Number
    Field containing the IANA number.
    icmpCode Number
    Field containing the ICMP code.
    icmpType Number
    Field containing the ICMP type.
    if String
    Conditionally execute the processor
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures List<String>
    Handle failures for the processor.
    seed Number
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    sourceIp String
    Field containing the source IP address.
    sourcePort Number
    Field containing the source port.
    tag String
    Identifier for the processor.
    targetField String
    Output field for the community ID.
    transport String
    Field containing the transport protocol. Used only when the iana_number field is not present.

    getElasticsearchIngestProcessorCommunityId Result

    The following output properties are available:

    Id string
    Internal identifier of the resource
    Json string
    JSON representation of this data source.
    Description string
    Description of the processor.
    DestinationIp string
    Field containing the destination IP address.
    DestinationPort double
    Field containing the destination port.
    IanaNumber double
    Field containing the IANA number.
    IcmpCode double
    Field containing the ICMP code.
    IcmpType double
    Field containing the ICMP type.
    If string
    Conditionally execute the processor
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    OnFailures List<string>
    Handle failures for the processor.
    Seed double
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    SourceIp string
    Field containing the source IP address.
    SourcePort double
    Field containing the source port.
    Tag string
    Identifier for the processor.
    TargetField string
    Output field for the community ID.
    Transport string
    Field containing the transport protocol. Used only when the iana_number field is not present.
    Id string
    Internal identifier of the resource
    Json string
    JSON representation of this data source.
    Description string
    Description of the processor.
    DestinationIp string
    Field containing the destination IP address.
    DestinationPort float64
    Field containing the destination port.
    IanaNumber float64
    Field containing the IANA number.
    IcmpCode float64
    Field containing the ICMP code.
    IcmpType float64
    Field containing the ICMP type.
    If string
    Conditionally execute the processor
    IgnoreFailure bool
    Ignore failures for the processor.
    IgnoreMissing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    OnFailures []string
    Handle failures for the processor.
    Seed float64
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    SourceIp string
    Field containing the source IP address.
    SourcePort float64
    Field containing the source port.
    Tag string
    Identifier for the processor.
    TargetField string
    Output field for the community ID.
    Transport string
    Field containing the transport protocol. Used only when the iana_number field is not present.
    id String
    Internal identifier of the resource
    json String
    JSON representation of this data source.
    description String
    Description of the processor.
    destinationIp String
    Field containing the destination IP address.
    destinationPort Double
    Field containing the destination port.
    ianaNumber Double
    Field containing the IANA number.
    icmpCode Double
    Field containing the ICMP code.
    icmpType Double
    Field containing the ICMP type.
    if_ String
    Conditionally execute the processor
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures List<String>
    Handle failures for the processor.
    seed Double
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    sourceIp String
    Field containing the source IP address.
    sourcePort Double
    Field containing the source port.
    tag String
    Identifier for the processor.
    targetField String
    Output field for the community ID.
    transport String
    Field containing the transport protocol. Used only when the iana_number field is not present.
    id string
    Internal identifier of the resource
    json string
    JSON representation of this data source.
    description string
    Description of the processor.
    destinationIp string
    Field containing the destination IP address.
    destinationPort number
    Field containing the destination port.
    ianaNumber number
    Field containing the IANA number.
    icmpCode number
    Field containing the ICMP code.
    icmpType number
    Field containing the ICMP type.
    if string
    Conditionally execute the processor
    ignoreFailure boolean
    Ignore failures for the processor.
    ignoreMissing boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures string[]
    Handle failures for the processor.
    seed number
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    sourceIp string
    Field containing the source IP address.
    sourcePort number
    Field containing the source port.
    tag string
    Identifier for the processor.
    targetField string
    Output field for the community ID.
    transport string
    Field containing the transport protocol. Used only when the iana_number field is not present.
    id str
    Internal identifier of the resource
    json str
    JSON representation of this data source.
    description str
    Description of the processor.
    destination_ip str
    Field containing the destination IP address.
    destination_port float
    Field containing the destination port.
    iana_number float
    Field containing the IANA number.
    icmp_code float
    Field containing the ICMP code.
    icmp_type float
    Field containing the ICMP type.
    if_ str
    Conditionally execute the processor
    ignore_failure bool
    Ignore failures for the processor.
    ignore_missing bool
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    on_failures Sequence[str]
    Handle failures for the processor.
    seed float
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    source_ip str
    Field containing the source IP address.
    source_port float
    Field containing the source port.
    tag str
    Identifier for the processor.
    target_field str
    Output field for the community ID.
    transport str
    Field containing the transport protocol. Used only when the iana_number field is not present.
    id String
    Internal identifier of the resource
    json String
    JSON representation of this data source.
    description String
    Description of the processor.
    destinationIp String
    Field containing the destination IP address.
    destinationPort Number
    Field containing the destination port.
    ianaNumber Number
    Field containing the IANA number.
    icmpCode Number
    Field containing the ICMP code.
    icmpType Number
    Field containing the ICMP type.
    if String
    Conditionally execute the processor
    ignoreFailure Boolean
    Ignore failures for the processor.
    ignoreMissing Boolean
    If true and field does not exist or is null, the processor quietly exits without modifying the document.
    onFailures List<String>
    Handle failures for the processor.
    seed Number
    Seed for the community ID hash. Must be between 0 and 65535 (inclusive). The seed can prevent hash collisions between network domains, such as a staging and production network that use the same addressing scheme.
    sourceIp String
    Field containing the source IP address.
    sourcePort Number
    Field containing the source port.
    tag String
    Identifier for the processor.
    targetField String
    Output field for the community ID.
    transport String
    Field containing the transport protocol. Used only when the iana_number field is not present.

    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