This provider is currently in preview.
published on Monday, May 11, 2026 by Pulumi
This provider is currently in preview.
published on Monday, May 11, 2026 by Pulumi
Looks up an existing ESC environment by name and returns its UUID. Use this to scope a custom RBAC role to a specific environment — pass the returned UUID into buildEnvironmentScopedPermissions, or use it as the identity field of a hand-rolled PermissionLiteralExpressionEnvironment in OrganizationRole.permissions. 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: pulumi.Input[Optional[str]] = None,
organization_name: pulumi.Input[Optional[str]] = None,
project_name: pulumi.Input[Optional[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 dictionarydata "pulumiservice_getenvironment" "name" {
# arguments
}The 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 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. Pass it to
buildEnvironmentScopedPermissions(preferred) or use it as theidentityfield of a hand-rolledPermissionLiteralExpressionEnvironmentinOrganizationRole.permissions. - 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. Pass it to
buildEnvironmentScopedPermissions(preferred) or use it as theidentityfield of a hand-rolledPermissionLiteralExpressionEnvironmentinOrganizationRole.permissions. - 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. Pass it to
buildEnvironmentScopedPermissions(preferred) or use it as theidentityfield of a hand-rolledPermissionLiteralExpressionEnvironmentinOrganizationRole.permissions. - 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. Pass it to
buildEnvironmentScopedPermissions(preferred) or use it as theidentityfield of a hand-rolledPermissionLiteralExpressionEnvironmentinOrganizationRole.permissions. - 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. Pass it to
buildEnvironmentScopedPermissions(preferred) or use it as theidentityfield of a hand-rolledPermissionLiteralExpressionEnvironmentinOrganizationRole.permissions. - 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. Pass it to
buildEnvironmentScopedPermissions(preferred) or use it as theidentityfield of a hand-rolledPermissionLiteralExpressionEnvironmentinOrganizationRole.permissions. - 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. Pass it to
buildEnvironmentScopedPermissions(preferred) or use it as theidentityfield of a hand-rolledPermissionLiteralExpressionEnvironmentinOrganizationRole.permissions. - 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 Monday, May 11, 2026 by Pulumi
