Viewing docs for Harness v0.13.1
published on Thursday, May 28, 2026 by Pulumi
published on Thursday, May 28, 2026 by Pulumi
Viewing docs for Harness v0.13.1
published on Thursday, May 28, 2026 by Pulumi
published on Thursday, May 28, 2026 by Pulumi
Look up a Harness FME (Split) environment by name within the workspace for a Harness organization and project. The provider resolves the workspace ID from orgId and projectId on each read.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as harness from "@pulumi/harness";
// Look up a Split environment by name within the FME workspace for a Harness org and project.
const production = harness.fme.getEnvironment({
orgId: "organization_id",
projectId: "project_id",
name: "Production",
});
import pulumi
import pulumi_harness as harness
# Look up a Split environment by name within the FME workspace for a Harness org and project.
production = harness.fme.get_environment(org_id="organization_id",
project_id="project_id",
name="Production")
package main
import (
"github.com/pulumi/pulumi-harness/sdk/go/harness/fme"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
// Look up a Split environment by name within the FME workspace for a Harness org and project.
_, err := fme.GetEnvironment(ctx, &fme.GetEnvironmentArgs{
OrgId: "organization_id",
ProjectId: "project_id",
Name: "Production",
}, nil)
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Harness = Pulumi.Harness;
return await Deployment.RunAsync(() =>
{
// Look up a Split environment by name within the FME workspace for a Harness org and project.
var production = Harness.Fme.GetEnvironment.Invoke(new()
{
OrgId = "organization_id",
ProjectId = "project_id",
Name = "Production",
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.harness.fme.FmeFunctions;
import com.pulumi.harness.fme.inputs.GetEnvironmentArgs;
import java.util.ArrayList;
import java.util.Arrays;
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) {
// Look up a Split environment by name within the FME workspace for a Harness org and project.
final var production = FmeFunctions.getEnvironment(GetEnvironmentArgs.builder()
.orgId("organization_id")
.projectId("project_id")
.name("Production")
.build());
}
}
variables:
# Look up a Split environment by name within the FME workspace for a Harness org and project.
production:
fn::invoke:
function: harness:fme:getEnvironment
arguments:
orgId: organization_id
projectId: project_id
name: Production
pulumi {
required_providers {
harness = {
source = "pulumi/harness"
}
}
}
data "harness_fme_getenvironment" "production" {
org_id = "organization_id"
project_id = "project_id"
name = "Production"
}
# Look up a Split environment by name within the FME workspace for a Harness org and project.
Using getEnvironment
Two invocation forms are available. The direct form accepts plain arguments and either blocks until the result value is available, or returns a Promise-wrapped result. The output form accepts Input-wrapped arguments and returns an Output-wrapped result.
function getEnvironment(args: GetEnvironmentArgs, opts?: InvokeOptions): Promise<GetEnvironmentResult>
function getEnvironmentOutput(args: GetEnvironmentOutputArgs, opts?: InvokeOptions): Output<GetEnvironmentResult>def get_environment(name: Optional[str] = None,
org_id: Optional[str] = None,
project_id: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEnvironmentResult
def get_environment_output(name: pulumi.Input[Optional[str]] = None,
org_id: pulumi.Input[Optional[str]] = None,
project_id: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentResult]func GetEnvironment(ctx *Context, args *GetEnvironmentArgs, opts ...InvokeOption) (*GetEnvironmentResult, error)
func GetEnvironmentOutput(ctx *Context, args *GetEnvironmentOutputArgs, opts ...InvokeOption) GetEnvironmentResultOutput> Note: This function is named GetEnvironment in the Go SDK.
public static class GetEnvironment
{
public static Task<GetEnvironmentResult> InvokeAsync(GetEnvironmentArgs args, InvokeOptions? opts = null)
public static Output<GetEnvironmentResult> Invoke(GetEnvironmentInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
public static Output<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
fn::invoke:
function: harness:fme/getEnvironment:getEnvironment
arguments:
# arguments dictionarydata "harness_fme_getenvironment" "name" {
# arguments
}The following arguments are supported:
- name string
- Name of the Split environment in the workspace (e.g.
Production). - org_
id string - Harness organization identifier.
- project_
id string - Harness project identifier.
- name str
- Name of the Split environment in the workspace (e.g.
Production). - org_
id str - Harness organization identifier.
- project_
id str - Harness project identifier.
getEnvironment Result
The following output properties are available:
- Environment
Id string - The Split environment ID (same as
id). - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the Split environment in the workspace (e.g.
Production). - Org
Id string - Harness organization identifier.
- Production bool
- Whether this is a production environment in Split.
- Project
Id string - Harness project identifier.
- Environment
Id string - The Split environment ID (same as
id). - Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- Name of the Split environment in the workspace (e.g.
Production). - Org
Id string - Harness organization identifier.
- Production bool
- Whether this is a production environment in Split.
- Project
Id string - Harness project identifier.
- environment_
id string - The Split environment ID (same as
id). - id string
- The provider-assigned unique ID for this managed resource.
- name string
- Name of the Split environment in the workspace (e.g.
Production). - org_
id string - Harness organization identifier.
- production bool
- Whether this is a production environment in Split.
- project_
id string - Harness project identifier.
- environment
Id String - The Split environment ID (same as
id). - id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the Split environment in the workspace (e.g.
Production). - org
Id String - Harness organization identifier.
- production Boolean
- Whether this is a production environment in Split.
- project
Id String - Harness project identifier.
- environment
Id string - The Split environment ID (same as
id). - id string
- The provider-assigned unique ID for this managed resource.
- name string
- Name of the Split environment in the workspace (e.g.
Production). - org
Id string - Harness organization identifier.
- production boolean
- Whether this is a production environment in Split.
- project
Id string - Harness project identifier.
- environment_
id str - The Split environment ID (same as
id). - id str
- The provider-assigned unique ID for this managed resource.
- name str
- Name of the Split environment in the workspace (e.g.
Production). - org_
id str - Harness organization identifier.
- production bool
- Whether this is a production environment in Split.
- project_
id str - Harness project identifier.
- environment
Id String - The Split environment ID (same as
id). - id String
- The provider-assigned unique ID for this managed resource.
- name String
- Name of the Split environment in the workspace (e.g.
Production). - org
Id String - Harness organization identifier.
- production Boolean
- Whether this is a production environment in Split.
- project
Id String - Harness project identifier.
Package Details
- Repository
- harness pulumi/pulumi-harness
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
harnessTerraform Provider.
Viewing docs for Harness v0.13.1
published on Thursday, May 28, 2026 by Pulumi
published on Thursday, May 28, 2026 by Pulumi