launchdarkly.FeatureFlagEnvironment
Explore with Pulumi AI
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
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: launchdarkly.FeatureFlagEnvironmentPrerequisiteArray{
&launchdarkly.FeatureFlagEnvironmentPrerequisiteArgs{
FlagKey: pulumi.Any(launchdarkly_feature_flag.Basic.Key),
Variation: pulumi.Int(0),
},
},
Targets: launchdarkly.FeatureFlagEnvironmentTargetArray{
&launchdarkly.FeatureFlagEnvironmentTargetArgs{
Values: pulumi.StringArray{
pulumi.String("user0"),
},
Variation: pulumi.Int(0),
},
&launchdarkly.FeatureFlagEnvironmentTargetArgs{
Values: pulumi.StringArray{
pulumi.String("user1"),
pulumi.String("user2"),
},
Variation: pulumi.Int(1),
},
},
Rules: launchdarkly.FeatureFlagEnvironmentRuleArray{
&launchdarkly.FeatureFlagEnvironmentRuleArgs{
Clauses: launchdarkly.FeatureFlagEnvironmentRuleClauseArray{
&launchdarkly.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),
},
&launchdarkly.FeatureFlagEnvironmentRuleClauseArgs{
Attribute: pulumi.String("segmentMatch"),
Op: pulumi.String("segmentMatch"),
Values: pulumi.StringArray{
launchdarkly_segment.Example.Key,
},
Negate: pulumi.Bool(false),
},
},
Variation: pulumi.Int(0),
},
},
Fallthrough: &launchdarkly.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 FeatureFlagEnvironment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FeatureFlagEnvironment(name: string, args: FeatureFlagEnvironmentArgs, opts?: CustomResourceOptions);
@overload
def FeatureFlagEnvironment(resource_name: str,
args: FeatureFlagEnvironmentArgs,
opts: Optional[ResourceOptions] = None)
@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)
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.
Parameters
- 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.
Constructor example
The following reference example uses placeholder values for all input properties.
var featureFlagEnvironmentResource = new Launchdarkly.FeatureFlagEnvironment("featureFlagEnvironmentResource", new()
{
EnvKey = "string",
Fallthrough = new Launchdarkly.Inputs.FeatureFlagEnvironmentFallthroughArgs
{
BucketBy = "string",
RolloutWeights = new[]
{
0,
},
Variation = 0,
},
FlagId = "string",
OffVariation = 0,
On = false,
Prerequisites = new[]
{
new Launchdarkly.Inputs.FeatureFlagEnvironmentPrerequisiteArgs
{
FlagKey = "string",
Variation = 0,
},
},
Rules = new[]
{
new Launchdarkly.Inputs.FeatureFlagEnvironmentRuleArgs
{
BucketBy = "string",
Clauses = new[]
{
new Launchdarkly.Inputs.FeatureFlagEnvironmentRuleClauseArgs
{
Attribute = "string",
Op = "string",
Values = new[]
{
"string",
},
Negate = false,
ValueType = "string",
},
},
RolloutWeights = new[]
{
0,
},
Variation = 0,
},
},
Targets = new[]
{
new Launchdarkly.Inputs.FeatureFlagEnvironmentTargetArgs
{
Values = new[]
{
"string",
},
Variation = 0,
},
},
TrackEvents = false,
});
example, err := launchdarkly.NewFeatureFlagEnvironment(ctx, "featureFlagEnvironmentResource", &launchdarkly.FeatureFlagEnvironmentArgs{
EnvKey: pulumi.String("string"),
Fallthrough: &launchdarkly.FeatureFlagEnvironmentFallthroughArgs{
BucketBy: pulumi.String("string"),
RolloutWeights: pulumi.IntArray{
pulumi.Int(0),
},
Variation: pulumi.Int(0),
},
FlagId: pulumi.String("string"),
OffVariation: pulumi.Int(0),
On: pulumi.Bool(false),
Prerequisites: launchdarkly.FeatureFlagEnvironmentPrerequisiteArray{
&launchdarkly.FeatureFlagEnvironmentPrerequisiteArgs{
FlagKey: pulumi.String("string"),
Variation: pulumi.Int(0),
},
},
Rules: launchdarkly.FeatureFlagEnvironmentRuleArray{
&launchdarkly.FeatureFlagEnvironmentRuleArgs{
BucketBy: pulumi.String("string"),
Clauses: launchdarkly.FeatureFlagEnvironmentRuleClauseArray{
&launchdarkly.FeatureFlagEnvironmentRuleClauseArgs{
Attribute: pulumi.String("string"),
Op: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
Negate: pulumi.Bool(false),
ValueType: pulumi.String("string"),
},
},
RolloutWeights: pulumi.IntArray{
pulumi.Int(0),
},
Variation: pulumi.Int(0),
},
},
Targets: launchdarkly.FeatureFlagEnvironmentTargetArray{
&launchdarkly.FeatureFlagEnvironmentTargetArgs{
Values: pulumi.StringArray{
pulumi.String("string"),
},
Variation: pulumi.Int(0),
},
},
TrackEvents: pulumi.Bool(false),
})
var featureFlagEnvironmentResource = new FeatureFlagEnvironment("featureFlagEnvironmentResource", FeatureFlagEnvironmentArgs.builder()
.envKey("string")
.fallthrough(FeatureFlagEnvironmentFallthroughArgs.builder()
.bucketBy("string")
.rolloutWeights(0)
.variation(0)
.build())
.flagId("string")
.offVariation(0)
.on(false)
.prerequisites(FeatureFlagEnvironmentPrerequisiteArgs.builder()
.flagKey("string")
.variation(0)
.build())
.rules(FeatureFlagEnvironmentRuleArgs.builder()
.bucketBy("string")
.clauses(FeatureFlagEnvironmentRuleClauseArgs.builder()
.attribute("string")
.op("string")
.values("string")
.negate(false)
.valueType("string")
.build())
.rolloutWeights(0)
.variation(0)
.build())
.targets(FeatureFlagEnvironmentTargetArgs.builder()
.values("string")
.variation(0)
.build())
.trackEvents(false)
.build());
feature_flag_environment_resource = launchdarkly.FeatureFlagEnvironment("featureFlagEnvironmentResource",
env_key="string",
fallthrough=launchdarkly.FeatureFlagEnvironmentFallthroughArgs(
bucket_by="string",
rollout_weights=[0],
variation=0,
),
flag_id="string",
off_variation=0,
on=False,
prerequisites=[launchdarkly.FeatureFlagEnvironmentPrerequisiteArgs(
flag_key="string",
variation=0,
)],
rules=[launchdarkly.FeatureFlagEnvironmentRuleArgs(
bucket_by="string",
clauses=[launchdarkly.FeatureFlagEnvironmentRuleClauseArgs(
attribute="string",
op="string",
values=["string"],
negate=False,
value_type="string",
)],
rollout_weights=[0],
variation=0,
)],
targets=[launchdarkly.FeatureFlagEnvironmentTargetArgs(
values=["string"],
variation=0,
)],
track_events=False)
const featureFlagEnvironmentResource = new launchdarkly.FeatureFlagEnvironment("featureFlagEnvironmentResource", {
envKey: "string",
fallthrough: {
bucketBy: "string",
rolloutWeights: [0],
variation: 0,
},
flagId: "string",
offVariation: 0,
on: false,
prerequisites: [{
flagKey: "string",
variation: 0,
}],
rules: [{
bucketBy: "string",
clauses: [{
attribute: "string",
op: "string",
values: ["string"],
negate: false,
valueType: "string",
}],
rolloutWeights: [0],
variation: 0,
}],
targets: [{
values: ["string"],
variation: 0,
}],
trackEvents: false,
});
type: launchdarkly:FeatureFlagEnvironment
properties:
envKey: string
fallthrough:
bucketBy: string
rolloutWeights:
- 0
variation: 0
flagId: string
offVariation: 0
"on": false
prerequisites:
- flagKey: string
variation: 0
rules:
- bucketBy: string
clauses:
- attribute: string
negate: false
op: string
valueType: string
values:
- string
rolloutWeights:
- 0
variation: 0
targets:
- values:
- string
variation: 0
trackEvents: false
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:
- Env
Key string - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- Fallthrough
Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Feature Flag Environment Fallthrough - (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- Flag
Id string - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - 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.
- (Optional) Whether targeting is enabled. Defaults to
- Prerequisites
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Feature Flag Environment Prerequisite> - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- Rules
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Feature Flag Environment Rule> - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- Targets
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Feature Flag Environment Target> - (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.
- Env
Key string - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- Fallthrough
Feature
Flag Environment Fallthrough Args - (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- Flag
Id string - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - 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.
- (Optional) Whether targeting is enabled. Defaults to
- Prerequisites
[]Feature
Flag Environment Prerequisite Args - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- Rules
[]Feature
Flag Environment Rule Args - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- Targets
[]Feature
Flag Environment Target Args - (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.
- env
Key String - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- fallthrough
Feature
Flag Environment Fallthrough - (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- flag
Id String - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - off
Variation 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.
- (Optional) Whether targeting is enabled. Defaults to
- prerequisites
List<Feature
Flag Environment Prerequisite> - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
List<Feature
Flag Environment Rule> - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
List<Feature
Flag Environment Target> - (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
- track
Events Boolean - Whether to send event data back to LaunchDarkly. Defaults to
false
if not set.
- env
Key string - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- fallthrough
Feature
Flag Environment Fallthrough - (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- flag
Id string - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - off
Variation 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.
- (Optional) Whether targeting is enabled. Defaults to
- prerequisites
Feature
Flag Environment Prerequisite[] - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
Feature
Flag Environment Rule[] - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
Feature
Flag Environment Target[] - (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
- track
Events boolean - Whether to send event data back to LaunchDarkly. Defaults to
false
if not set.
- env_
key str - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- fallthrough
Feature
Flag Environment Fallthrough Args - (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- flag_
id str - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - 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.
- (Optional) Whether targeting is enabled. Defaults to
- prerequisites
Sequence[Feature
Flag Environment Prerequisite Args] - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
Sequence[Feature
Flag Environment Rule Args] - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
Sequence[Feature
Flag Environment Target Args] - (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.
- env
Key String - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- fallthrough Property Map
- (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- flag
Id String - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - off
Variation 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.
- (Optional) Whether targeting is enabled. Defaults to
- 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.
- track
Events 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 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.
- Env
Key string - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- Fallthrough
Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Feature Flag Environment Fallthrough - (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- Flag
Id string - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - 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.
- (Optional) Whether targeting is enabled. Defaults to
- Prerequisites
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Feature Flag Environment Prerequisite> - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- Rules
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Feature Flag Environment Rule> - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- Targets
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Feature Flag Environment Target> - (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.
- Env
Key string - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- Fallthrough
Feature
Flag Environment Fallthrough Args - (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- Flag
Id string - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - 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.
- (Optional) Whether targeting is enabled. Defaults to
- Prerequisites
[]Feature
Flag Environment Prerequisite Args - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- Rules
[]Feature
Flag Environment Rule Args - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- Targets
[]Feature
Flag Environment Target Args - (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.
- env
Key String - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- fallthrough
Feature
Flag Environment Fallthrough - (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- flag
Id String - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - off
Variation 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.
- (Optional) Whether targeting is enabled. Defaults to
- prerequisites
List<Feature
Flag Environment Prerequisite> - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
List<Feature
Flag Environment Rule> - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
List<Feature
Flag Environment Target> - (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
- track
Events Boolean - Whether to send event data back to LaunchDarkly. Defaults to
false
if not set.
- env
Key string - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- fallthrough
Feature
Flag Environment Fallthrough - (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- flag
Id string - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - off
Variation 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.
- (Optional) Whether targeting is enabled. Defaults to
- prerequisites
Feature
Flag Environment Prerequisite[] - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
Feature
Flag Environment Rule[] - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
Feature
Flag Environment Target[] - (Optional) Set of nested blocks describing the individual user targets for each variation. To learn more, read Nested Target Blocks.
- track
Events boolean - Whether to send event data back to LaunchDarkly. Defaults to
false
if not set.
- env_
key str - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- fallthrough
Feature
Flag Environment Fallthrough Args - (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- flag_
id str - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - 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.
- (Optional) Whether targeting is enabled. Defaults to
- prerequisites
Sequence[Feature
Flag Environment Prerequisite Args] - List of nested blocks describing prerequisite feature flags rules. To learn more, read Nested Prequisites Blocks.
- rules
Sequence[Feature
Flag Environment Rule Args] - List of logical targeting rules. To learn more, read Nested Rules Blocks.
- targets
Sequence[Feature
Flag Environment Target Args] - (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.
- env
Key String - The environment key. A change in this field will force the destruction of the existing resource and the creation of a new one.
- fallthrough Property Map
- (Required) Nested block describing the default variation to serve if no
prerequisites
,target
, orrules
apply.To learn more, read Nested Fallthrough Block.
- (Required) Nested block describing the default variation to serve if no
- flag
Id String - The feature flag's unique
id
in the formatproject_key/flag_key
. A change in this field will force the destruction of the existing resource and the creation of a new one. - off
Variation 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.
- (Optional) Whether targeting is enabled. Defaults to
- 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.
- track
Events Boolean - Whether to send event data back to LaunchDarkly. Defaults to
false
if not set.
Supporting Types
FeatureFlagEnvironmentFallthrough, FeatureFlagEnvironmentFallthroughArgs
- Bucket
By string - Group percentage rollout by a custom attribute. This argument is only valid if
rollout_weights
is also specified. - Rollout
Weights 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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - Variation int
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_weights
.
- Bucket
By string - Group percentage rollout by a custom attribute. This argument is only valid if
rollout_weights
is also specified. - Rollout
Weights []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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - Variation int
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_weights
.
- bucket
By String - Group percentage rollout by a custom attribute. This argument is only valid if
rollout_weights
is also specified. - rollout
Weights 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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - variation Integer
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_weights
.
- bucket
By string - Group percentage rollout by a custom attribute. This argument is only valid if
rollout_weights
is also specified. - rollout
Weights 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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - variation number
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - variation int
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_weights
.
- bucket
By String - Group percentage rollout by a custom attribute. This argument is only valid if
rollout_weights
is also specified. - rollout
Weights 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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - variation Number
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_weights
.
FeatureFlagEnvironmentPrerequisite, FeatureFlagEnvironmentPrerequisiteArgs
FeatureFlagEnvironmentRule, FeatureFlagEnvironmentRuleArgs
- Bucket
By string - Group percentage rollout by a custom attribute. This argument is only valid if
rollout_weights
is also specified. - Clauses
List<Lbrlabs.
Pulumi Package. Launchdarkly. Inputs. Feature Flag Environment Rule Clause> - List of nested blocks specifying the logical clauses to evaluate. To learn more, read Nested Clauses Blocks.
- Rollout
Weights 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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - Variation int
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_weights
.
- Bucket
By string - Group percentage rollout by a custom attribute. This argument is only valid if
rollout_weights
is also specified. - Clauses
[]Feature
Flag Environment Rule Clause - List of nested blocks specifying the logical clauses to evaluate. To learn more, read Nested Clauses Blocks.
- Rollout
Weights []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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - Variation int
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_weights
.
- bucket
By String - Group percentage rollout by a custom attribute. This argument is only valid if
rollout_weights
is also specified. - clauses
List<Feature
Flag Environment Rule Clause> - List of nested blocks specifying the logical clauses to evaluate. To learn more, read Nested Clauses Blocks.
- rollout
Weights 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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - variation Integer
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_weights
.
- bucket
By string - Group percentage rollout by a custom attribute. This argument is only valid if
rollout_weights
is also specified. - clauses
Feature
Flag Environment Rule Clause[] - List of nested blocks specifying the logical clauses to evaluate. To learn more, read Nested Clauses Blocks.
- rollout
Weights 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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - variation number
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_weights
.
- bucket_
by str - Group percentage rollout by a custom attribute. This argument is only valid if
rollout_weights
is also specified. - clauses
Sequence[Feature
Flag Environment Rule Clause] - 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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - variation int
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_weights
.
- bucket
By 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.
- rollout
Weights 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 therollout_weights
must equal 100000 and the number of rollout weights specified in the array must match the number of flag variations. You must specify eithervariation
orrollout_weights
. - variation Number
- The integer variation index to serve if the rule clauses evaluate to
true
. You must specify eithervariation
orrollout_weights
.
FeatureFlagEnvironmentRuleClause, FeatureFlagEnvironmentRuleClauseArgs
- 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
, andsemVerGreaterThan
. - Values List<string>
- The list of values associated with the rule clause.
- Negate bool
- Whether to negate the rule clause.
- Value
Type string - The type for each of the clause's values. Available types are
boolean
,string
, andnumber
. If omitted,value_type
defaults tostring
.
- 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
, andsemVerGreaterThan
. - Values []string
- The list of values associated with the rule clause.
- Negate bool
- Whether to negate the rule clause.
- Value
Type string - The type for each of the clause's values. Available types are
boolean
,string
, andnumber
. If omitted,value_type
defaults tostring
.
- 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
, andsemVerGreaterThan
. - values List<String>
- The list of values associated with the rule clause.
- negate Boolean
- Whether to negate the rule clause.
- value
Type String - The type for each of the clause's values. Available types are
boolean
,string
, andnumber
. If omitted,value_type
defaults tostring
.
- 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
, andsemVerGreaterThan
. - values string[]
- The list of values associated with the rule clause.
- negate boolean
- Whether to negate the rule clause.
- value
Type string - The type for each of the clause's values. Available types are
boolean
,string
, andnumber
. If omitted,value_type
defaults tostring
.
- 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
, andsemVerGreaterThan
. - 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
, andnumber
. If omitted,value_type
defaults tostring
.
- 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
, andsemVerGreaterThan
. - values List<String>
- The list of values associated with the rule clause.
- negate Boolean
- Whether to negate the rule clause.
- value
Type String - The type for each of the clause's values. Available types are
boolean
,string
, andnumber
. If omitted,value_type
defaults tostring
.
FeatureFlagEnvironmentTarget, FeatureFlagEnvironmentTargetArgs
Package Details
- Repository
- launchdarkly lbrlabs/pulumi-launchdarkly
- License
- Notes
- This Pulumi package is based on the
launchdarkly
Terraform Provider.