1. Packages
  2. Packages
  3. Harness Provider
  4. API Docs
  5. fmeRuleBasedSegment
  6. EnvironmentAssociation
Viewing docs for Harness v0.12.1
published on Thursday, May 21, 2026 by Pulumi
harness logo
Viewing docs for Harness v0.12.1
published on Thursday, May 21, 2026 by Pulumi

    Enable a workspace rule-based segment in an FME environment and manage its RuleBasedSegmentDefinition JSON. The segment must exist (harness.fmeRuleBasedSegment.FmeRuleBasedSegment). Import id format: org_id/project_id/environment_id/segment_name.

    Create EnvironmentAssociation Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new EnvironmentAssociation(name: string, args: EnvironmentAssociationArgs, opts?: CustomResourceOptions);
    @overload
    def EnvironmentAssociation(resource_name: str,
                               args: EnvironmentAssociationArgs,
                               opts: Optional[ResourceOptions] = None)
    
    @overload
    def EnvironmentAssociation(resource_name: str,
                               opts: Optional[ResourceOptions] = None,
                               definition_json: Optional[str] = None,
                               environment_id: Optional[str] = None,
                               org_id: Optional[str] = None,
                               project_id: Optional[str] = None,
                               segment_name: Optional[str] = None)
    func NewEnvironmentAssociation(ctx *Context, name string, args EnvironmentAssociationArgs, opts ...ResourceOption) (*EnvironmentAssociation, error)
    public EnvironmentAssociation(string name, EnvironmentAssociationArgs args, CustomResourceOptions? opts = null)
    public EnvironmentAssociation(String name, EnvironmentAssociationArgs args)
    public EnvironmentAssociation(String name, EnvironmentAssociationArgs args, CustomResourceOptions options)
    
    type: harness:fmeRuleBasedSegment:EnvironmentAssociation
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    
    resource "harness_fmerulebasedsegment_environmentassociation" "name" {
        # resource properties
    }

    Parameters

    name string
    The unique name of the resource.
    args EnvironmentAssociationArgs
    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 EnvironmentAssociationArgs
    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 EnvironmentAssociationArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args EnvironmentAssociationArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args EnvironmentAssociationArgs
    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 harnessEnvironmentAssociationResource = new Harness.FmeRuleBasedSegment.EnvironmentAssociation("harnessEnvironmentAssociationResource", new()
    {
        DefinitionJson = "string",
        EnvironmentId = "string",
        OrgId = "string",
        ProjectId = "string",
        SegmentName = "string",
    });
    
    example, err := fmerulebasedsegment.NewEnvironmentAssociation(ctx, "harnessEnvironmentAssociationResource", &fmerulebasedsegment.EnvironmentAssociationArgs{
    	DefinitionJson: pulumi.String("string"),
    	EnvironmentId:  pulumi.String("string"),
    	OrgId:          pulumi.String("string"),
    	ProjectId:      pulumi.String("string"),
    	SegmentName:    pulumi.String("string"),
    })
    
    resource "harness_fmerulebasedsegment_environmentassociation" "harnessEnvironmentAssociationResource" {
      definition_json = "string"
      environment_id  = "string"
      org_id          = "string"
      project_id      = "string"
      segment_name    = "string"
    }
    
    var harnessEnvironmentAssociationResource = new com.pulumi.harness.fmeRuleBasedSegment.EnvironmentAssociation("harnessEnvironmentAssociationResource", com.pulumi.harness.fmeRuleBasedSegment.EnvironmentAssociationArgs.builder()
        .definitionJson("string")
        .environmentId("string")
        .orgId("string")
        .projectId("string")
        .segmentName("string")
        .build());
    
    harness_environment_association_resource = harness.fmerulebasedsegment.EnvironmentAssociation("harnessEnvironmentAssociationResource",
        definition_json="string",
        environment_id="string",
        org_id="string",
        project_id="string",
        segment_name="string")
    
    const harnessEnvironmentAssociationResource = new harness.fmerulebasedsegment.EnvironmentAssociation("harnessEnvironmentAssociationResource", {
        definitionJson: "string",
        environmentId: "string",
        orgId: "string",
        projectId: "string",
        segmentName: "string",
    });
    
    type: harness:fmeRuleBasedSegment:EnvironmentAssociation
    properties:
        definitionJson: string
        environmentId: string
        orgId: string
        projectId: string
        segmentName: string
    

    EnvironmentAssociation 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 EnvironmentAssociation resource accepts the following input properties:

    DefinitionJson string
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    EnvironmentId string
    Split environment ID.
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    SegmentName string
    Rule-based segment name (must match an existing workspace segment).
    DefinitionJson string
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    EnvironmentId string
    Split environment ID.
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    SegmentName string
    Rule-based segment name (must match an existing workspace segment).
    definition_json string
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    environment_id string
    Split environment ID.
    org_id string
    Harness organization identifier.
    project_id string
    Harness project identifier.
    segment_name string
    Rule-based segment name (must match an existing workspace segment).
    definitionJson String
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    environmentId String
    Split environment ID.
    orgId String
    Harness organization identifier.
    projectId String
    Harness project identifier.
    segmentName String
    Rule-based segment name (must match an existing workspace segment).
    definitionJson string
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    environmentId string
    Split environment ID.
    orgId string
    Harness organization identifier.
    projectId string
    Harness project identifier.
    segmentName string
    Rule-based segment name (must match an existing workspace segment).
    definition_json str
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    environment_id str
    Split environment ID.
    org_id str
    Harness organization identifier.
    project_id str
    Harness project identifier.
    segment_name str
    Rule-based segment name (must match an existing workspace segment).
    definitionJson String
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    environmentId String
    Split environment ID.
    orgId String
    Harness organization identifier.
    projectId String
    Harness project identifier.
    segmentName String
    Rule-based segment name (must match an existing workspace segment).

    Outputs

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

    Get an existing EnvironmentAssociation 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?: EnvironmentAssociationState, opts?: CustomResourceOptions): EnvironmentAssociation
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            definition_json: Optional[str] = None,
            environment_id: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            segment_name: Optional[str] = None) -> EnvironmentAssociation
    func GetEnvironmentAssociation(ctx *Context, name string, id IDInput, state *EnvironmentAssociationState, opts ...ResourceOption) (*EnvironmentAssociation, error)
    public static EnvironmentAssociation Get(string name, Input<string> id, EnvironmentAssociationState? state, CustomResourceOptions? opts = null)
    public static EnvironmentAssociation get(String name, Output<String> id, EnvironmentAssociationState state, CustomResourceOptions options)
    resources:  _:    type: harness:fmeRuleBasedSegment:EnvironmentAssociation    get:      id: ${id}
    import {
      to = harness_fmerulebasedsegment_environmentassociation.example
      id = "${id}"
    }
    
    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:
    DefinitionJson string
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    EnvironmentId string
    Split environment ID.
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    SegmentName string
    Rule-based segment name (must match an existing workspace segment).
    DefinitionJson string
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    EnvironmentId string
    Split environment ID.
    OrgId string
    Harness organization identifier.
    ProjectId string
    Harness project identifier.
    SegmentName string
    Rule-based segment name (must match an existing workspace segment).
    definition_json string
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    environment_id string
    Split environment ID.
    org_id string
    Harness organization identifier.
    project_id string
    Harness project identifier.
    segment_name string
    Rule-based segment name (must match an existing workspace segment).
    definitionJson String
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    environmentId String
    Split environment ID.
    orgId String
    Harness organization identifier.
    projectId String
    Harness project identifier.
    segmentName String
    Rule-based segment name (must match an existing workspace segment).
    definitionJson string
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    environmentId string
    Split environment ID.
    orgId string
    Harness organization identifier.
    projectId string
    Harness project identifier.
    segmentName string
    Rule-based segment name (must match an existing workspace segment).
    definition_json str
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    environment_id str
    Split environment ID.
    org_id str
    Harness organization identifier.
    project_id str
    Harness project identifier.
    segment_name str
    Rule-based segment name (must match an existing workspace segment).
    definitionJson String
    JSON body for RuleBasedSegmentDefinition in this environment. After EnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order from jsonencode vs API refresh) is not treated as a diff.
    environmentId String
    Split environment ID.
    orgId String
    Harness organization identifier.
    projectId String
    Harness project identifier.
    segmentName String
    Rule-based segment name (must match an existing workspace segment).

    Package Details

    Repository
    harness pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Viewing docs for Harness v0.12.1
    published on Thursday, May 21, 2026 by Pulumi

      Try Pulumi Cloud free.
      Your team will thank you.

      Start free trial