Viewing docs for cloudfoundry 1.19.0
published on Friday, Nov 13, 2026 by cloudfoundry
published on Friday, Nov 13, 2026 by cloudfoundry
cloudfoundry
Viewing docs for cloudfoundry 1.19.0
published on Friday, Nov 13, 2026 by cloudfoundry
published on Friday, Nov 13, 2026 by cloudfoundry
Gets information on Cloud Foundry users with a given username. Note: This datasource pulls data from the CF API and does not pull data from UAA. Currently it serves as the datasource for both user and user_cf resource.
Example Usage
import * as pulumi from "@pulumi/pulumi";
import * as cloudfoundry from "@pulumi/cloudfoundry";
const myUser = cloudfoundry.getUser({
name: "test123@example.com",
});
export const labels = myUser.then(myUser => myUser.users?.[0]?.labels?.enviroment);
import pulumi
import pulumi_cloudfoundry as cloudfoundry
my_user = cloudfoundry.get_user(name="test123@example.com")
pulumi.export("labels", my_user.users[0].labels["enviroment"])
package main
import (
"github.com/pulumi/pulumi-terraform-provider/sdks/go/cloudfoundry/cloudfoundry"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
myUser, err := cloudfoundry.LookupUser(ctx, &cloudfoundry.LookupUserArgs{
Name: "test123@example.com",
}, nil)
if err != nil {
return err
}
ctx.Export("labels", myUser.Users[0].Labels.Enviroment)
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Cloudfoundry = Pulumi.Cloudfoundry;
return await Deployment.RunAsync(() =>
{
var myUser = Cloudfoundry.GetUser.Invoke(new()
{
Name = "test123@example.com",
});
return new Dictionary<string, object?>
{
["labels"] = myUser.Apply(getUserResult => getUserResult.Users[0]?.Labels?.Enviroment),
};
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.cloudfoundry.CloudfoundryFunctions;
import com.pulumi.cloudfoundry.inputs.GetUserArgs;
import java.util.List;
import java.util.ArrayList;
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) {
final var myUser = CloudfoundryFunctions.getUser(GetUserArgs.builder()
.name("test123@example.com")
.build());
ctx.export("labels", myUser.users()[0].labels().enviroment());
}
}
variables:
myUser:
fn::invoke:
function: cloudfoundry:getUser
arguments:
name: test123@example.com
outputs:
labels: ${myUser.users[0].labels.enviroment}
Example coming soon!
Using getUser
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 getUser(args: GetUserArgs, opts?: InvokeOptions): Promise<GetUserResult>
function getUserOutput(args: GetUserOutputArgs, opts?: InvokeOutputOptions): Output<GetUserResult>def get_user(name: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetUserResult
def get_user_output(name: pulumi.Input[Optional[str]] = None,
opts: Optional[InvokeOutputOptions] = None) -> Output[GetUserResult]func LookupUser(ctx *Context, args *LookupUserArgs, opts ...InvokeOption) (*LookupUserResult, error)
func LookupUserOutput(ctx *Context, args *LookupUserOutputArgs, opts ...InvokeOption) LookupUserResultOutput> Note: This function is named LookupUser in the Go SDK.
public static class GetUser
{
public static Task<GetUserResult> InvokeAsync(GetUserArgs args, InvokeOptions? opts = null)
public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOptions? opts = null)
public static Output<GetUserResult> Invoke(GetUserInvokeArgs args, InvokeOutputOptions opts)
}public static CompletableFuture<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOptions options)
public static Output<GetUserResult> getUser(GetUserArgs args, InvokeOutputOptions options)
fn::invoke:
function: cloudfoundry:index/getUser:getUser
arguments:
# arguments dictionarydata "cloudfoundry_get_user" "name" {
# arguments
}The following arguments are supported:
- Name string
- The name of the user to look up
- Name string
- The name of the user to look up
- name string
- The name of the user to look up
- name String
- The name of the user to look up
- name string
- The name of the user to look up
- name str
- The name of the user to look up
- name String
- The name of the user to look up
getUser Result
The following output properties are available:
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the user to look up
- Users
List<Get
User User> - The list of users containing the given username.
- Id string
- The provider-assigned unique ID for this managed resource.
- Name string
- The name of the user to look up
- Users
[]Get
User User - The list of users containing the given username.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the user to look up
- users list(object)
- The list of users containing the given username.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the user to look up
- users
List<Get
User User> - The list of users containing the given username.
- id string
- The provider-assigned unique ID for this managed resource.
- name string
- The name of the user to look up
- users
Get
User User[] - The list of users containing the given username.
- id str
- The provider-assigned unique ID for this managed resource.
- name str
- The name of the user to look up
- users
Sequence[Get
User User] - The list of users containing the given username.
- id String
- The provider-assigned unique ID for this managed resource.
- name String
- The name of the user to look up
- users List<Property Map>
- The list of users containing the given username.
Supporting Types
GetUserUser
- Annotations Dictionary<string, string>
- The annotations associated with Cloud Foundry resources.
- Created
At string - The date and time when the resource was created in RFC3339 format.
- Id string
- The GUID of the object.
- Labels Dictionary<string, string>
- The labels associated with Cloud Foundry resources.
- Origin string
- The identity provider for the UAA user; will be null for UAA clients
- Presentation
Name string - The name displayed for the user; for UAA users, this is the same as the username. For UAA clients, this is the UAA client ID
- Updated
At string - The date and time when the resource was updated in RFC3339 format.
- Username string
- The name registered in UAA; will be null for UAA clients and non-UAA users
- Annotations map[string]string
- The annotations associated with Cloud Foundry resources.
- Created
At string - The date and time when the resource was created in RFC3339 format.
- Id string
- The GUID of the object.
- Labels map[string]string
- The labels associated with Cloud Foundry resources.
- Origin string
- The identity provider for the UAA user; will be null for UAA clients
- Presentation
Name string - The name displayed for the user; for UAA users, this is the same as the username. For UAA clients, this is the UAA client ID
- Updated
At string - The date and time when the resource was updated in RFC3339 format.
- Username string
- The name registered in UAA; will be null for UAA clients and non-UAA users
- annotations map(string)
- The annotations associated with Cloud Foundry resources.
- created_
at string - The date and time when the resource was created in RFC3339 format.
- id string
- The GUID of the object.
- labels map(string)
- The labels associated with Cloud Foundry resources.
- origin string
- The identity provider for the UAA user; will be null for UAA clients
- presentation_
name string - The name displayed for the user; for UAA users, this is the same as the username. For UAA clients, this is the UAA client ID
- updated_
at string - The date and time when the resource was updated in RFC3339 format.
- username string
- The name registered in UAA; will be null for UAA clients and non-UAA users
- annotations Map<String,String>
- The annotations associated with Cloud Foundry resources.
- created
At String - The date and time when the resource was created in RFC3339 format.
- id String
- The GUID of the object.
- labels Map<String,String>
- The labels associated with Cloud Foundry resources.
- origin String
- The identity provider for the UAA user; will be null for UAA clients
- presentation
Name String - The name displayed for the user; for UAA users, this is the same as the username. For UAA clients, this is the UAA client ID
- updated
At String - The date and time when the resource was updated in RFC3339 format.
- username String
- The name registered in UAA; will be null for UAA clients and non-UAA users
- annotations {[key: string]: string}
- The annotations associated with Cloud Foundry resources.
- created
At string - The date and time when the resource was created in RFC3339 format.
- id string
- The GUID of the object.
- labels {[key: string]: string}
- The labels associated with Cloud Foundry resources.
- origin string
- The identity provider for the UAA user; will be null for UAA clients
- presentation
Name string - The name displayed for the user; for UAA users, this is the same as the username. For UAA clients, this is the UAA client ID
- updated
At string - The date and time when the resource was updated in RFC3339 format.
- username string
- The name registered in UAA; will be null for UAA clients and non-UAA users
- annotations Mapping[str, str]
- The annotations associated with Cloud Foundry resources.
- created_
at str - The date and time when the resource was created in RFC3339 format.
- id str
- The GUID of the object.
- labels Mapping[str, str]
- The labels associated with Cloud Foundry resources.
- origin str
- The identity provider for the UAA user; will be null for UAA clients
- presentation_
name str - The name displayed for the user; for UAA users, this is the same as the username. For UAA clients, this is the UAA client ID
- updated_
at str - The date and time when the resource was updated in RFC3339 format.
- username str
- The name registered in UAA; will be null for UAA clients and non-UAA users
- annotations Map<String>
- The annotations associated with Cloud Foundry resources.
- created
At String - The date and time when the resource was created in RFC3339 format.
- id String
- The GUID of the object.
- labels Map<String>
- The labels associated with Cloud Foundry resources.
- origin String
- The identity provider for the UAA user; will be null for UAA clients
- presentation
Name String - The name displayed for the user; for UAA users, this is the same as the username. For UAA clients, this is the UAA client ID
- updated
At String - The date and time when the resource was updated in RFC3339 format.
- username String
- The name registered in UAA; will be null for UAA clients and non-UAA users
Package Details
- Repository
- cloudfoundry cloudfoundry/terraform-provider-cloudfoundry
- License
- Notes
- This Pulumi package is based on the
cloudfoundryTerraform Provider.
cloudfoundry
Viewing docs for cloudfoundry 1.19.0
published on Friday, Nov 13, 2026 by cloudfoundry
published on Friday, Nov 13, 2026 by cloudfoundry