1. Packages
  2. Harness Provider
  3. API Docs
  4. getEnvironment
Harness v0.7.2 published on Tuesday, Apr 15, 2025 by Pulumi

harness.getEnvironment

Explore with Pulumi AI

Harness v0.7.2 published on Tuesday, Apr 15, 2025 by Pulumi

Data source for retrieving a Harness service

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>
Copy
def get_environment(app_id: Optional[str] = None,
                    environment_id: Optional[str] = None,
                    name: Optional[str] = None,
                    variable_overrides: Optional[Sequence[GetEnvironmentVariableOverride]] = None,
                    opts: Optional[InvokeOptions] = None) -> GetEnvironmentResult
def get_environment_output(app_id: Optional[pulumi.Input[str]] = None,
                    environment_id: Optional[pulumi.Input[str]] = None,
                    name: Optional[pulumi.Input[str]] = None,
                    variable_overrides: Optional[pulumi.Input[Sequence[pulumi.Input[GetEnvironmentVariableOverrideArgs]]]] = None,
                    opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentResult]
Copy
func LookupEnvironment(ctx *Context, args *LookupEnvironmentArgs, opts ...InvokeOption) (*LookupEnvironmentResult, error)
func LookupEnvironmentOutput(ctx *Context, args *LookupEnvironmentOutputArgs, opts ...InvokeOption) LookupEnvironmentResultOutput
Copy

> Note: This function is named LookupEnvironment 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)
}
Copy
public static CompletableFuture<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
public static Output<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
Copy
fn::invoke:
  function: harness:index/getEnvironment:getEnvironment
  arguments:
    # arguments dictionary
Copy

The following arguments are supported:

AppId This property is required. string
The id of the application.
EnvironmentId string
The id of the environment.
Name string
The name of the environment.
VariableOverrides List<GetEnvironmentVariableOverride>
Override for a service variable
AppId This property is required. string
The id of the application.
EnvironmentId string
The id of the environment.
Name string
The name of the environment.
VariableOverrides []GetEnvironmentVariableOverride
Override for a service variable
appId This property is required. String
The id of the application.
environmentId String
The id of the environment.
name String
The name of the environment.
variableOverrides List<GetEnvironmentVariableOverride>
Override for a service variable
appId This property is required. string
The id of the application.
environmentId string
The id of the environment.
name string
The name of the environment.
variableOverrides GetEnvironmentVariableOverride[]
Override for a service variable
app_id This property is required. str
The id of the application.
environment_id str
The id of the environment.
name str
The name of the environment.
variable_overrides Sequence[GetEnvironmentVariableOverride]
Override for a service variable
appId This property is required. String
The id of the application.
environmentId String
The id of the environment.
name String
The name of the environment.
variableOverrides List<Property Map>
Override for a service variable

getEnvironment Result

The following output properties are available:

AppId string
The id of the application.
Description string
The description of the environment.
Id string
The id of the environment.
Type string
The type of the environment. Valid values are PROD and NON_PROD
VariableOverrides List<GetEnvironmentVariableOverride>
Override for a service variable
EnvironmentId string
The id of the environment.
Name string
The name of the environment.
AppId string
The id of the application.
Description string
The description of the environment.
Id string
The id of the environment.
Type string
The type of the environment. Valid values are PROD and NON_PROD
VariableOverrides []GetEnvironmentVariableOverride
Override for a service variable
EnvironmentId string
The id of the environment.
Name string
The name of the environment.
appId String
The id of the application.
description String
The description of the environment.
id String
The id of the environment.
type String
The type of the environment. Valid values are PROD and NON_PROD
variableOverrides List<GetEnvironmentVariableOverride>
Override for a service variable
environmentId String
The id of the environment.
name String
The name of the environment.
appId string
The id of the application.
description string
The description of the environment.
id string
The id of the environment.
type string
The type of the environment. Valid values are PROD and NON_PROD
variableOverrides GetEnvironmentVariableOverride[]
Override for a service variable
environmentId string
The id of the environment.
name string
The name of the environment.
app_id str
The id of the application.
description str
The description of the environment.
id str
The id of the environment.
type str
The type of the environment. Valid values are PROD and NON_PROD
variable_overrides Sequence[GetEnvironmentVariableOverride]
Override for a service variable
environment_id str
The id of the environment.
name str
The name of the environment.
appId String
The id of the application.
description String
The description of the environment.
id String
The id of the environment.
type String
The type of the environment. Valid values are PROD and NON_PROD
variableOverrides List<Property Map>
Override for a service variable
environmentId String
The id of the environment.
name String
The name of the environment.

Supporting Types

GetEnvironmentVariableOverride

Name This property is required. string
The name of the variable
ServiceName This property is required. string
The name of the service
Type This property is required. string
The type of the service variable. Valid values are TEXT and ENCRYPTED_TEXT
Value This property is required. string
The value of the service variable
Name This property is required. string
The name of the variable
ServiceName This property is required. string
The name of the service
Type This property is required. string
The type of the service variable. Valid values are TEXT and ENCRYPTED_TEXT
Value This property is required. string
The value of the service variable
name This property is required. String
The name of the variable
serviceName This property is required. String
The name of the service
type This property is required. String
The type of the service variable. Valid values are TEXT and ENCRYPTED_TEXT
value This property is required. String
The value of the service variable
name This property is required. string
The name of the variable
serviceName This property is required. string
The name of the service
type This property is required. string
The type of the service variable. Valid values are TEXT and ENCRYPTED_TEXT
value This property is required. string
The value of the service variable
name This property is required. str
The name of the variable
service_name This property is required. str
The name of the service
type This property is required. str
The type of the service variable. Valid values are TEXT and ENCRYPTED_TEXT
value This property is required. str
The value of the service variable
name This property is required. String
The name of the variable
serviceName This property is required. String
The name of the service
type This property is required. String
The type of the service variable. Valid values are TEXT and ENCRYPTED_TEXT
value This property is required. String
The value of the service variable

Package Details

Repository
harness pulumi/pulumi-harness
License
Apache-2.0
Notes
This Pulumi package is based on the harness Terraform Provider.
Harness v0.7.2 published on Tuesday, Apr 15, 2025 by Pulumi