published on Thursday, May 28, 2026 by Pulumi
published on Thursday, May 28, 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:
- Definition
Json string - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- Definition
Json string - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- definition_
json string - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- definition
Json String - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- definition
Json string - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- definition_
json str - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- definition
Json String - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
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) -> EnvironmentAssociationfunc 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.
- Definition
Json string - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- Definition
Json string - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- definition_
json string - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- definition
Json String - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- definition
Json string - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- definition_
json str - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
- definition
Json String - JSON body for
RuleBasedSegmentDefinitionin this environment. AfterEnableInEnvironment, this is applied via update. Semantically equivalent JSON (e.g. different key order fromjsonencodevs 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).
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
published on Thursday, May 28, 2026 by Pulumi