harness.platform.FeatureFlagTargetGroup
Explore with Pulumi AI
Resource for creating a Harness Feature Flag Target Group.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
const target = new harness.platform.FeatureFlagTargetGroup("target", {
orgId: "test",
projectId: "test",
identifier: "MY_FEATURE",
environment: "MY_ENVIRONMENT",
name: "MY_FEATURE",
accountId: "MY_ACCOUNT_ID",
includeds: ["target_id_1"],
excludeds: ["target_id_2"],
rules: [{
attribute: "MY_ATTRIBUTE",
op: "equal",
values: ["MY_VALUE"],
}],
});
import pulumi
import pulumi_harness as harness
target = harness.platform.FeatureFlagTargetGroup("target",
org_id="test",
project_id="test",
identifier="MY_FEATURE",
environment="MY_ENVIRONMENT",
name="MY_FEATURE",
account_id="MY_ACCOUNT_ID",
includeds=["target_id_1"],
excludeds=["target_id_2"],
rules=[{
"attribute": "MY_ATTRIBUTE",
"op": "equal",
"values": ["MY_VALUE"],
}])
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/platform"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_, err := platform.NewFeatureFlagTargetGroup(ctx, "target", &platform.FeatureFlagTargetGroupArgs{
OrgId: pulumi.String("test"),
ProjectId: pulumi.String("test"),
Identifier: pulumi.String("MY_FEATURE"),
Environment: pulumi.String("MY_ENVIRONMENT"),
Name: pulumi.String("MY_FEATURE"),
AccountId: pulumi.String("MY_ACCOUNT_ID"),
Includeds: pulumi.StringArray{
pulumi.String("target_id_1"),
},
Excludeds: pulumi.StringArray{
pulumi.String("target_id_2"),
},
Rules: platform.FeatureFlagTargetGroupRuleArray{
&platform.FeatureFlagTargetGroupRuleArgs{
Attribute: pulumi.String("MY_ATTRIBUTE"),
Op: pulumi.String("equal"),
Values: pulumi.StringArray{
pulumi.String("MY_VALUE"),
},
},
},
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
var target = new Harness.Platform.FeatureFlagTargetGroup("target", new()
{
OrgId = "test",
ProjectId = "test",
Identifier = "MY_FEATURE",
Environment = "MY_ENVIRONMENT",
Name = "MY_FEATURE",
AccountId = "MY_ACCOUNT_ID",
Includeds = new[]
{
"target_id_1",
},
Excludeds = new[]
{
"target_id_2",
},
Rules = new[]
{
new Harness.Platform.Inputs.FeatureFlagTargetGroupRuleArgs
{
Attribute = "MY_ATTRIBUTE",
Op = "equal",
Values = new[]
{
"MY_VALUE",
},
},
},
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.platform.FeatureFlagTargetGroup;
import com.pulumi.harness.platform.FeatureFlagTargetGroupArgs;
import com.pulumi.harness.platform.inputs.FeatureFlagTargetGroupRuleArgs;
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 target = new FeatureFlagTargetGroup("target", FeatureFlagTargetGroupArgs.builder()
.orgId("test")
.projectId("test")
.identifier("MY_FEATURE")
.environment("MY_ENVIRONMENT")
.name("MY_FEATURE")
.accountId("MY_ACCOUNT_ID")
.includeds("target_id_1")
.excludeds("target_id_2")
.rules(FeatureFlagTargetGroupRuleArgs.builder()
.attribute("MY_ATTRIBUTE")
.op("equal")
.values("MY_VALUE")
.build())
.build());
}
}
resources:
target:
type: harness:platform:FeatureFlagTargetGroup
properties:
orgId: test
projectId: test
identifier: MY_FEATURE
environment: MY_ENVIRONMENT
name: MY_FEATURE
accountId: MY_ACCOUNT_ID
includeds:
- target_id_1
excludeds:
- target_id_2
rules:
- attribute: MY_ATTRIBUTE
op: equal
values:
- MY_VALUE
Create FeatureFlagTargetGroup Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new FeatureFlagTargetGroup(name: string, args: FeatureFlagTargetGroupArgs, opts?: CustomResourceOptions);
@overload
def FeatureFlagTargetGroup(resource_name: str,
args: FeatureFlagTargetGroupArgs,
opts: Optional[ResourceOptions] = None)
@overload
def FeatureFlagTargetGroup(resource_name: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
environment: Optional[str] = None,
identifier: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
excludeds: Optional[Sequence[str]] = None,
includeds: Optional[Sequence[str]] = None,
name: Optional[str] = None,
rules: Optional[Sequence[FeatureFlagTargetGroupRuleArgs]] = None)
func NewFeatureFlagTargetGroup(ctx *Context, name string, args FeatureFlagTargetGroupArgs, opts ...ResourceOption) (*FeatureFlagTargetGroup, error)
public FeatureFlagTargetGroup(string name, FeatureFlagTargetGroupArgs args, CustomResourceOptions? opts = null)
public FeatureFlagTargetGroup(String name, FeatureFlagTargetGroupArgs args)
public FeatureFlagTargetGroup(String name, FeatureFlagTargetGroupArgs args, CustomResourceOptions options)
type: harness:platform:FeatureFlagTargetGroup
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 FeatureFlagTargetGroupArgs
- 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 FeatureFlagTargetGroupArgs
- 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 FeatureFlagTargetGroupArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args FeatureFlagTargetGroupArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args FeatureFlagTargetGroupArgs
- 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 featureFlagTargetGroupResource = new Harness.Platform.FeatureFlagTargetGroup("featureFlagTargetGroupResource", new()
{
AccountId = "string",
Environment = "string",
Identifier = "string",
OrgId = "string",
ProjectId = "string",
Excludeds = new[]
{
"string",
},
Includeds = new[]
{
"string",
},
Name = "string",
Rules = new[]
{
new Harness.Platform.Inputs.FeatureFlagTargetGroupRuleArgs
{
Attribute = "string",
Negate = false,
Op = "string",
Values = new[]
{
"string",
},
},
},
});
example, err := platform.NewFeatureFlagTargetGroup(ctx, "featureFlagTargetGroupResource", &platform.FeatureFlagTargetGroupArgs{
AccountId: pulumi.String("string"),
Environment: pulumi.String("string"),
Identifier: pulumi.String("string"),
OrgId: pulumi.String("string"),
ProjectId: pulumi.String("string"),
Excludeds: pulumi.StringArray{
pulumi.String("string"),
},
Includeds: pulumi.StringArray{
pulumi.String("string"),
},
Name: pulumi.String("string"),
Rules: platform.FeatureFlagTargetGroupRuleArray{
&platform.FeatureFlagTargetGroupRuleArgs{
Attribute: pulumi.String("string"),
Negate: pulumi.Bool(false),
Op: pulumi.String("string"),
Values: pulumi.StringArray{
pulumi.String("string"),
},
},
},
})
var featureFlagTargetGroupResource = new FeatureFlagTargetGroup("featureFlagTargetGroupResource", FeatureFlagTargetGroupArgs.builder()
.accountId("string")
.environment("string")
.identifier("string")
.orgId("string")
.projectId("string")
.excludeds("string")
.includeds("string")
.name("string")
.rules(FeatureFlagTargetGroupRuleArgs.builder()
.attribute("string")
.negate(false)
.op("string")
.values("string")
.build())
.build());
feature_flag_target_group_resource = harness.platform.FeatureFlagTargetGroup("featureFlagTargetGroupResource",
account_id="string",
environment="string",
identifier="string",
org_id="string",
project_id="string",
excludeds=["string"],
includeds=["string"],
name="string",
rules=[{
"attribute": "string",
"negate": False,
"op": "string",
"values": ["string"],
}])
const featureFlagTargetGroupResource = new harness.platform.FeatureFlagTargetGroup("featureFlagTargetGroupResource", {
accountId: "string",
environment: "string",
identifier: "string",
orgId: "string",
projectId: "string",
excludeds: ["string"],
includeds: ["string"],
name: "string",
rules: [{
attribute: "string",
negate: false,
op: "string",
values: ["string"],
}],
});
type: harness:platform:FeatureFlagTargetGroup
properties:
accountId: string
environment: string
excludeds:
- string
identifier: string
includeds:
- string
name: string
orgId: string
projectId: string
rules:
- attribute: string
negate: false
op: string
values:
- string
FeatureFlagTargetGroup Resource Properties
To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.
Inputs
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The FeatureFlagTargetGroup resource accepts the following input properties:
- Account
Id string - Account Identifier
- Environment string
- Environment Identifier
- Identifier string
- The unique identifier of the feature flag target group.
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Excludeds List<string>
- A list of targets to exclude from the target group
- Includeds List<string>
- A list of targets to include in the target group
- Name string
- The name of the feature flag target group.
- Rules
List<Feature
Flag Target Group Rule> - The list of rules used to include targets in the target group.
- Account
Id string - Account Identifier
- Environment string
- Environment Identifier
- Identifier string
- The unique identifier of the feature flag target group.
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Excludeds []string
- A list of targets to exclude from the target group
- Includeds []string
- A list of targets to include in the target group
- Name string
- The name of the feature flag target group.
- Rules
[]Feature
Flag Target Group Rule Args - The list of rules used to include targets in the target group.
- account
Id String - Account Identifier
- environment String
- Environment Identifier
- identifier String
- The unique identifier of the feature flag target group.
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- excludeds List<String>
- A list of targets to exclude from the target group
- includeds List<String>
- A list of targets to include in the target group
- name String
- The name of the feature flag target group.
- rules
List<Feature
Flag Target Group Rule> - The list of rules used to include targets in the target group.
- account
Id string - Account Identifier
- environment string
- Environment Identifier
- identifier string
- The unique identifier of the feature flag target group.
- org
Id string - Organization Identifier
- project
Id string - Project Identifier
- excludeds string[]
- A list of targets to exclude from the target group
- includeds string[]
- A list of targets to include in the target group
- name string
- The name of the feature flag target group.
- rules
Feature
Flag Target Group Rule[] - The list of rules used to include targets in the target group.
- account_
id str - Account Identifier
- environment str
- Environment Identifier
- identifier str
- The unique identifier of the feature flag target group.
- org_
id str - Organization Identifier
- project_
id str - Project Identifier
- excludeds Sequence[str]
- A list of targets to exclude from the target group
- includeds Sequence[str]
- A list of targets to include in the target group
- name str
- The name of the feature flag target group.
- rules
Sequence[Feature
Flag Target Group Rule Args] - The list of rules used to include targets in the target group.
- account
Id String - Account Identifier
- environment String
- Environment Identifier
- identifier String
- The unique identifier of the feature flag target group.
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- excludeds List<String>
- A list of targets to exclude from the target group
- includeds List<String>
- A list of targets to include in the target group
- name String
- The name of the feature flag target group.
- rules List<Property Map>
- The list of rules used to include targets in the target group.
Outputs
All input properties are implicitly available as output properties. Additionally, the FeatureFlagTargetGroup 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 FeatureFlagTargetGroup Resource
Get an existing FeatureFlagTargetGroup 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?: FeatureFlagTargetGroupState, opts?: CustomResourceOptions): FeatureFlagTargetGroup
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
account_id: Optional[str] = None,
environment: Optional[str] = None,
excludeds: Optional[Sequence[str]] = None,
identifier: Optional[str] = None,
includeds: Optional[Sequence[str]] = None,
name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
rules: Optional[Sequence[FeatureFlagTargetGroupRuleArgs]] = None) -> FeatureFlagTargetGroup
func GetFeatureFlagTargetGroup(ctx *Context, name string, id IDInput, state *FeatureFlagTargetGroupState, opts ...ResourceOption) (*FeatureFlagTargetGroup, error)
public static FeatureFlagTargetGroup Get(string name, Input<string> id, FeatureFlagTargetGroupState? state, CustomResourceOptions? opts = null)
public static FeatureFlagTargetGroup get(String name, Output<String> id, FeatureFlagTargetGroupState 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.
- Account
Id string - Account Identifier
- Environment string
- Environment Identifier
- Excludeds List<string>
- A list of targets to exclude from the target group
- Identifier string
- The unique identifier of the feature flag target group.
- Includeds List<string>
- A list of targets to include in the target group
- Name string
- The name of the feature flag target group.
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Rules
List<Feature
Flag Target Group Rule> - The list of rules used to include targets in the target group.
- Account
Id string - Account Identifier
- Environment string
- Environment Identifier
- Excludeds []string
- A list of targets to exclude from the target group
- Identifier string
- The unique identifier of the feature flag target group.
- Includeds []string
- A list of targets to include in the target group
- Name string
- The name of the feature flag target group.
- Org
Id string - Organization Identifier
- Project
Id string - Project Identifier
- Rules
[]Feature
Flag Target Group Rule Args - The list of rules used to include targets in the target group.
- account
Id String - Account Identifier
- environment String
- Environment Identifier
- excludeds List<String>
- A list of targets to exclude from the target group
- identifier String
- The unique identifier of the feature flag target group.
- includeds List<String>
- A list of targets to include in the target group
- name String
- The name of the feature flag target group.
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- rules
List<Feature
Flag Target Group Rule> - The list of rules used to include targets in the target group.
- account
Id string - Account Identifier
- environment string
- Environment Identifier
- excludeds string[]
- A list of targets to exclude from the target group
- identifier string
- The unique identifier of the feature flag target group.
- includeds string[]
- A list of targets to include in the target group
- name string
- The name of the feature flag target group.
- org
Id string - Organization Identifier
- project
Id string - Project Identifier
- rules
Feature
Flag Target Group Rule[] - The list of rules used to include targets in the target group.
- account_
id str - Account Identifier
- environment str
- Environment Identifier
- excludeds Sequence[str]
- A list of targets to exclude from the target group
- identifier str
- The unique identifier of the feature flag target group.
- includeds Sequence[str]
- A list of targets to include in the target group
- name str
- The name of the feature flag target group.
- org_
id str - Organization Identifier
- project_
id str - Project Identifier
- rules
Sequence[Feature
Flag Target Group Rule Args] - The list of rules used to include targets in the target group.
- account
Id String - Account Identifier
- environment String
- Environment Identifier
- excludeds List<String>
- A list of targets to exclude from the target group
- identifier String
- The unique identifier of the feature flag target group.
- includeds List<String>
- A list of targets to include in the target group
- name String
- The name of the feature flag target group.
- org
Id String - Organization Identifier
- project
Id String - Project Identifier
- rules List<Property Map>
- The list of rules used to include targets in the target group.
Supporting Types
FeatureFlagTargetGroupRule, FeatureFlagTargetGroupRuleArgs
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harness
Terraform Provider.