This provider is currently in preview.
published on Tuesday, Apr 28, 2026 by Pulumi
This provider is currently in preview.
published on Tuesday, Apr 28, 2026 by Pulumi
Looks up an existing ESC environment by name and returns its UUID. Use this to pin a custom RBAC role to a specific environment via a literalEnvironment expression when the environment is not managed by the current Pulumi program. Errors when the environment is not found.
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,
organization_name: Optional[str] = None,
project_name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetEnvironmentResult
def get_environment_output(name: Optional[pulumi.Input[str]] = None,
organization_name: Optional[pulumi.Input[str]] = None,
project_name: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetEnvironmentResult]func LookupEnvironment(ctx *Context, args *LookupEnvironmentArgs, opts ...InvokeOption) (*LookupEnvironmentResult, error)
func LookupEnvironmentOutput(ctx *Context, args *LookupEnvironmentOutputArgs, opts ...InvokeOption) LookupEnvironmentResultOutput> 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)
}public static CompletableFuture<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
public static Output<GetEnvironmentResult> getEnvironment(GetEnvironmentArgs args, InvokeOptions options)
fn::invoke:
function: pulumiservice:getEnvironment
arguments:
# arguments dictionaryThe following arguments are supported:
- Name string
- The environment name.
- Organization
Name string - The Pulumi Cloud organization that owns the environment.
- Project
Name string - The ESC project name. Defaults to
default.
- Name string
- The environment name.
- Organization
Name string - The Pulumi Cloud organization that owns the environment.
- Project
Name string - The ESC project name. Defaults to
default.
- name String
- The environment name.
- organization
Name String - The Pulumi Cloud organization that owns the environment.
- project
Name String - The ESC project name. Defaults to
default.
- name string
- The environment name.
- organization
Name string - The Pulumi Cloud organization that owns the environment.
- project
Name string - The ESC project name. Defaults to
default.
- name str
- The environment name.
- organization_
name str - The Pulumi Cloud organization that owns the environment.
- project_
name str - The ESC project name. Defaults to
default.
- name String
- The environment name.
- organization
Name String - The Pulumi Cloud organization that owns the environment.
- project
Name String - The ESC project name. Defaults to
default.
getEnvironment Result
The following output properties are available:
- Environment
Id string - The environment's UUID. Use this as the
identityvalue when pinning a custom RBAC role to this environment via aliteralEnvironmentexpression. - Name string
- The environment name.
- Organization
Name string - The Pulumi Cloud organization that owns the environment.
- Project
Name string - The ESC project the environment lives in.
- Environment
Id string - The environment's UUID. Use this as the
identityvalue when pinning a custom RBAC role to this environment via aliteralEnvironmentexpression. - Name string
- The environment name.
- Organization
Name string - The Pulumi Cloud organization that owns the environment.
- Project
Name string - The ESC project the environment lives in.
- environment
Id String - The environment's UUID. Use this as the
identityvalue when pinning a custom RBAC role to this environment via aliteralEnvironmentexpression. - name String
- The environment name.
- organization
Name String - The Pulumi Cloud organization that owns the environment.
- project
Name String - The ESC project the environment lives in.
- environment
Id string - The environment's UUID. Use this as the
identityvalue when pinning a custom RBAC role to this environment via aliteralEnvironmentexpression. - name string
- The environment name.
- organization
Name string - The Pulumi Cloud organization that owns the environment.
- project
Name string - The ESC project the environment lives in.
- environment_
id str - The environment's UUID. Use this as the
identityvalue when pinning a custom RBAC role to this environment via aliteralEnvironmentexpression. - name str
- The environment name.
- organization_
name str - The Pulumi Cloud organization that owns the environment.
- project_
name str - The ESC project the environment lives in.
- environment
Id String - The environment's UUID. Use this as the
identityvalue when pinning a custom RBAC role to this environment via aliteralEnvironmentexpression. - name String
- The environment name.
- organization
Name String - The Pulumi Cloud organization that owns the environment.
- project
Name String - The ESC project the environment lives in.
Package Details
- Repository
- pulumiservice pulumi/pulumi-pulumiservice
- License
- Apache-2.0
This provider is currently in preview.
published on Tuesday, Apr 28, 2026 by Pulumi
