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

zitadel.ProjectGrant

Explore with Pulumi AI

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

    Resource representing the grant of a project to a different organization, also containing the available roles which can be given to the members of the projectgrant.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Zitadel = Pulumiverse.Zitadel;
    
    return await Deployment.RunAsync(() => 
    {
        var @default = new Zitadel.ProjectGrant("default", new()
        {
            OrgId = data.Zitadel_org.Default.Id,
            ProjectId = data.Zitadel_project.Default.Id,
            GrantedOrgId = data.Zitadel_org.Granted_org.Id,
            RoleKeys = new[]
            {
                "super-user",
            },
        });
    
    });
    
    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.NewProjectGrant(ctx, "default", &zitadel.ProjectGrantArgs{
    			OrgId:        pulumi.Any(data.Zitadel_org.Default.Id),
    			ProjectId:    pulumi.Any(data.Zitadel_project.Default.Id),
    			GrantedOrgId: pulumi.Any(data.Zitadel_org.Granted_org.Id),
    			RoleKeys: pulumi.StringArray{
    				pulumi.String("super-user"),
    			},
    		})
    		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.ProjectGrant;
    import com.pulumi.zitadel.ProjectGrantArgs;
    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 ProjectGrant("default", ProjectGrantArgs.builder()        
                .orgId(data.zitadel_org().default().id())
                .projectId(data.zitadel_project().default().id())
                .grantedOrgId(data.zitadel_org().granted_org().id())
                .roleKeys("super-user")
                .build());
    
        }
    }
    
    import pulumi
    import pulumiverse_zitadel as zitadel
    
    default = zitadel.ProjectGrant("default",
        org_id=data["zitadel_org"]["default"]["id"],
        project_id=data["zitadel_project"]["default"]["id"],
        granted_org_id=data["zitadel_org"]["granted_org"]["id"],
        role_keys=["super-user"])
    
    import * as pulumi from "@pulumi/pulumi";
    import * as zitadel from "@pulumiverse/zitadel";
    
    const _default = new zitadel.ProjectGrant("default", {
        orgId: data.zitadel_org["default"].id,
        projectId: data.zitadel_project["default"].id,
        grantedOrgId: data.zitadel_org.granted_org.id,
        roleKeys: ["super-user"],
    });
    
    resources:
      default:
        type: zitadel:ProjectGrant
        properties:
          orgId: ${data.zitadel_org.default.id}
          projectId: ${data.zitadel_project.default.id}
          grantedOrgId: ${data.zitadel_org.granted_org.id}
          roleKeys:
            - super-user
    

    Create ProjectGrant Resource

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

    Constructor syntax

    new ProjectGrant(name: string, args: ProjectGrantArgs, opts?: CustomResourceOptions);
    @overload
    def ProjectGrant(resource_name: str,
                     args: ProjectGrantArgs,
                     opts: Optional[ResourceOptions] = None)
    
    @overload
    def ProjectGrant(resource_name: str,
                     opts: Optional[ResourceOptions] = None,
                     granted_org_id: Optional[str] = None,
                     project_id: Optional[str] = None,
                     org_id: Optional[str] = None,
                     role_keys: Optional[Sequence[str]] = None)
    func NewProjectGrant(ctx *Context, name string, args ProjectGrantArgs, opts ...ResourceOption) (*ProjectGrant, error)
    public ProjectGrant(string name, ProjectGrantArgs args, CustomResourceOptions? opts = null)
    public ProjectGrant(String name, ProjectGrantArgs args)
    public ProjectGrant(String name, ProjectGrantArgs args, CustomResourceOptions options)
    
    type: zitadel:ProjectGrant
    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 ProjectGrantArgs
    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 ProjectGrantArgs
    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 ProjectGrantArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args ProjectGrantArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args ProjectGrantArgs
    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 projectGrantResource = new Zitadel.ProjectGrant("projectGrantResource", new()
    {
        GrantedOrgId = "string",
        ProjectId = "string",
        OrgId = "string",
        RoleKeys = new[]
        {
            "string",
        },
    });
    
    example, err := zitadel.NewProjectGrant(ctx, "projectGrantResource", &zitadel.ProjectGrantArgs{
    	GrantedOrgId: pulumi.String("string"),
    	ProjectId:    pulumi.String("string"),
    	OrgId:        pulumi.String("string"),
    	RoleKeys: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    })
    
    var projectGrantResource = new ProjectGrant("projectGrantResource", ProjectGrantArgs.builder()
        .grantedOrgId("string")
        .projectId("string")
        .orgId("string")
        .roleKeys("string")
        .build());
    
    project_grant_resource = zitadel.ProjectGrant("projectGrantResource",
        granted_org_id="string",
        project_id="string",
        org_id="string",
        role_keys=["string"])
    
    const projectGrantResource = new zitadel.ProjectGrant("projectGrantResource", {
        grantedOrgId: "string",
        projectId: "string",
        orgId: "string",
        roleKeys: ["string"],
    });
    
    type: zitadel:ProjectGrant
    properties:
        grantedOrgId: string
        orgId: string
        projectId: string
        roleKeys:
            - string
    

    ProjectGrant 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 ProjectGrant resource accepts the following input properties:

    GrantedOrgId string
    ID of the organization granted the project
    ProjectId string
    ID of the project
    OrgId string
    ID of the organization
    RoleKeys List<string>
    List of roles granted
    GrantedOrgId string
    ID of the organization granted the project
    ProjectId string
    ID of the project
    OrgId string
    ID of the organization
    RoleKeys []string
    List of roles granted
    grantedOrgId String
    ID of the organization granted the project
    projectId String
    ID of the project
    orgId String
    ID of the organization
    roleKeys List<String>
    List of roles granted
    grantedOrgId string
    ID of the organization granted the project
    projectId string
    ID of the project
    orgId string
    ID of the organization
    roleKeys string[]
    List of roles granted
    granted_org_id str
    ID of the organization granted the project
    project_id str
    ID of the project
    org_id str
    ID of the organization
    role_keys Sequence[str]
    List of roles granted
    grantedOrgId String
    ID of the organization granted the project
    projectId String
    ID of the project
    orgId String
    ID of the organization
    roleKeys List<String>
    List of roles granted

    Outputs

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

    Get an existing ProjectGrant 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?: ProjectGrantState, opts?: CustomResourceOptions): ProjectGrant
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            granted_org_id: Optional[str] = None,
            org_id: Optional[str] = None,
            project_id: Optional[str] = None,
            role_keys: Optional[Sequence[str]] = None) -> ProjectGrant
    func GetProjectGrant(ctx *Context, name string, id IDInput, state *ProjectGrantState, opts ...ResourceOption) (*ProjectGrant, error)
    public static ProjectGrant Get(string name, Input<string> id, ProjectGrantState? state, CustomResourceOptions? opts = null)
    public static ProjectGrant get(String name, Output<String> id, ProjectGrantState 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:
    GrantedOrgId string
    ID of the organization granted the project
    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    RoleKeys List<string>
    List of roles granted
    GrantedOrgId string
    ID of the organization granted the project
    OrgId string
    ID of the organization
    ProjectId string
    ID of the project
    RoleKeys []string
    List of roles granted
    grantedOrgId String
    ID of the organization granted the project
    orgId String
    ID of the organization
    projectId String
    ID of the project
    roleKeys List<String>
    List of roles granted
    grantedOrgId string
    ID of the organization granted the project
    orgId string
    ID of the organization
    projectId string
    ID of the project
    roleKeys string[]
    List of roles granted
    granted_org_id str
    ID of the organization granted the project
    org_id str
    ID of the organization
    project_id str
    ID of the project
    role_keys Sequence[str]
    List of roles granted
    grantedOrgId String
    ID of the organization granted the project
    orgId String
    ID of the organization
    projectId String
    ID of the project
    roleKeys List<String>
    List of roles granted

    Import

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

     $ pulumi import zitadel:index/projectGrant:ProjectGrant imported '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