zitadel.ProjectGrantMember
Explore with Pulumi AI
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 = defaultZitadelOrg.Id,
ProjectId = defaultZitadelProject.Id,
UserId = defaultZitadelHumanUser.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(defaultZitadelOrg.Id),
ProjectId: pulumi.Any(defaultZitadelProject.Id),
UserId: pulumi.Any(defaultZitadelHumanUser.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(defaultZitadelOrg.id())
.projectId(defaultZitadelProject.id())
.userId(defaultZitadelHumanUser.id())
.grantId("123456789012345678")
.roles("PROJECT_GRANT_OWNER")
.build());
}
}
import * as pulumi from "@pulumi/pulumi";
import * as zitadel from "@pulumiverse/zitadel";
const _default = new zitadel.ProjectGrantMember("default", {
orgId: defaultZitadelOrg.id,
projectId: defaultZitadelProject.id,
userId: defaultZitadelHumanUser.id,
grantId: "123456789012345678",
roles: ["PROJECT_GRANT_OWNER"],
});
import pulumi
import pulumiverse_zitadel as zitadel
default = zitadel.ProjectGrantMember("default",
org_id=default_zitadel_org["id"],
project_id=default_zitadel_project["id"],
user_id=default_zitadel_human_user["id"],
grant_id="123456789012345678",
roles=["PROJECT_GRANT_OWNER"])
resources:
default:
type: zitadel:ProjectGrantMember
properties:
orgId: ${defaultZitadelOrg.id}
projectId: ${defaultZitadelProject.id}
userId: ${defaultZitadelHumanUser.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
This property is required. string - The unique name of the resource.
- args
This property is required. ProjectGrantMemberArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- resource_name
This property is required. str - The unique name of the resource.
- args
This property is required. 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
This property is required. string - The unique name of the resource.
- args
This property is required. ProjectGrantMemberArgs - The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name
This property is required. string - The unique name of the resource.
- args
This property is required. ProjectGrantMemberArgs - The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name
This property is required. String - The unique name of the resource.
- args
This property is required. 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:
- Grant
Id This property is required. Changes to this property will trigger replacement.
- ID of the grant
- Project
Id This property is required. Changes to this property will trigger replacement.
- ID of the project
- Roles
This property is required. List<string> - List of roles granted
- User
Id This property is required. Changes to this property will trigger replacement.
- ID of the user
- Org
Id Changes to this property will trigger replacement.
- ID of the organization
- Grant
Id This property is required. Changes to this property will trigger replacement.
- ID of the grant
- Project
Id This property is required. Changes to this property will trigger replacement.
- ID of the project
- Roles
This property is required. []string - List of roles granted
- User
Id This property is required. Changes to this property will trigger replacement.
- ID of the user
- Org
Id Changes to this property will trigger replacement.
- ID of the organization
- grant
Id This property is required. Changes to this property will trigger replacement.
- ID of the grant
- project
Id This property is required. Changes to this property will trigger replacement.
- ID of the project
- roles
This property is required. List<String> - List of roles granted
- user
Id This property is required. Changes to this property will trigger replacement.
- ID of the user
- org
Id Changes to this property will trigger replacement.
- ID of the organization
- grant
Id This property is required. Changes to this property will trigger replacement.
- ID of the grant
- project
Id This property is required. Changes to this property will trigger replacement.
- ID of the project
- roles
This property is required. string[] - List of roles granted
- user
Id This property is required. Changes to this property will trigger replacement.
- ID of the user
- org
Id Changes to this property will trigger replacement.
- ID of the organization
- grant_
id This property is required. Changes to this property will trigger replacement.
- ID of the grant
- project_
id This property is required. Changes to this property will trigger replacement.
- ID of the project
- roles
This property is required. Sequence[str] - List of roles granted
- user_
id This property is required. Changes to this property will trigger replacement.
- ID of the user
- org_
id Changes to this property will trigger replacement.
- ID of the organization
- grant
Id This property is required. Changes to this property will trigger replacement.
- ID of the grant
- project
Id This property is required. Changes to this property will trigger replacement.
- ID of the project
- roles
This property is required. List<String> - List of roles granted
- user
Id This property is required. Changes to this property will trigger replacement.
- ID of the user
- org
Id Changes to this property will trigger replacement.
- 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)
resources: _: type: zitadel:ProjectGrantMember get: id: ${id}
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - The unique provider ID of the resource to lookup.
- name
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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
This property is required. - The unique name of the resulting resource.
- id
This property is required. - 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.
- Grant
Id Changes to this property will trigger replacement.
- ID of the grant
- Org
Id Changes to this property will trigger replacement.
- ID of the organization
- Project
Id Changes to this property will trigger replacement.
- ID of the project
- Roles List<string>
- List of roles granted
- User
Id Changes to this property will trigger replacement.
- ID of the user
- Grant
Id Changes to this property will trigger replacement.
- ID of the grant
- Org
Id Changes to this property will trigger replacement.
- ID of the organization
- Project
Id Changes to this property will trigger replacement.
- ID of the project
- Roles []string
- List of roles granted
- User
Id Changes to this property will trigger replacement.
- ID of the user
- grant
Id Changes to this property will trigger replacement.
- ID of the grant
- org
Id Changes to this property will trigger replacement.
- ID of the organization
- project
Id Changes to this property will trigger replacement.
- ID of the project
- roles List<String>
- List of roles granted
- user
Id Changes to this property will trigger replacement.
- ID of the user
- grant
Id Changes to this property will trigger replacement.
- ID of the grant
- org
Id Changes to this property will trigger replacement.
- ID of the organization
- project
Id Changes to this property will trigger replacement.
- ID of the project
- roles string[]
- List of roles granted
- user
Id Changes to this property will trigger replacement.
- ID of the user
- grant_
id Changes to this property will trigger replacement.
- ID of the grant
- org_
id Changes to this property will trigger replacement.
- ID of the organization
- project_
id Changes to this property will trigger replacement.
- ID of the project
- roles Sequence[str]
- List of roles granted
- user_
id Changes to this property will trigger replacement.
- ID of the user
- grant
Id Changes to this property will trigger replacement.
- ID of the grant
- org
Id Changes to this property will trigger replacement.
- ID of the organization
- project
Id Changes to this property will trigger replacement.
- ID of the project
- roles List<String>
- List of roles granted
- user
Id Changes to this property will trigger replacement.
- ID of the user
Import
bash 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.