Launch Darkly

v0.0.3 published on Sunday, Sep 18, 2022 by lbrlabs

FeatureFlagEnvironment

Provides a LaunchDarkly environment-specific feature flag resource.

This resource allows you to create and manage environment-specific feature flags attributes within your LaunchDarkly organization.

Example Usage

using System.Collections.Generic;
using Pulumi;
using Launchdarkly = Lbrlabs.PulumiPackage.Launchdarkly;

return await Deployment.RunAsync(() => 
{
    var numberEnv = new Launchdarkly.FeatureFlagEnvironment("numberEnv", new()
    {
        FlagId = launchdarkly_feature_flag.Number.Id,
        EnvKey = launchdarkly_environment.Staging.Key,
        On = true,
        Prerequisites = new[]
        {
            new Launchdarkly.Inputs.FeatureFlagEnvironmentPrerequisiteArgs
            {
                FlagKey = launchdarkly_feature_flag.Basic.Key,
                Variation = 0,
            },
        },
        Targets = new[]
        {
            new Launchdarkly.Inputs.FeatureFlagEnvironmentTargetArgs
            {
                Values = new[]
                {
                    "user0",
                },
                Variation = 0,
            },
            new Launchdarkly.Inputs.FeatureFlagEnvironmentTargetArgs
            {
                Values = new[]
                {
                    "user1",
                    "user2",
                },
                Variation = 1,
            },
        },
        Rules = new[]
        {
            new Launchdarkly.Inputs.FeatureFlagEnvironmentRuleArgs
            {
                Clauses = new[]
                {
                    new Launchdarkly.Inputs.FeatureFlagEnvironmentRuleClauseArgs
                    {
                        Attribute = "country",
                        Op = "startsWith",
                        Values = new[]
                        {
                            "aus",
                            "de",
                            "united",
                        },
                        Negate = false,
                    },
                    new Launchdarkly.Inputs.FeatureFlagEnvironmentRuleClauseArgs
                    {
                        Attribute = "segmentMatch",
                        Op = "segmentMatch",
                        Values = new[]
                        {
                            launchdarkly_segment.Example.Key,
                        },
                        Negate = false,
                    },
                },
                Variation = 0,
            },
        },
        Fallthrough = new Launchdarkly.Inputs.FeatureFlagEnvironmentFallthroughArgs
        {
            RolloutWeights = new[]
            {
                60000,
                40000,
                0,
            },
        },
        OffVariation = 2,
    });

});
package main

import (
	"github.com/lbrlabs/pulumi-launchdarkly/sdk/go/launchdarkly"
	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)

func main() {
	pulumi.Run(func(ctx *pulumi.Context) error {
		_, err := launchdarkly.NewFeatureFlagEnvironment(ctx, "numberEnv", &launchdarkly.FeatureFlagEnvironmentArgs{
			FlagId: pulumi.Any(launchdarkly_feature_flag.Number.Id),
			EnvKey: pulumi.Any(launchdarkly_environment.Staging.Key),
			On:     pulumi.Bool(true),
			Prerequisites: FeatureFlagEnvironmentPrerequisiteArray{
				&FeatureFlagEnvironmentPrerequisiteArgs{
					FlagKey:   pulumi.Any(launchdarkly_feature_flag.Basic.Key),
					Variation: pulumi.Int(0),
				},
			},
			Targets: FeatureFlagEnvironmentTargetArray{
				&FeatureFlagEnvironmentTargetArgs{
					Values: pulumi.StringArray{
						pulumi.String("user0"),
					},
					Variation: pulumi.Int(0),
				},
				&FeatureFlagEnvironmentTargetArgs{
					Values: pulumi.StringArray{
						pulumi.String("user1"),
						pulumi.String("user2"),
					},
					Variation: pulumi.Int(1),
				},
			},
			Rules: FeatureFlagEnvironmentRuleArray{
				&FeatureFlagEnvironmentRuleArgs{
					Clauses: FeatureFlagEnvironmentRuleClauseArray{
						&FeatureFlagEnvironmentRuleClauseArgs{
							Attribute: pulumi.String("country"),
							Op:        pulumi.String("startsWith"),
							Values: pulumi.StringArray{
								pulumi.String("aus"),
								pulumi.String("de"),
								pulumi.String("united"),
							},
							Negate: pulumi.Bool(false),
						},
						&FeatureFlagEnvironmentRuleClauseArgs{
							Attribute: pulumi.String("segmentMatch"),
							Op:        pulumi.String("segmentMatch"),
							Values: pulumi.StringArray{
								pulumi.Any(launchdarkly_segment.Example.Key),
							},
							Negate: pulumi.Bool(false),
						},
					},
					Variation: pulumi.Int(0),
				},
			},
			Fallthrough: &FeatureFlagEnvironmentFallthroughArgs{
				RolloutWeights: pulumi.IntArray{
					pulumi.Int(60000),
					pulumi.Int(40000),
					pulumi.Int(0),
				},
			},
			OffVariation: pulumi.Int(2),
		})
		if err != nil {
			return err
		}
		return nil
	})
}
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.launchdarkly.FeatureFlagEnvironment;
import com.pulumi.launchdarkly.FeatureFlagEnvironmentArgs;
import com.pulumi.launchdarkly.inputs.FeatureFlagEnvironmentPrerequisiteArgs;
import com.pulumi.launchdarkly.inputs.FeatureFlagEnvironmentTargetArgs;
import com.pulumi.launchdarkly.inputs.FeatureFlagEnvironmentRuleArgs;
import com.pulumi.launchdarkly.inputs.FeatureFlagEnvironmentFallthroughArgs;
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) {
        var numberEnv = new FeatureFlagEnvironment("numberEnv", FeatureFlagEnvironmentArgs.builder()        
            .flagId(launchdarkly_feature_flag.number().id())
            .envKey(launchdarkly_environment.staging().key())
            .on(true)
            .prerequisites(FeatureFlagEnvironmentPrerequisiteArgs.builder()
                .flagKey(launchdarkly_feature_flag.basic().key())
                .variation(0)
                .build())
            .targets(            
                FeatureFlagEnvironmentTargetArgs.builder()
                    .values("user0")
                    .variation(0)
                    .build(),
                FeatureFlagEnvironmentTargetArgs.builder()
                    .values(                    
                        "user1",
                        "user2")
                    .variation(1)
                    .build())
            .rules(FeatureFlagEnvironmentRuleArgs.builder()
                .clauses(                
                    FeatureFlagEnvironmentRuleClauseArgs.builder()
                        .attribute("country")
                        .op("startsWith")
                        .values(                        
                            "aus",
                            "de",
                            "united")
                        .negate(false)
                        .build(),
                    FeatureFlagEnvironmentRuleClauseArgs.builder()
                        .attribute("segmentMatch")
                        .op("segmentMatch")
                        .values(launchdarkly_segment.example().key())
                        .negate(false)
                        .build())
                .variation(0)
                .build())
            .fallthrough(FeatureFlagEnvironmentFallthroughArgs.builder()
                .rolloutWeights(                
                    60000,
                    40000,
                    0)
                .build())
            .offVariation(2)
            .build());

    }
}
import pulumi
import lbrlabs_pulumi_launchdarkly as launchdarkly

number_env = launchdarkly.FeatureFlagEnvironment("numberEnv",
    flag_id=launchdarkly_feature_flag["number"]["id"],
    env_key=launchdarkly_environment["staging"]["key"],
    on=True,
    prerequisites=[launchdarkly.FeatureFlagEnvironmentPrerequisiteArgs(
        flag_key=launchdarkly_feature_flag["basic"]["key"],
        variation=0,
    )],
    targets=[
        launchdarkly.FeatureFlagEnvironmentTargetArgs(
            values=["user0"],
            variation=0,
        ),
        launchdarkly.FeatureFlagEnvironmentTargetArgs(
            values=[
                "user1",
                "user2",
            ],
            variation=1,
        ),
    ],
    rules=[launchdarkly.FeatureFlagEnvironmentRuleArgs(
        clauses=[
            launchdarkly.FeatureFlagEnvironmentRuleClauseArgs(
                attribute="country",
                op="startsWith",
                values=[
                    "aus",
                    "de",
                    "united",
                ],
                negate=False,
            ),
            launchdarkly.FeatureFlagEnvironmentRuleClauseArgs(
                attribute="segmentMatch",
                op="segmentMatch",
                values=[launchdarkly_segment["example"]["key"]],
                negate=False,
            ),
        ],
        variation=0,
    )],
    fallthrough=launchdarkly.FeatureFlagEnvironmentFallthroughArgs(
        rollout_weights=[
            60000,
            40000,
            0,
        ],
    ),
    off_variation=2)
import * as pulumi from "@pulumi/pulumi";
import * as launchdarkly from "@lbrlabs/pulumi-launchdarkly";

const numberEnv = new launchdarkly.FeatureFlagEnvironment("numberEnv", {
    flagId: launchdarkly_feature_flag.number.id,
    envKey: launchdarkly_environment.staging.key,
    on: true,
    prerequisites: [{
        flagKey: launchdarkly_feature_flag.basic.key,
        variation: 0,
    }],
    targets: [
        {
            values: ["user0"],
            variation: 0,
        },
        {
            values: [
                "user1",
                "user2",
            ],
            variation: 1,
        },
    ],
    rules: [{
        clauses: [
            {
                attribute: "country",
                op: "startsWith",
                values: [
                    "aus",
                    "de",
                    "united",
                ],
                negate: false,
            },
            {
                attribute: "segmentMatch",
                op: "segmentMatch",
                values: [launchdarkly_segment.example.key],
                negate: false,
            },
        ],
        variation: 0,
    }],
    fallthrough: {
        rolloutWeights: [
            60000,
            40000,
            0,
        ],
    },
    offVariation: 2,
});
resources:
  numberEnv:
    type: launchdarkly:FeatureFlagEnvironment
    properties:
      flagId: ${launchdarkly_feature_flag.number.id}
      envKey: ${launchdarkly_environment.staging.key}
      on: true
      prerequisites:
        - flagKey: ${launchdarkly_feature_flag.basic.key}
          variation: 0
      targets:
        - values:
            - user0
          variation: 0
        - values:
            - user1
            - user2
          variation: 1
      rules:
        - clauses:
            - attribute: country
              op: startsWith
              values:
                - aus
                - de
                - united
              negate: false
            - attribute: segmentMatch
              op: segmentMatch
              values:
                - ${launchdarkly_segment.example.key}
              negate: false
          variation: 0
      fallthrough:
        rolloutWeights:
          - 60000
          - 40000
          - 0
      offVariation: 2

Create a FeatureFlagEnvironment Resource

new FeatureFlagEnvironment(name: string, args: FeatureFlagEnvironmentArgs, opts?: CustomResourceOptions);
@overload
def FeatureFlagEnvironment(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           env_key: Optional[str] = None,
                           fallthrough: Optional[FeatureFlagEnvironmentFallthroughArgs] = None,
                           flag_id: Optional[str] = None,
                           off_variation: Optional[int] = None,
                           on: Optional[bool] = None,
                           prerequisites: Optional[Sequence[FeatureFlagEnvironmentPrerequisiteArgs]] = None,
                           rules: Optional[Sequence[FeatureFlagEnvironmentRuleArgs]] = None,
                           targets: Optional[Sequence[FeatureFlagEnvironmentTargetArgs]] = None,
                           track_events: Optional[bool] = None)
@overload
def FeatureFlagEnvironment(resource_name: str,
                           args: FeatureFlagEnvironmentArgs,
                           opts: Optional[ResourceOptions] = None)
func NewFeatureFlagEnvironment(ctx *Context, name string, args FeatureFlagEnvironmentArgs, opts ...ResourceOption) (*FeatureFlagEnvironment, error)
public FeatureFlagEnvironment(string name, FeatureFlagEnvironmentArgs args, CustomResourceOptions? opts = null)
public FeatureFlagEnvironment(String name, FeatureFlagEnvironmentArgs args)
public FeatureFlagEnvironment(String name, FeatureFlagEnvironmentArgs args, CustomResourceOptions options)
type: launchdarkly:FeatureFlagEnvironment
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

name string
The unique name of the resource.
args FeatureFlagEnvironmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name str
The unique name of the resource.
args FeatureFlagEnvironmentArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name string
The unique name of the resource.
args FeatureFlagEnvironmentArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name string
The unique name of the resource.
args FeatureFlagEnvironmentArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name String
The unique name of the resource.
args FeatureFlagEnvironmentArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

FeatureFlagEnvironment Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

The FeatureFlagEnvironment resource accepts the following input properties:

EnvKey string

The environment key.

Fallthrough Lbrlabs.PulumiPackage.Launchdarkly.Inputs.FeatureFlagEnvironmentFallthroughArgs
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
FlagId string

The feature flag's unique id in the format project_key/flag_key.

OffVariation int

The index of the variation to serve if targeting is disabled.

On bool
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
Prerequisites List<Lbrlabs.PulumiPackage.Launchdarkly.Inputs.FeatureFlagEnvironmentPrerequisiteArgs>

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

Rules List<Lbrlabs.PulumiPackage.Launchdarkly.Inputs.FeatureFlagEnvironmentRuleArgs>

List of logical targeting rules. To learn more, read Nested Rules Blocks.

Targets List<Lbrlabs.PulumiPackage.Launchdarkly.Inputs.FeatureFlagEnvironmentTargetArgs>
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
TrackEvents bool

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

EnvKey string

The environment key.

Fallthrough FeatureFlagEnvironmentFallthroughArgs
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
FlagId string

The feature flag's unique id in the format project_key/flag_key.

OffVariation int

The index of the variation to serve if targeting is disabled.

On bool
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
Prerequisites []FeatureFlagEnvironmentPrerequisiteArgs

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

Rules []FeatureFlagEnvironmentRuleArgs

List of logical targeting rules. To learn more, read Nested Rules Blocks.

Targets []FeatureFlagEnvironmentTargetArgs
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
TrackEvents bool

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

envKey String

The environment key.

fallthrough FeatureFlagEnvironmentFallthroughArgs
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
flagId String

The feature flag's unique id in the format project_key/flag_key.

offVariation Integer

The index of the variation to serve if targeting is disabled.

on Boolean
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
prerequisites List<FeatureFlagEnvironmentPrerequisiteArgs>

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

rules List<FeatureFlagEnvironmentRuleArgs>

List of logical targeting rules. To learn more, read Nested Rules Blocks.

targets List<FeatureFlagEnvironmentTargetArgs>
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
trackEvents Boolean

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

envKey string

The environment key.

fallthrough FeatureFlagEnvironmentFallthroughArgs
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
flagId string

The feature flag's unique id in the format project_key/flag_key.

offVariation number

The index of the variation to serve if targeting is disabled.

on boolean
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
prerequisites FeatureFlagEnvironmentPrerequisiteArgs[]

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

rules FeatureFlagEnvironmentRuleArgs[]

List of logical targeting rules. To learn more, read Nested Rules Blocks.

targets FeatureFlagEnvironmentTargetArgs[]
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
trackEvents boolean

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

env_key str

The environment key.

fallthrough FeatureFlagEnvironmentFallthroughArgs
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
flag_id str

The feature flag's unique id in the format project_key/flag_key.

off_variation int

The index of the variation to serve if targeting is disabled.

on bool
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
prerequisites Sequence[FeatureFlagEnvironmentPrerequisiteArgs]

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

rules Sequence[FeatureFlagEnvironmentRuleArgs]

List of logical targeting rules. To learn more, read Nested Rules Blocks.

targets Sequence[FeatureFlagEnvironmentTargetArgs]
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
track_events bool

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

envKey String

The environment key.

fallthrough Property Map
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
flagId String

The feature flag's unique id in the format project_key/flag_key.

offVariation Number

The index of the variation to serve if targeting is disabled.

on Boolean
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
prerequisites List<Property Map>

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

rules List<Property Map>

List of logical targeting rules. To learn more, read Nested Rules Blocks.

targets List<Property Map>
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
trackEvents Boolean

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

Outputs

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

Get an existing FeatureFlagEnvironment 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?: FeatureFlagEnvironmentState, opts?: CustomResourceOptions): FeatureFlagEnvironment
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        env_key: Optional[str] = None,
        fallthrough: Optional[FeatureFlagEnvironmentFallthroughArgs] = None,
        flag_id: Optional[str] = None,
        off_variation: Optional[int] = None,
        on: Optional[bool] = None,
        prerequisites: Optional[Sequence[FeatureFlagEnvironmentPrerequisiteArgs]] = None,
        rules: Optional[Sequence[FeatureFlagEnvironmentRuleArgs]] = None,
        targets: Optional[Sequence[FeatureFlagEnvironmentTargetArgs]] = None,
        track_events: Optional[bool] = None) -> FeatureFlagEnvironment
func GetFeatureFlagEnvironment(ctx *Context, name string, id IDInput, state *FeatureFlagEnvironmentState, opts ...ResourceOption) (*FeatureFlagEnvironment, error)
public static FeatureFlagEnvironment Get(string name, Input<string> id, FeatureFlagEnvironmentState? state, CustomResourceOptions? opts = null)
public static FeatureFlagEnvironment get(String name, Output<String> id, FeatureFlagEnvironmentState state, CustomResourceOptions options)
Resource lookup is not supported in YAML
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
The unique provider ID of the resource to lookup.
name
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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
The unique name of the resulting resource.
id
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:
EnvKey string

The environment key.

Fallthrough Lbrlabs.PulumiPackage.Launchdarkly.Inputs.FeatureFlagEnvironmentFallthroughArgs
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
FlagId string

The feature flag's unique id in the format project_key/flag_key.

OffVariation int

The index of the variation to serve if targeting is disabled.

On bool
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
Prerequisites List<Lbrlabs.PulumiPackage.Launchdarkly.Inputs.FeatureFlagEnvironmentPrerequisiteArgs>

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

Rules List<Lbrlabs.PulumiPackage.Launchdarkly.Inputs.FeatureFlagEnvironmentRuleArgs>

List of logical targeting rules. To learn more, read Nested Rules Blocks.

Targets List<Lbrlabs.PulumiPackage.Launchdarkly.Inputs.FeatureFlagEnvironmentTargetArgs>
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
TrackEvents bool

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

EnvKey string

The environment key.

Fallthrough FeatureFlagEnvironmentFallthroughArgs
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
FlagId string

The feature flag's unique id in the format project_key/flag_key.

OffVariation int

The index of the variation to serve if targeting is disabled.

On bool
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
Prerequisites []FeatureFlagEnvironmentPrerequisiteArgs

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

Rules []FeatureFlagEnvironmentRuleArgs

List of logical targeting rules. To learn more, read Nested Rules Blocks.

Targets []FeatureFlagEnvironmentTargetArgs
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
TrackEvents bool

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

envKey String

The environment key.

fallthrough FeatureFlagEnvironmentFallthroughArgs
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
flagId String

The feature flag's unique id in the format project_key/flag_key.

offVariation Integer

The index of the variation to serve if targeting is disabled.

on Boolean
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
prerequisites List<FeatureFlagEnvironmentPrerequisiteArgs>

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

rules List<FeatureFlagEnvironmentRuleArgs>

List of logical targeting rules. To learn more, read Nested Rules Blocks.

targets List<FeatureFlagEnvironmentTargetArgs>
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
trackEvents Boolean

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

envKey string

The environment key.

fallthrough FeatureFlagEnvironmentFallthroughArgs
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
flagId string

The feature flag's unique id in the format project_key/flag_key.

offVariation number

The index of the variation to serve if targeting is disabled.

on boolean
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
prerequisites FeatureFlagEnvironmentPrerequisiteArgs[]

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

rules FeatureFlagEnvironmentRuleArgs[]

List of logical targeting rules. To learn more, read Nested Rules Blocks.

targets FeatureFlagEnvironmentTargetArgs[]
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
trackEvents boolean

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

env_key str

The environment key.

fallthrough FeatureFlagEnvironmentFallthroughArgs
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
flag_id str

The feature flag's unique id in the format project_key/flag_key.

off_variation int

The index of the variation to serve if targeting is disabled.

on bool
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
prerequisites Sequence[FeatureFlagEnvironmentPrerequisiteArgs]

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

rules Sequence[FeatureFlagEnvironmentRuleArgs]

List of logical targeting rules. To learn more, read Nested Rules Blocks.

targets Sequence[FeatureFlagEnvironmentTargetArgs]
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
track_events bool

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

envKey String

The environment key.

fallthrough Property Map
  • (Required) Nested block describing the default variation to serve if no prerequisites, target, or rules apply.To learn more, read Nested Fallthrough Block.
flagId String

The feature flag's unique id in the format project_key/flag_key.

offVariation Number

The index of the variation to serve if targeting is disabled.

on Boolean
  • (Optional) Whether targeting is enabled. Defaults to false if not set.
prerequisites List<Property Map>

List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.

rules List<Property Map>

List of logical targeting rules. To learn more, read Nested Rules Blocks.

targets List<Property Map>
  • (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
trackEvents Boolean

Whether to send event data back to LaunchDarkly. Defaults to false if not set.

Supporting Types

FeatureFlagEnvironmentFallthrough

BucketBy string

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

RolloutWeights List<int>

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

Variation int

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

BucketBy string

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

RolloutWeights []int

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

Variation int

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

bucketBy String

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

rolloutWeights List<Integer>

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

variation Integer

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

bucketBy string

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

rolloutWeights number[]

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

variation number

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

bucket_by str

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

rollout_weights Sequence[int]

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

variation int

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

bucketBy String

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

rolloutWeights List<Number>

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

variation Number

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

FeatureFlagEnvironmentPrerequisite

FlagKey string

The prerequisite feature flag's key.

Variation int

The index of the prerequisite feature flag's variation to target.

FlagKey string

The prerequisite feature flag's key.

Variation int

The index of the prerequisite feature flag's variation to target.

flagKey String

The prerequisite feature flag's key.

variation Integer

The index of the prerequisite feature flag's variation to target.

flagKey string

The prerequisite feature flag's key.

variation number

The index of the prerequisite feature flag's variation to target.

flag_key str

The prerequisite feature flag's key.

variation int

The index of the prerequisite feature flag's variation to target.

flagKey String

The prerequisite feature flag's key.

variation Number

The index of the prerequisite feature flag's variation to target.

FeatureFlagEnvironmentRule

BucketBy string

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

Clauses List<Lbrlabs.PulumiPackage.Launchdarkly.Inputs.FeatureFlagEnvironmentRuleClause>

List of nested blocks specifying the logical clauses to evaluate. To learn more, read Nested Clauses Blocks.

RolloutWeights List<int>

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

Variation int

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

BucketBy string

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

Clauses []FeatureFlagEnvironmentRuleClause

List of nested blocks specifying the logical clauses to evaluate. To learn more, read Nested Clauses Blocks.

RolloutWeights []int

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

Variation int

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

bucketBy String

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

clauses List<FeatureFlagEnvironmentRuleClause>

List of nested blocks specifying the logical clauses to evaluate. To learn more, read Nested Clauses Blocks.

rolloutWeights List<Integer>

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

variation Integer

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

bucketBy string

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

clauses FeatureFlagEnvironmentRuleClause[]

List of nested blocks specifying the logical clauses to evaluate. To learn more, read Nested Clauses Blocks.

rolloutWeights number[]

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

variation number

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

bucket_by str

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

clauses Sequence[FeatureFlagEnvironmentRuleClause]

List of nested blocks specifying the logical clauses to evaluate. To learn more, read Nested Clauses Blocks.

rollout_weights Sequence[int]

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

variation int

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

bucketBy String

Group percentage rollout by a custom attribute. This argument is only valid if rollout_weights is also specified.

clauses List<Property Map>

List of nested blocks specifying the logical clauses to evaluate. To learn more, read Nested Clauses Blocks.

rolloutWeights List<Number>

List of integer percentage rollout weights (in thousandths of a percent) to apply to each variation if the rule clauses evaluates to true. The sum of the rollout_weights must equal 100000. You must specify either variation or rollout_weights.

variation Number

The integer variation index to serve if the rule clauses evaluate to true. You must specify either variation or rollout_weights.

FeatureFlagEnvironmentRuleClause

Attribute string

The user attribute to operate on.

Op string

The operator associated with the rule clause. Available options are in, endsWith, startsWith, matches, contains, lessThan, lessThanOrEqual, greaterThanOrEqual, before, after, segmentMatch, semVerEqual, semVerLessThan, and semVerGreaterThan.

Values List<string>

The list of values associated with the rule clause.

Negate bool

Whether to negate the rule clause.

ValueType string

The type for each of the clause's values. Available types are boolean, string, and number. If omitted, value_type defaults to string.

Attribute string

The user attribute to operate on.

Op string

The operator associated with the rule clause. Available options are in, endsWith, startsWith, matches, contains, lessThan, lessThanOrEqual, greaterThanOrEqual, before, after, segmentMatch, semVerEqual, semVerLessThan, and semVerGreaterThan.

Values []string

The list of values associated with the rule clause.

Negate bool

Whether to negate the rule clause.

ValueType string

The type for each of the clause's values. Available types are boolean, string, and number. If omitted, value_type defaults to string.

attribute String

The user attribute to operate on.

op String

The operator associated with the rule clause. Available options are in, endsWith, startsWith, matches, contains, lessThan, lessThanOrEqual, greaterThanOrEqual, before, after, segmentMatch, semVerEqual, semVerLessThan, and semVerGreaterThan.

values List<String>

The list of values associated with the rule clause.

negate Boolean

Whether to negate the rule clause.

valueType String

The type for each of the clause's values. Available types are boolean, string, and number. If omitted, value_type defaults to string.

attribute string

The user attribute to operate on.

op string

The operator associated with the rule clause. Available options are in, endsWith, startsWith, matches, contains, lessThan, lessThanOrEqual, greaterThanOrEqual, before, after, segmentMatch, semVerEqual, semVerLessThan, and semVerGreaterThan.

values string[]

The list of values associated with the rule clause.

negate boolean

Whether to negate the rule clause.

valueType string

The type for each of the clause's values. Available types are boolean, string, and number. If omitted, value_type defaults to string.

attribute str

The user attribute to operate on.

op str

The operator associated with the rule clause. Available options are in, endsWith, startsWith, matches, contains, lessThan, lessThanOrEqual, greaterThanOrEqual, before, after, segmentMatch, semVerEqual, semVerLessThan, and semVerGreaterThan.

values Sequence[str]

The list of values associated with the rule clause.

negate bool

Whether to negate the rule clause.

value_type str

The type for each of the clause's values. Available types are boolean, string, and number. If omitted, value_type defaults to string.

attribute String

The user attribute to operate on.

op String

The operator associated with the rule clause. Available options are in, endsWith, startsWith, matches, contains, lessThan, lessThanOrEqual, greaterThanOrEqual, before, after, segmentMatch, semVerEqual, semVerLessThan, and semVerGreaterThan.

values List<String>

The list of values associated with the rule clause.

negate Boolean

Whether to negate the rule clause.

valueType String

The type for each of the clause's values. Available types are boolean, string, and number. If omitted, value_type defaults to string.

FeatureFlagEnvironmentTarget

Values List<string>

List of user strings to target.

Variation int

The index of the variation to serve is a user target value is matched.

Values []string

List of user strings to target.

Variation int

The index of the variation to serve is a user target value is matched.

values List<String>

List of user strings to target.

variation Integer

The index of the variation to serve is a user target value is matched.

values string[]

List of user strings to target.

variation number

The index of the variation to serve is a user target value is matched.

values Sequence[str]

List of user strings to target.

variation int

The index of the variation to serve is a user target value is matched.

values List<String>

List of user strings to target.

variation Number

The index of the variation to serve is a user target value is matched.

Import

LaunchDarkly feature flag environments can be imported using the resource’s ID in the form project_key/env_key/flag_key, e.g.

 $ pulumi import launchdarkly:index/featureFlagEnvironment:FeatureFlagEnvironment example example-project/example-env/example-flag-key

Package Details

Repository
https://github.com/lbrlabs/pulumi-launchdarkly
License
Notes

This Pulumi package is based on the launchdarkly Terraform Provider.