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

zitadel.ProjectGrantMember

Explore with Pulumi AI

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

    Resource representing the membership of a user on an granted project, defined with the given role.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zitadel = Pulumiverse.Zitadel;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Zitadel.ProjectGrantMember("default", new()
        {
            OrgId = data.Zitadel_org.Default.Id,
            ProjectId = data.Zitadel_project.Default.Id,
            UserId = data.Zitadel_human_user.Default.Id,
            GrantId = "123456789012345678",
            Roles = new[]
            {
                "PROJECT_GRANT_OWNER",
            },
        });
    
    });
    
    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.NewProjectGrantMember(ctx, "default", &zitadel.ProjectGrantMemberArgs{
    			OrgId:     pulumi.Any(data.Zitadel_org.Default.Id),
    			ProjectId: pulumi.Any(data.Zitadel_project.Default.Id),
    			UserId:    pulumi.Any(data.Zitadel_human_user.Default.Id),
    			GrantId:   pulumi.String("123456789012345678"),
    			Roles: pulumi.StringArray{
    				pulumi.String("PROJECT_GRANT_OWNER"),
    			},
    		})
    		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.ProjectGrantMember;
    import com.pulumi.zitadel.ProjectGrantMemberArgs;
    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 ProjectGrantMember("default", ProjectGrantMemberArgs.builder()        
                .orgId(data.zitadel_org().default().id())
                .projectId(data.zitadel_project().default().id())
                .userId(data.zitadel_human_user().default().id())
                .grantId("123456789012345678")
                .roles("PROJECT_GRANT_OWNER")
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_zitadel as zitadel
    
    default = zitadel.ProjectGrantMember("default",
        org_id=data["zitadel_org"]["default"]["id"],
        project_id=data["zitadel_project"]["default"]["id"],
        user_id=data["zitadel_human_user"]["default"]["id"],
        grant_id="123456789012345678",
        roles=["PROJECT_GRANT_OWNER"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zitadel from "@pulumiverse/zitadel";
    
    const _default = new zitadel.ProjectGrantMember("default", {
        orgId: data.zitadel_org["default"].id,
        projectId: data.zitadel_project["default"].id,
        userId: data.zitadel_human_user["default"].id,
        grantId: "123456789012345678",
        roles: ["PROJECT_GRANT_OWNER"],
    });
    
    resources:
      default:
        type: zitadel:ProjectGrantMember
        properties:
          orgId: ${data.zitadel_org.default.id}
          projectId: ${data.zitadel_project.default.id}
          userId: ${data.zitadel_human_user.default.id}
          grantId: '123456789012345678'
          roles:
            - PROJECT_GRANT_OWNER
    

    Create ProjectGrantMember Resource

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

    Constructor syntax

    new ProjectGrantMember(name: string, args: ProjectGrantMemberArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectGrantMember(resource_name: str,
                           args: ProjectGrantMemberArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectGrantMember(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           grant_id: Optional[str] = None,
                           project_id: Optional[str] = None,
                           roles: Optional[Sequence[str]] = None,
                           user_id: Optional[str] = None,
                           org_id: Optional[str] = None)
    func NewProjectGrantMember(ctx *Context, name string, args ProjectGrantMemberArgs, opts ...ResourceOption) (*ProjectGrantMember, error)
    public ProjectGrantMember(string name, ProjectGrantMemberArgs args, CustomResourceOptions? opts = null)
    public ProjectGrantMember(String name, ProjectGrantMemberArgs args)
    public ProjectGrantMember(String name, ProjectGrantMemberArgs args, CustomResourceOptions options)
    
    type: zitadel:ProjectGrantMember
    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 ProjectGrantMemberArgs
    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 ProjectGrantMemberArgs
    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 ProjectGrantMemberArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectGrantMemberArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectGrantMemberArgs
    The arguments to resource properties.
    options CustomResourceOptions
    Bag of options to control resource's behavior.

    Constructor example

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

    var projectGrantMemberResource = new Zitadel.ProjectGrantMember("projectGrantMemberResource", new()
    {
        GrantId = "string",
        ProjectId = "string",
        Roles = new[]
        {
            "string",
        },
        UserId = "string",
        OrgId = "string",
    });
    
    example, err := zitadel.NewProjectGrantMember(ctx, "projectGrantMemberResource", &zitadel.ProjectGrantMemberArgs{
    	GrantId:   pulumi.String("string"),
    	ProjectId: pulumi.String("string"),
    	Roles: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	UserId: pulumi.String("string"),
    	OrgId:  pulumi.String("string"),
    })
    
    var projectGrantMemberResource = new ProjectGrantMember("projectGrantMemberResource", ProjectGrantMemberArgs.builder()
        .grantId("string")
        .projectId("string")
        .roles("string")
        .userId("string")
        .orgId("string")
        .build());
    
    project_grant_member_resource = zitadel.ProjectGrantMember("projectGrantMemberResource",
        grant_id="string",
        project_id="string",
        roles=["string"],
        user_id="string",
        org_id="string")
    
    const projectGrantMemberResource = new zitadel.ProjectGrantMember("projectGrantMemberResource", {
        grantId: "string",
        projectId: "string",
        roles: ["string"],
        userId: "string",
        orgId: "string",
    });
    
    type: zitadel:ProjectGrantMember
    properties:
        grantId: string
        orgId: string
        projectId: string
        roles:
            - string
        userId: string
    

    ProjectGrantMember Resource Properties

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

    Inputs

    In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

    The ProjectGrantMember resource accepts the following input properties:

    GrantId string
    ID of the grant
    ProjectId string
    ID of the project
    Roles List<string>
    List of roles granted
    UserId string
    ID of the user
    OrgId string
    ID of the organization
    GrantId string
    ID of the grant
    ProjectId string
    ID of the project
    Roles []string
    List of roles granted
    UserId string
    ID of the user
    OrgId string
    ID of the organization
    grantId String
    ID of the grant
    projectId String
    ID of the project
    roles List<String>
    List of roles granted
    userId String
    ID of the user
    orgId String
    ID of the organization
    grantId string
    ID of the grant
    projectId string
    ID of the project
    roles string[]
    List of roles granted
    userId string
    ID of the user
    orgId string
    ID of the organization
    grant_id str
    ID of the grant
    project_id str
    ID of the project
    roles Sequence[str]
    List of roles granted
    user_id str
    ID of the user
    org_id str
    ID of the organization
    grantId String
    ID of the grant
    projectId String
    ID of the project
    roles List<String>
    List of roles granted
    userId String
    ID of the user
    orgId String
    ID of the organization

    Outputs

    All input properties are implicitly available as output properties. Additionally, the ProjectGrantMember 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 ProjectGrantMember Resource

    Get an existing ProjectGrantMember 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?: ProjectGrantMemberState, opts?: CustomResourceOptions): ProjectGrantMember
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            grant_id: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            roles: Optional[Sequence[str]] = None,
            user_id: Optional[str] = None) -> ProjectGrantMember
    func GetProjectGrantMember(ctx *Context, name string, id IDInput, state *ProjectGrantMemberState, opts ...ResourceOption) (*ProjectGrantMember, error)
    public static ProjectGrantMember Get(string name, Input<string> id, ProjectGrantMemberState? state, CustomResourceOptions? opts = null)
    public static ProjectGrantMember get(String name, Output<String> id, ProjectGrantMemberState 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:
    GrantId string
    ID of the grant
    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    Roles List<string>
    List of roles granted
    UserId string
    ID of the user
    GrantId string
    ID of the grant
    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    Roles []string
    List of roles granted
    UserId string
    ID of the user
    grantId String
    ID of the grant
    orgId String
    ID of the organization
    projectId String
    ID of the project
    roles List<String>
    List of roles granted
    userId String
    ID of the user
    grantId string
    ID of the grant
    orgId string
    ID of the organization
    projectId string
    ID of the project
    roles string[]
    List of roles granted
    userId string
    ID of the user
    grant_id str
    ID of the grant
    org_id str
    ID of the organization
    project_id str
    ID of the project
    roles Sequence[str]
    List of roles granted
    user_id str
    ID of the user
    grantId String
    ID of the grant
    orgId String
    ID of the organization
    projectId String
    ID of the project
    roles List<String>
    List of roles granted
    userId String
    ID of the user

    Import

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

     $ pulumi import zitadel:index/projectGrantMember:ProjectGrantMember imported '123456789012345678:123456789012345678:123456789012345678: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