1. Packages
  2. Zitadel
  3. API Docs
  4. ProjectRole
zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse

zitadel.ProjectRole

Explore with Pulumi AI

zitadel logo
zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse

    Resource 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 = Pulumiverse.Zitadel;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Zitadel.ProjectRole("default", new()
        {
            OrgId = data.Zitadel_org.Default.Id,
            ProjectId = data.Zitadel_project.Default.Id,
            RoleKey = "super-user",
            DisplayName = "display_name2",
            Group = "role_group",
        });
    
    });
    
    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 {
    		_, err := zitadel.NewProjectRole(ctx, "default", &zitadel.ProjectRoleArgs{
    			OrgId:       pulumi.Any(data.Zitadel_org.Default.Id),
    			ProjectId:   pulumi.Any(data.Zitadel_project.Default.Id),
    			RoleKey:     pulumi.String("super-user"),
    			DisplayName: pulumi.String("display_name2"),
    			Group:       pulumi.String("role_group"),
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.zitadel.ProjectRole;
    import com.pulumi.zitadel.ProjectRoleArgs;
    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) {
            var default_ = new ProjectRole("default", ProjectRoleArgs.builder()        
                .orgId(data.zitadel_org().default().id())
                .projectId(data.zitadel_project().default().id())
                .roleKey("super-user")
                .displayName("display_name2")
                .group("role_group")
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_zitadel as zitadel
    
    default = zitadel.ProjectRole("default",
        org_id=data["zitadel_org"]["default"]["id"],
        project_id=data["zitadel_project"]["default"]["id"],
        role_key="super-user",
        display_name="display_name2",
        group="role_group")
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zitadel from "@pulumiverse/zitadel";
    
    const _default = new zitadel.ProjectRole("default", {
        orgId: data.zitadel_org["default"].id,
        projectId: data.zitadel_project["default"].id,
        roleKey: "super-user",
        displayName: "display_name2",
        group: "role_group",
    });
    
    resources:
      default:
        type: zitadel:ProjectRole
        properties:
          orgId: ${data.zitadel_org.default.id}
          projectId: ${data.zitadel_project.default.id}
          roleKey: super-user
          displayName: display_name2
          group: role_group
    

    Create ProjectRole Resource

    Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

    Constructor syntax

    new ProjectRole(name: string, args: ProjectRoleArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectRole(resource_name: str,
                    args: ProjectRoleArgs,
                    opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectRole(resource_name: str,
                    opts: Optional[ResourceOptions] = None,
                    display_name: Optional[str] = None,
                    project_id: Optional[str] = None,
                    role_key: Optional[str] = None,
                    group: Optional[str] = None,
                    org_id: Optional[str] = None)
    func NewProjectRole(ctx *Context, name string, args ProjectRoleArgs, opts ...ResourceOption) (*ProjectRole, error)
    public ProjectRole(string name, ProjectRoleArgs args, CustomResourceOptions? opts = null)
    public ProjectRole(String name, ProjectRoleArgs args)
    public ProjectRole(String name, ProjectRoleArgs args, CustomResourceOptions options)
    
    type: zitadel:ProjectRole
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args ProjectRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args ProjectRoleArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args ProjectRoleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectRoleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectRoleArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Example

    The following reference example uses placeholder values for all input properties.

    var projectRoleResource = new Zitadel.ProjectRole("projectRoleResource", new()
    {
        DisplayName = "string",
        ProjectId = "string",
        RoleKey = "string",
        Group = "string",
        OrgId = "string",
    });
    
    example, err := zitadel.NewProjectRole(ctx, "projectRoleResource", &zitadel.ProjectRoleArgs{
    	DisplayName: pulumi.String("string"),
    	ProjectId:   pulumi.String("string"),
    	RoleKey:     pulumi.String("string"),
    	Group:       pulumi.String("string"),
    	OrgId:       pulumi.String("string"),
    })
    
    var projectRoleResource = new ProjectRole("projectRoleResource", ProjectRoleArgs.builder()
        .displayName("string")
        .projectId("string")
        .roleKey("string")
        .group("string")
        .orgId("string")
        .build());
    
    project_role_resource = zitadel.ProjectRole("projectRoleResource",
        display_name="string",
        project_id="string",
        role_key="string",
        group="string",
        org_id="string")
    
    const projectRoleResource = new zitadel.ProjectRole("projectRoleResource", {
        displayName: "string",
        projectId: "string",
        roleKey: "string",
        group: "string",
        orgId: "string",
    });
    
    type: zitadel:ProjectRole
    properties:
        displayName: string
        group: string
        orgId: string
        projectId: string
        roleKey: string
    

    ProjectRole Resource Properties

    To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

    Inputs

    The ProjectRole resource accepts the following input properties:

    DisplayName string
    Name used for project role
    ProjectId string
    ID of the project
    RoleKey string
    Key used for project role
    Group string
    Group used for project role
    OrgId string
    ID of the organization
    DisplayName string
    Name used for project role
    ProjectId string
    ID of the project
    RoleKey string
    Key used for project role
    Group string
    Group used for project role
    OrgId string
    ID of the organization
    displayName String
    Name used for project role
    projectId String
    ID of the project
    roleKey String
    Key used for project role
    group String
    Group used for project role
    orgId String
    ID of the organization
    displayName string
    Name used for project role
    projectId string
    ID of the project
    roleKey string
    Key used for project role
    group string
    Group used for project role
    orgId string
    ID of the organization
    display_name str
    Name used for project role
    project_id str
    ID of the project
    role_key str
    Key used for project role
    group str
    Group used for project role
    org_id str
    ID of the organization
    displayName String
    Name used for project role
    projectId String
    ID of the project
    roleKey String
    Key used for project role
    group String
    Group used for project role
    orgId String
    ID of the organization

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ProjectRole resource produces the following output properties:

    Id string
    The provider-assigned unique ID for this managed resource.
    Id string
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.
    id string
    The provider-assigned unique ID for this managed resource.
    id str
    The provider-assigned unique ID for this managed resource.
    id String
    The provider-assigned unique ID for this managed resource.

    Look up Existing ProjectRole Resource

    Get an existing ProjectRole resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

    public static get(name: string, id: Input<ID>, state?: ProjectRoleState, opts?: CustomResourceOptions): ProjectRole
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            display_name: Optional[str] = None,
            group: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            role_key: Optional[str] = None) -> ProjectRole
    func GetProjectRole(ctx *Context, name string, id IDInput, state *ProjectRoleState, opts ...ResourceOption) (*ProjectRole, error)
    public static ProjectRole Get(string name, Input<string> id, ProjectRoleState? state, CustomResourceOptions? opts = null)
    public static ProjectRole get(String name, Output<String> id, ProjectRoleState state, CustomResourceOptions options)
    Resource lookup is not supported in YAML
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    resource_name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    name
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    state
    Any extra arguments used during the lookup.
    opts
    A bag of options that control this resource's behavior.
    The following state arguments are supported:
    DisplayName string
    Name used for project role
    Group string
    Group used for project role
    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    RoleKey string
    Key used for project role
    DisplayName string
    Name used for project role
    Group string
    Group used for project role
    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    RoleKey string
    Key used for project role
    displayName String
    Name used for project role
    group String
    Group used for project role
    orgId String
    ID of the organization
    projectId String
    ID of the project
    roleKey String
    Key used for project role
    displayName string
    Name used for project role
    group string
    Group used for project role
    orgId string
    ID of the organization
    projectId string
    ID of the project
    roleKey string
    Key used for project role
    display_name str
    Name used for project role
    group str
    Group used for project role
    org_id str
    ID of the organization
    project_id str
    ID of the project
    role_key str
    Key used for project role
    displayName String
    Name used for project role
    group String
    Group used for project role
    orgId String
    ID of the organization
    projectId String
    ID of the project
    roleKey String
    Key used for project role

    Import

    terraform The resource can be imported using the ID format <project_id:role_key[:org_id]>, e.g.

     $ pulumi import zitadel:index/projectRole:ProjectRole imported '123456789012345678:my-role-key:123456789012345678'
    

    To learn more about importing existing cloud resources, see Importing resources.

    Package Details

    Repository
    zitadel pulumiverse/pulumi-zitadel
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the zitadel Terraform Provider.
    zitadel logo
    zitadel v0.1.8 published on Thursday, May 30, 2024 by pulumiverse