zitadel v0.2.0 published on Monday, Mar 24, 2025 by pulumiverse
zitadel.getProjectRole
Start a Neo task
Explain and create a zitadel.getProjectRole resource
Datasource representing the project roles, which can be given as authorizations to users.
Example Usage
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Zitadel = Pulumi.Zitadel;
return await Deployment.RunAsync(() =>
{
var @default = Zitadel.GetProjectRole.Invoke(new()
{
OrgId = defaultZitadelOrg.Id,
ProjectId = defaultZitadelProject.Id,
RoleKey = "key",
});
return new Dictionary<string, object?>
{
["projectRole"] = @default,
};
});
package main
import (
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
"github.com/pulumiverse/pulumi-zitadel/sdk/go/zitadel"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
_default, err := zitadel.LookupProjectRole(ctx, &zitadel.LookupProjectRoleArgs{
OrgId: defaultZitadelOrg.Id,
ProjectId: defaultZitadelProject.Id,
RoleKey: "key",
}, nil)
if err != nil {
return err
}
ctx.Export("projectRole", _default)
return nil
})
}
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.zitadel.ZitadelFunctions;
import com.pulumi.zitadel.inputs.GetProjectRoleArgs;
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 default = ZitadelFunctions.getProjectRole(GetProjectRoleArgs.builder()
.orgId(defaultZitadelOrg.id())
.projectId(defaultZitadelProject.id())
.roleKey("key")
.build());
ctx.export("projectRole", default_);
}
}
import * as pulumi from "@pulumi/pulumi";
import * as zitadel from "@pulumi/zitadel";
const default = zitadel.getProjectRole({
orgId: defaultZitadelOrg.id,
projectId: defaultZitadelProject.id,
roleKey: "key",
});
export const projectRole = _default;
import pulumi
import pulumi_zitadel as zitadel
default = zitadel.get_project_role(org_id=default_zitadel_org["id"],
project_id=default_zitadel_project["id"],
role_key="key")
pulumi.export("projectRole", default)
variables:
default:
fn::invoke:
Function: zitadel:getProjectRole
Arguments:
orgId: ${defaultZitadelOrg.id}
projectId: ${defaultZitadelProject.id}
roleKey: key
outputs:
projectRole: ${default}
Using getProjectRole
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 getProjectRole(args: GetProjectRoleArgs, opts?: InvokeOptions): Promise<GetProjectRoleResult>
function getProjectRoleOutput(args: GetProjectRoleOutputArgs, opts?: InvokeOptions): Output<GetProjectRoleResult>def get_project_role(org_id: Optional[str] = None,
project_id: Optional[str] = None,
role_key: Optional[str] = None,
opts: Optional[InvokeOptions] = None) -> GetProjectRoleResult
def get_project_role_output(org_id: Optional[pulumi.Input[str]] = None,
project_id: Optional[pulumi.Input[str]] = None,
role_key: Optional[pulumi.Input[str]] = None,
opts: Optional[InvokeOptions] = None) -> Output[GetProjectRoleResult]func LookupProjectRole(ctx *Context, args *LookupProjectRoleArgs, opts ...InvokeOption) (*LookupProjectRoleResult, error)
func LookupProjectRoleOutput(ctx *Context, args *LookupProjectRoleOutputArgs, opts ...InvokeOption) LookupProjectRoleResultOutput> Note: This function is named LookupProjectRole in the Go SDK.
public static class GetProjectRole
{
public static Task<GetProjectRoleResult> InvokeAsync(GetProjectRoleArgs args, InvokeOptions? opts = null)
public static Output<GetProjectRoleResult> Invoke(GetProjectRoleInvokeArgs args, InvokeOptions? opts = null)
}public static CompletableFuture<GetProjectRoleResult> getProjectRole(GetProjectRoleArgs args, InvokeOptions options)
public static Output<GetProjectRoleResult> getProjectRole(GetProjectRoleArgs args, InvokeOptions options)
fn::invoke:
function: zitadel:index/getProjectRole:getProjectRole
arguments:
# arguments dictionaryThe following arguments are supported:
- org_
id str - ID of the organization
- project_
id str - ID of the project
- role_
key str - Key used for project role
getProjectRole Result
The following output properties are available:
- display_
name str - Name used for project role
- group str
- Group used for project role
- id str
- The provider-assigned unique ID for this managed resource.
- org_
id str - ID of the organization
- project_
id str - ID of the project
- role_
key str - Key used for project role
Package Details
- Repository
- zitadel pulumiverse/pulumi-zitadel
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
zitadelTerraform Provider.
