1. Packages
  2. Honeycombio Provider
  3. API Docs
  4. getEnvironment
Honeycomb 0.44.0 published on Monday, Dec 15, 2025 by honeycombio
honeycombio logo
Honeycomb 0.44.0 published on Monday, Dec 15, 2025 by honeycombio

    Example Usage

    import * as pulumi from "@pulumi/pulumi";
    import * as honeycombio from "@pulumi/honeycombio";
    
    // Retrieve the details of an Environment
    const prod = honeycombio.getEnvironment({
        id: "hcaen_01j1d7t02zf7wgw7q89z3t60vf",
    });
    
    import pulumi
    import pulumi_honeycombio as honeycombio
    
    # Retrieve the details of an Environment
    prod = honeycombio.get_environment(id="hcaen_01j1d7t02zf7wgw7q89z3t60vf")
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/honeycombio/honeycombio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		// Retrieve the details of an Environment
    		_, err := honeycombio.LookupEnvironment(ctx, &honeycombio.LookupEnvironmentArgs{
    			Id: pulumi.StringRef("hcaen_01j1d7t02zf7wgw7q89z3t60vf"),
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Honeycombio = Pulumi.Honeycombio;
    
    return await Deployment.RunAsync(() => 
    {
        // Retrieve the details of an Environment
        var prod = Honeycombio.GetEnvironment.Invoke(new()
        {
            Id = "hcaen_01j1d7t02zf7wgw7q89z3t60vf",
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.honeycombio.HoneycombioFunctions;
    import com.pulumi.honeycombio.inputs.GetEnvironmentArgs;
    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) {
            // Retrieve the details of an Environment
            final var prod = HoneycombioFunctions.getEnvironment(GetEnvironmentArgs.builder()
                .id("hcaen_01j1d7t02zf7wgw7q89z3t60vf")
                .build());
    
        }
    }
    
    variables:
      # Retrieve the details of an Environment
      prod:
        fn::invoke:
          function: honeycombio:getEnvironment
          arguments:
            id: hcaen_01j1d7t02zf7wgw7q89z3t60vf
    

    Filter Example

    import * as pulumi from "@pulumi/pulumi";
    import * as honeycombio from "@pulumi/honeycombio";
    
    const classic = honeycombio.getEnvironment({
        detailFilters: [{
            name: "name",
            value: "Classic",
        }],
    });
    const prod = honeycombio.getEnvironment({
        detailFilters: [{
            name: "name",
            value: "prod",
        }],
    });
    
    import pulumi
    import pulumi_honeycombio as honeycombio
    
    classic = honeycombio.get_environment(detail_filters=[{
        "name": "name",
        "value": "Classic",
    }])
    prod = honeycombio.get_environment(detail_filters=[{
        "name": "name",
        "value": "prod",
    }])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-terraform-provider/sdks/go/honeycombio/honeycombio"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := honeycombio.LookupEnvironment(ctx, &honeycombio.LookupEnvironmentArgs{
    			DetailFilters: []honeycombio.GetEnvironmentDetailFilter{
    				{
    					Name:  "name",
    					Value: pulumi.StringRef("Classic"),
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		_, err = honeycombio.LookupEnvironment(ctx, &honeycombio.LookupEnvironmentArgs{
    			DetailFilters: []honeycombio.GetEnvironmentDetailFilter{
    				{
    					Name:  "name",
    					Value: pulumi.StringRef("prod"),
    				},
    			},
    		}, nil)
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Honeycombio = Pulumi.Honeycombio;
    
    return await Deployment.RunAsync(() => 
    {
        var classic = Honeycombio.GetEnvironment.Invoke(new()
        {
            DetailFilters = new[]
            {
                new Honeycombio.Inputs.GetEnvironmentDetailFilterInputArgs
                {
                    Name = "name",
                    Value = "Classic",
                },
            },
        });
    
        var prod = Honeycombio.GetEnvironment.Invoke(new()
        {
            DetailFilters = new[]
            {
                new Honeycombio.Inputs.GetEnvironmentDetailFilterInputArgs
                {
                    Name = "name",
                    Value = "prod",
                },
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.honeycombio.HoneycombioFunctions;
    import com.pulumi.honeycombio.inputs.GetEnvironmentArgs;
    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 classic = HoneycombioFunctions.getEnvironment(GetEnvironmentArgs.builder()
                .detailFilters(GetEnvironmentDetailFilterArgs.builder()
                    .name("name")
                    .value("Classic")
                    .build())
                .build());
    
            final var prod = HoneycombioFunctions.getEnvironment(GetEnvironmentArgs.builder()
                .detailFilters(GetEnvironmentDetailFilterArgs.builder()
                    .name("name")
                    .value("prod")
                    .build())
                .build());
    
        }
    }
    
    variables:
      classic:
        fn::invoke:
          function: honeycombio:getEnvironment
          arguments:
            detailFilters:
              - name: name
                value: Classic
      prod:
        fn::invoke:
          function: honeycombio:getEnvironment
          arguments:
            detailFilters:
              - name: name
                value: prod
    

    Using getEnvironment

    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 getEnvironment(args: GetEnvironmentArgs, opts?: InvokeOptions): Promise<GetEnvironmentResult>
    function getEnvironmentOutput(args: GetEnvironmentOutputArgs, opts?: InvokeOptions): Output<GetEnvironmentResult>
    def get_environment(detail_filters: Optional[Sequence[GetEnvironmentDetailFilter]] = None,
                        id: Optional[str] = None,
                        opts: Optional[InvokeOptions] = None) -> GetEnvironmentResult
    def get_environment_output(detail_filters: Optional[pulumi.Input[Sequence[pulumi.Input[GetEnvironmentDetailFilterArgs]]]] = None,
                        id: Optional[pulumi.Input[str]] = None,
                        opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentResult]
    func LookupEnvironment(ctx *Context, args *LookupEnvironmentArgs, opts ...InvokeOption) (*LookupEnvironmentResult, error)
    func LookupEnvironmentOutput(ctx *Context, args *LookupEnvironmentOutputArgs, opts ...InvokeOption) LookupEnvironmentResultOutput

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

    public static class GetEnvironment 
    {
        public static Task<GetEnvironmentResult> InvokeAsync(GetEnvironmentArgs args, InvokeOptions? opts = null)
        public static Output<GetEnvironmentResult> Invoke(GetEnvironmentInvokeArgs args, InvokeOptions? opts = null)
    }
    public static CompletableFuture<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
    public static Output<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
    
    fn::invoke:
      function: honeycombio:index/getEnvironment:getEnvironment
      arguments:
        # arguments dictionary

    The following arguments are supported:

    getEnvironment Result

    The following output properties are available:

    Supporting Types

    GetEnvironmentDetailFilter

    Name string
    The name of the detail field to filter by. This must match a schema attribute of the resource (e.g., name, description, id).
    Operator string
    The comparison operator to use for filtering. Defaults to equals. Valid operators include:

    • equals, =, eq - Exact match comparison
    • not-equals, !=, ne - Inverse exact match comparison
    • contains, in - Substring inclusion check
    • does-not-contain, not-in - Inverse substring inclusion check
    • starts-with - Prefix matching
    • does-not-start-with - Inverse prefix matching
    • ends-with - Suffix matching
    • does-not-end-with - Inverse suffix matching
    • >, gt - Numeric greater than comparison
    • >=, ge - Numeric greater than or equal comparison
    • <, lt - Numeric less than comparison
    • <=, le - Numeric less than or equal comparison
    • does-not-exist - Field absence check
    Value string
    The value of the detail field to match on. Required unless value_regex is set or operator is does-not-exist.
    ValueRegex string
    A regular expression string to apply to the value of the detail field to match on. Required unless value is set or operator is does-not-exist.
    Name string
    The name of the detail field to filter by. This must match a schema attribute of the resource (e.g., name, description, id).
    Operator string
    The comparison operator to use for filtering. Defaults to equals. Valid operators include:

    • equals, =, eq - Exact match comparison
    • not-equals, !=, ne - Inverse exact match comparison
    • contains, in - Substring inclusion check
    • does-not-contain, not-in - Inverse substring inclusion check
    • starts-with - Prefix matching
    • does-not-start-with - Inverse prefix matching
    • ends-with - Suffix matching
    • does-not-end-with - Inverse suffix matching
    • >, gt - Numeric greater than comparison
    • >=, ge - Numeric greater than or equal comparison
    • <, lt - Numeric less than comparison
    • <=, le - Numeric less than or equal comparison
    • does-not-exist - Field absence check
    Value string
    The value of the detail field to match on. Required unless value_regex is set or operator is does-not-exist.
    ValueRegex string
    A regular expression string to apply to the value of the detail field to match on. Required unless value is set or operator is does-not-exist.
    name String
    The name of the detail field to filter by. This must match a schema attribute of the resource (e.g., name, description, id).
    operator String
    The comparison operator to use for filtering. Defaults to equals. Valid operators include:

    • equals, =, eq - Exact match comparison
    • not-equals, !=, ne - Inverse exact match comparison
    • contains, in - Substring inclusion check
    • does-not-contain, not-in - Inverse substring inclusion check
    • starts-with - Prefix matching
    • does-not-start-with - Inverse prefix matching
    • ends-with - Suffix matching
    • does-not-end-with - Inverse suffix matching
    • >, gt - Numeric greater than comparison
    • >=, ge - Numeric greater than or equal comparison
    • <, lt - Numeric less than comparison
    • <=, le - Numeric less than or equal comparison
    • does-not-exist - Field absence check
    value String
    The value of the detail field to match on. Required unless value_regex is set or operator is does-not-exist.
    valueRegex String
    A regular expression string to apply to the value of the detail field to match on. Required unless value is set or operator is does-not-exist.
    name string
    The name of the detail field to filter by. This must match a schema attribute of the resource (e.g., name, description, id).
    operator string
    The comparison operator to use for filtering. Defaults to equals. Valid operators include:

    • equals, =, eq - Exact match comparison
    • not-equals, !=, ne - Inverse exact match comparison
    • contains, in - Substring inclusion check
    • does-not-contain, not-in - Inverse substring inclusion check
    • starts-with - Prefix matching
    • does-not-start-with - Inverse prefix matching
    • ends-with - Suffix matching
    • does-not-end-with - Inverse suffix matching
    • >, gt - Numeric greater than comparison
    • >=, ge - Numeric greater than or equal comparison
    • <, lt - Numeric less than comparison
    • <=, le - Numeric less than or equal comparison
    • does-not-exist - Field absence check
    value string
    The value of the detail field to match on. Required unless value_regex is set or operator is does-not-exist.
    valueRegex string
    A regular expression string to apply to the value of the detail field to match on. Required unless value is set or operator is does-not-exist.
    name str
    The name of the detail field to filter by. This must match a schema attribute of the resource (e.g., name, description, id).
    operator str
    The comparison operator to use for filtering. Defaults to equals. Valid operators include:

    • equals, =, eq - Exact match comparison
    • not-equals, !=, ne - Inverse exact match comparison
    • contains, in - Substring inclusion check
    • does-not-contain, not-in - Inverse substring inclusion check
    • starts-with - Prefix matching
    • does-not-start-with - Inverse prefix matching
    • ends-with - Suffix matching
    • does-not-end-with - Inverse suffix matching
    • >, gt - Numeric greater than comparison
    • >=, ge - Numeric greater than or equal comparison
    • <, lt - Numeric less than comparison
    • <=, le - Numeric less than or equal comparison
    • does-not-exist - Field absence check
    value str
    The value of the detail field to match on. Required unless value_regex is set or operator is does-not-exist.
    value_regex str
    A regular expression string to apply to the value of the detail field to match on. Required unless value is set or operator is does-not-exist.
    name String
    The name of the detail field to filter by. This must match a schema attribute of the resource (e.g., name, description, id).
    operator String
    The comparison operator to use for filtering. Defaults to equals. Valid operators include:

    • equals, =, eq - Exact match comparison
    • not-equals, !=, ne - Inverse exact match comparison
    • contains, in - Substring inclusion check
    • does-not-contain, not-in - Inverse substring inclusion check
    • starts-with - Prefix matching
    • does-not-start-with - Inverse prefix matching
    • ends-with - Suffix matching
    • does-not-end-with - Inverse suffix matching
    • >, gt - Numeric greater than comparison
    • >=, ge - Numeric greater than or equal comparison
    • <, lt - Numeric less than comparison
    • <=, le - Numeric less than or equal comparison
    • does-not-exist - Field absence check
    value String
    The value of the detail field to match on. Required unless value_regex is set or operator is does-not-exist.
    valueRegex String
    A regular expression string to apply to the value of the detail field to match on. Required unless value is set or operator is does-not-exist.

    Package Details

    Repository
    honeycombio honeycombio/terraform-provider-honeycombio
    License
    Notes
    This Pulumi package is based on the honeycombio Terraform Provider.
    honeycombio logo
    Honeycomb 0.44.0 published on Monday, Dec 15, 2025 by honeycombio
      Meet Neo: Your AI Platform Teammate