1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. RoleAssignments
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

harness.platform.RoleAssignments

Explore with Pulumi AI

harness logo
Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs

    Resource for creating role assignments in Harness.

    Example Usage

    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Harness = Lbrlabs.PulumiPackage.Harness;
    
    return await Deployment.RunAsync(() => 
    {
        //To create a role binding in service account
        var example1RoleAssignments = new Harness.Platform.RoleAssignments("example1RoleAssignments", new()
        {
            OrgId = "org_id",
            ProjectId = "project_id",
            ResourceGroupIdentifier = "_all_project_level_resources",
            RoleIdentifier = "_project_viewer",
            Principals = new[]
            {
                new Harness.Platform.Inputs.RoleAssignmentsPrincipalArgs
                {
                    Identifier = harness_platform_service_account.Test.Id,
                    Type = "SERVICE_ACCOUNT",
                },
            },
            Disabled = false,
            Managed = false,
        });
    
        //To create a role binding in user group 
        var example1Platform_roleAssignmentsRoleAssignments = new Harness.Platform.RoleAssignments("example1Platform/roleAssignmentsRoleAssignments", new()
        {
            OrgId = "org_id",
            ProjectId = "project_id",
            ResourceGroupIdentifier = "_all_project_level_resources",
            RoleIdentifier = "_project_viewer",
            Principals = new[]
            {
                new Harness.Platform.Inputs.RoleAssignmentsPrincipalArgs
                {
                    Identifier = harness_platform_usergroup.Test.Id,
                    Type = "USER_GROUP",
                },
            },
            Disabled = false,
            Managed = false,
        });
    
        var example2RoleAssignments = new Harness.Platform.RoleAssignments("example2RoleAssignments", new()
        {
            Identifier = "identifier",
            OrgId = "org_id",
            ProjectId = "project_id",
            ResourceGroupIdentifier = "_all_project_level_resources",
            RoleIdentifier = "_project_viewer",
            Principals = new[]
            {
                new Harness.Platform.Inputs.RoleAssignmentsPrincipalArgs
                {
                    Identifier = "user_id",
                    Type = "USER",
                },
            },
            Disabled = false,
            Managed = false,
        });
    
        var example2Platform_roleAssignmentsRoleAssignments = new Harness.Platform.RoleAssignments("example2Platform/roleAssignmentsRoleAssignments", new()
        {
            OrgId = "org_id",
            ProjectId = "project_id",
            ResourceGroupIdentifier = "_all_project_level_resources",
            RoleIdentifier = "_project_viewer",
            Principals = new[]
            {
                new Harness.Platform.Inputs.RoleAssignmentsPrincipalArgs
                {
                    Identifier = "service_id",
                    Type = "SERVICE",
                },
            },
            Disabled = false,
            Managed = false,
        });
    
        var example2HarnessPlatform_roleAssignmentsRoleAssignments = new Harness.Platform.RoleAssignments("example2HarnessPlatform/roleAssignmentsRoleAssignments", new()
        {
            OrgId = "org_id",
            ProjectId = "project_id",
            ResourceGroupIdentifier = "_all_project_level_resources",
            RoleIdentifier = "_project_viewer",
            Principals = new[]
            {
                new Harness.Platform.Inputs.RoleAssignmentsPrincipalArgs
                {
                    Identifier = "api_key_id",
                    Type = "API_KEY",
                },
            },
            Disabled = false,
            Managed = false,
        });
    
    });
    
    package main
    
    import (
    	"github.com/lbrlabs/pulumi-harness/sdk/go/harness/platform"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		_, err := platform.NewRoleAssignments(ctx, "example1RoleAssignments", &platform.RoleAssignmentsArgs{
    			OrgId:                   pulumi.String("org_id"),
    			ProjectId:               pulumi.String("project_id"),
    			ResourceGroupIdentifier: pulumi.String("_all_project_level_resources"),
    			RoleIdentifier:          pulumi.String("_project_viewer"),
    			Principals: platform.RoleAssignmentsPrincipalArray{
    				&platform.RoleAssignmentsPrincipalArgs{
    					Identifier: pulumi.Any(harness_platform_service_account.Test.Id),
    					Type:       pulumi.String("SERVICE_ACCOUNT"),
    				},
    			},
    			Disabled: pulumi.Bool(false),
    			Managed:  pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = platform.NewRoleAssignments(ctx, "example1Platform/roleAssignmentsRoleAssignments", &platform.RoleAssignmentsArgs{
    			OrgId:                   pulumi.String("org_id"),
    			ProjectId:               pulumi.String("project_id"),
    			ResourceGroupIdentifier: pulumi.String("_all_project_level_resources"),
    			RoleIdentifier:          pulumi.String("_project_viewer"),
    			Principals: platform.RoleAssignmentsPrincipalArray{
    				&platform.RoleAssignmentsPrincipalArgs{
    					Identifier: pulumi.Any(harness_platform_usergroup.Test.Id),
    					Type:       pulumi.String("USER_GROUP"),
    				},
    			},
    			Disabled: pulumi.Bool(false),
    			Managed:  pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = platform.NewRoleAssignments(ctx, "example2RoleAssignments", &platform.RoleAssignmentsArgs{
    			Identifier:              pulumi.String("identifier"),
    			OrgId:                   pulumi.String("org_id"),
    			ProjectId:               pulumi.String("project_id"),
    			ResourceGroupIdentifier: pulumi.String("_all_project_level_resources"),
    			RoleIdentifier:          pulumi.String("_project_viewer"),
    			Principals: platform.RoleAssignmentsPrincipalArray{
    				&platform.RoleAssignmentsPrincipalArgs{
    					Identifier: pulumi.String("user_id"),
    					Type:       pulumi.String("USER"),
    				},
    			},
    			Disabled: pulumi.Bool(false),
    			Managed:  pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = platform.NewRoleAssignments(ctx, "example2Platform/roleAssignmentsRoleAssignments", &platform.RoleAssignmentsArgs{
    			OrgId:                   pulumi.String("org_id"),
    			ProjectId:               pulumi.String("project_id"),
    			ResourceGroupIdentifier: pulumi.String("_all_project_level_resources"),
    			RoleIdentifier:          pulumi.String("_project_viewer"),
    			Principals: platform.RoleAssignmentsPrincipalArray{
    				&platform.RoleAssignmentsPrincipalArgs{
    					Identifier: pulumi.String("service_id"),
    					Type:       pulumi.String("SERVICE"),
    				},
    			},
    			Disabled: pulumi.Bool(false),
    			Managed:  pulumi.Bool(false),
    		})
    		if err != nil {
    			return err
    		}
    		_, err = platform.NewRoleAssignments(ctx, "example2HarnessPlatform/roleAssignmentsRoleAssignments", &platform.RoleAssignmentsArgs{
    			OrgId:                   pulumi.String("org_id"),
    			ProjectId:               pulumi.String("project_id"),
    			ResourceGroupIdentifier: pulumi.String("_all_project_level_resources"),
    			RoleIdentifier:          pulumi.String("_project_viewer"),
    			Principals: platform.RoleAssignmentsPrincipalArray{
    				&platform.RoleAssignmentsPrincipalArgs{
    					Identifier: pulumi.String("api_key_id"),
    					Type:       pulumi.String("API_KEY"),
    				},
    			},
    			Disabled: pulumi.Bool(false),
    			Managed:  pulumi.Bool(false),
    		})
    		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.harness.platform.RoleAssignments;
    import com.pulumi.harness.platform.RoleAssignmentsArgs;
    import com.pulumi.harness.platform.inputs.RoleAssignmentsPrincipalArgs;
    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 example1RoleAssignments = new RoleAssignments("example1RoleAssignments", RoleAssignmentsArgs.builder()        
                .orgId("org_id")
                .projectId("project_id")
                .resourceGroupIdentifier("_all_project_level_resources")
                .roleIdentifier("_project_viewer")
                .principals(RoleAssignmentsPrincipalArgs.builder()
                    .identifier(harness_platform_service_account.test().id())
                    .type("SERVICE_ACCOUNT")
                    .build())
                .disabled(false)
                .managed(false)
                .build());
    
            var example1Platform_roleAssignmentsRoleAssignments = new RoleAssignments("example1Platform/roleAssignmentsRoleAssignments", RoleAssignmentsArgs.builder()        
                .orgId("org_id")
                .projectId("project_id")
                .resourceGroupIdentifier("_all_project_level_resources")
                .roleIdentifier("_project_viewer")
                .principals(RoleAssignmentsPrincipalArgs.builder()
                    .identifier(harness_platform_usergroup.test().id())
                    .type("USER_GROUP")
                    .build())
                .disabled(false)
                .managed(false)
                .build());
    
            var example2RoleAssignments = new RoleAssignments("example2RoleAssignments", RoleAssignmentsArgs.builder()        
                .identifier("identifier")
                .orgId("org_id")
                .projectId("project_id")
                .resourceGroupIdentifier("_all_project_level_resources")
                .roleIdentifier("_project_viewer")
                .principals(RoleAssignmentsPrincipalArgs.builder()
                    .identifier("user_id")
                    .type("USER")
                    .build())
                .disabled(false)
                .managed(false)
                .build());
    
            var example2Platform_roleAssignmentsRoleAssignments = new RoleAssignments("example2Platform/roleAssignmentsRoleAssignments", RoleAssignmentsArgs.builder()        
                .orgId("org_id")
                .projectId("project_id")
                .resourceGroupIdentifier("_all_project_level_resources")
                .roleIdentifier("_project_viewer")
                .principals(RoleAssignmentsPrincipalArgs.builder()
                    .identifier("service_id")
                    .type("SERVICE")
                    .build())
                .disabled(false)
                .managed(false)
                .build());
    
            var example2HarnessPlatform_roleAssignmentsRoleAssignments = new RoleAssignments("example2HarnessPlatform/roleAssignmentsRoleAssignments", RoleAssignmentsArgs.builder()        
                .orgId("org_id")
                .projectId("project_id")
                .resourceGroupIdentifier("_all_project_level_resources")
                .roleIdentifier("_project_viewer")
                .principals(RoleAssignmentsPrincipalArgs.builder()
                    .identifier("api_key_id")
                    .type("API_KEY")
                    .build())
                .disabled(false)
                .managed(false)
                .build());
    
        }
    }
    
    import pulumi
    import lbrlabs_pulumi_harness as harness
    
    #To create a role binding in service account
    example1_role_assignments = harness.platform.RoleAssignments("example1RoleAssignments",
        org_id="org_id",
        project_id="project_id",
        resource_group_identifier="_all_project_level_resources",
        role_identifier="_project_viewer",
        principals=[harness.platform.RoleAssignmentsPrincipalArgs(
            identifier=harness_platform_service_account["test"]["id"],
            type="SERVICE_ACCOUNT",
        )],
        disabled=False,
        managed=False)
    #To create a role binding in user group 
    example1_platform_role_assignments_role_assignments = harness.platform.RoleAssignments("example1Platform/roleAssignmentsRoleAssignments",
        org_id="org_id",
        project_id="project_id",
        resource_group_identifier="_all_project_level_resources",
        role_identifier="_project_viewer",
        principals=[harness.platform.RoleAssignmentsPrincipalArgs(
            identifier=harness_platform_usergroup["test"]["id"],
            type="USER_GROUP",
        )],
        disabled=False,
        managed=False)
    example2_role_assignments = harness.platform.RoleAssignments("example2RoleAssignments",
        identifier="identifier",
        org_id="org_id",
        project_id="project_id",
        resource_group_identifier="_all_project_level_resources",
        role_identifier="_project_viewer",
        principals=[harness.platform.RoleAssignmentsPrincipalArgs(
            identifier="user_id",
            type="USER",
        )],
        disabled=False,
        managed=False)
    example2_platform_role_assignments_role_assignments = harness.platform.RoleAssignments("example2Platform/roleAssignmentsRoleAssignments",
        org_id="org_id",
        project_id="project_id",
        resource_group_identifier="_all_project_level_resources",
        role_identifier="_project_viewer",
        principals=[harness.platform.RoleAssignmentsPrincipalArgs(
            identifier="service_id",
            type="SERVICE",
        )],
        disabled=False,
        managed=False)
    example2_harness_platform_role_assignments_role_assignments = harness.platform.RoleAssignments("example2HarnessPlatform/roleAssignmentsRoleAssignments",
        org_id="org_id",
        project_id="project_id",
        resource_group_identifier="_all_project_level_resources",
        role_identifier="_project_viewer",
        principals=[harness.platform.RoleAssignmentsPrincipalArgs(
            identifier="api_key_id",
            type="API_KEY",
        )],
        disabled=False,
        managed=False)
    
    import * as pulumi from "@pulumi/pulumi";
    import * as harness from "@lbrlabs/pulumi-harness";
    
    //To create a role binding in service account
    const example1RoleAssignments = new harness.platform.RoleAssignments("example1RoleAssignments", {
        orgId: "org_id",
        projectId: "project_id",
        resourceGroupIdentifier: "_all_project_level_resources",
        roleIdentifier: "_project_viewer",
        principals: [{
            identifier: harness_platform_service_account.test.id,
            type: "SERVICE_ACCOUNT",
        }],
        disabled: false,
        managed: false,
    });
    //To create a role binding in user group 
    const example1Platform_roleAssignmentsRoleAssignments = new harness.platform.RoleAssignments("example1Platform/roleAssignmentsRoleAssignments", {
        orgId: "org_id",
        projectId: "project_id",
        resourceGroupIdentifier: "_all_project_level_resources",
        roleIdentifier: "_project_viewer",
        principals: [{
            identifier: harness_platform_usergroup.test.id,
            type: "USER_GROUP",
        }],
        disabled: false,
        managed: false,
    });
    const example2RoleAssignments = new harness.platform.RoleAssignments("example2RoleAssignments", {
        identifier: "identifier",
        orgId: "org_id",
        projectId: "project_id",
        resourceGroupIdentifier: "_all_project_level_resources",
        roleIdentifier: "_project_viewer",
        principals: [{
            identifier: "user_id",
            type: "USER",
        }],
        disabled: false,
        managed: false,
    });
    const example2Platform_roleAssignmentsRoleAssignments = new harness.platform.RoleAssignments("example2Platform/roleAssignmentsRoleAssignments", {
        orgId: "org_id",
        projectId: "project_id",
        resourceGroupIdentifier: "_all_project_level_resources",
        roleIdentifier: "_project_viewer",
        principals: [{
            identifier: "service_id",
            type: "SERVICE",
        }],
        disabled: false,
        managed: false,
    });
    const example2HarnessPlatform_roleAssignmentsRoleAssignments = new harness.platform.RoleAssignments("example2HarnessPlatform/roleAssignmentsRoleAssignments", {
        orgId: "org_id",
        projectId: "project_id",
        resourceGroupIdentifier: "_all_project_level_resources",
        roleIdentifier: "_project_viewer",
        principals: [{
            identifier: "api_key_id",
            type: "API_KEY",
        }],
        disabled: false,
        managed: false,
    });
    
    resources:
      # To create a role binding in service account
      example1RoleAssignments:
        type: harness:platform:RoleAssignments
        properties:
          orgId: org_id
          projectId: project_id
          resourceGroupIdentifier: _all_project_level_resources
          roleIdentifier: _project_viewer
          principals:
            - identifier: ${harness_platform_service_account.test.id}
              type: SERVICE_ACCOUNT
          disabled: false
          managed: false
      # To create a role binding in user group
      example1Platform/roleAssignmentsRoleAssignments:
        type: harness:platform:RoleAssignments
        properties:
          orgId: org_id
          projectId: project_id
          resourceGroupIdentifier: _all_project_level_resources
          roleIdentifier: _project_viewer
          principals:
            - identifier: ${harness_platform_usergroup.test.id}
              type: USER_GROUP
          disabled: false
          managed: false
      example2RoleAssignments:
        type: harness:platform:RoleAssignments
        properties:
          identifier: identifier
          orgId: org_id
          projectId: project_id
          resourceGroupIdentifier: _all_project_level_resources
          roleIdentifier: _project_viewer
          principals:
            - identifier: user_id
              type: USER
          disabled: false
          managed: false
      example2Platform/roleAssignmentsRoleAssignments:
        type: harness:platform:RoleAssignments
        properties:
          orgId: org_id
          projectId: project_id
          resourceGroupIdentifier: _all_project_level_resources
          roleIdentifier: _project_viewer
          principals:
            - identifier: service_id
              type: SERVICE
          disabled: false
          managed: false
      example2HarnessPlatform/roleAssignmentsRoleAssignments:
        type: harness:platform:RoleAssignments
        properties:
          orgId: org_id
          projectId: project_id
          resourceGroupIdentifier: _all_project_level_resources
          roleIdentifier: _project_viewer
          principals:
            - identifier: api_key_id
              type: API_KEY
          disabled: false
          managed: false
    

    Create RoleAssignments Resource

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

    Constructor syntax

    new RoleAssignments(name: string, args: RoleAssignmentsArgs, opts?: CustomResourceOptions);
    @overload
    def RoleAssignments(resource_name: str,
                        args: RoleAssignmentsArgs,
                        opts: Optional[ResourceOptions] = None)
    
    @overload
    def RoleAssignments(resource_name: str,
                        opts: Optional[ResourceOptions] = None,
                        principals: Optional[Sequence[RoleAssignmentsPrincipalArgs]] = None,
                        resource_group_identifier: Optional[str] = None,
                        role_identifier: Optional[str] = None,
                        disabled: Optional[bool] = None,
                        identifier: Optional[str] = None,
                        managed: Optional[bool] = None,
                        org_id: Optional[str] = None,
                        project_id: Optional[str] = None)
    func NewRoleAssignments(ctx *Context, name string, args RoleAssignmentsArgs, opts ...ResourceOption) (*RoleAssignments, error)
    public RoleAssignments(string name, RoleAssignmentsArgs args, CustomResourceOptions? opts = null)
    public RoleAssignments(String name, RoleAssignmentsArgs args)
    public RoleAssignments(String name, RoleAssignmentsArgs args, CustomResourceOptions options)
    
    type: harness:platform:RoleAssignments
    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 RoleAssignmentsArgs
    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 RoleAssignmentsArgs
    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 RoleAssignmentsArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args RoleAssignmentsArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args RoleAssignmentsArgs
    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 roleAssignmentsResource = new Harness.Platform.RoleAssignments("roleAssignmentsResource", new()
    {
        Principals = new[]
        {
            new Harness.Platform.Inputs.RoleAssignmentsPrincipalArgs
            {
                Type = "string",
                Identifier = "string",
                ScopeLevel = "string",
            },
        },
        ResourceGroupIdentifier = "string",
        RoleIdentifier = "string",
        Disabled = false,
        Identifier = "string",
        Managed = false,
        OrgId = "string",
        ProjectId = "string",
    });
    
    example, err := platform.NewRoleAssignments(ctx, "roleAssignmentsResource", &platform.RoleAssignmentsArgs{
    	Principals: platform.RoleAssignmentsPrincipalArray{
    		&platform.RoleAssignmentsPrincipalArgs{
    			Type:       pulumi.String("string"),
    			Identifier: pulumi.String("string"),
    			ScopeLevel: pulumi.String("string"),
    		},
    	},
    	ResourceGroupIdentifier: pulumi.String("string"),
    	RoleIdentifier:          pulumi.String("string"),
    	Disabled:                pulumi.Bool(false),
    	Identifier:              pulumi.String("string"),
    	Managed:                 pulumi.Bool(false),
    	OrgId:                   pulumi.String("string"),
    	ProjectId:               pulumi.String("string"),
    })
    
    var roleAssignmentsResource = new RoleAssignments("roleAssignmentsResource", RoleAssignmentsArgs.builder()
        .principals(RoleAssignmentsPrincipalArgs.builder()
            .type("string")
            .identifier("string")
            .scopeLevel("string")
            .build())
        .resourceGroupIdentifier("string")
        .roleIdentifier("string")
        .disabled(false)
        .identifier("string")
        .managed(false)
        .orgId("string")
        .projectId("string")
        .build());
    
    role_assignments_resource = harness.platform.RoleAssignments("roleAssignmentsResource",
        principals=[harness.platform.RoleAssignmentsPrincipalArgs(
            type="string",
            identifier="string",
            scope_level="string",
        )],
        resource_group_identifier="string",
        role_identifier="string",
        disabled=False,
        identifier="string",
        managed=False,
        org_id="string",
        project_id="string")
    
    const roleAssignmentsResource = new harness.platform.RoleAssignments("roleAssignmentsResource", {
        principals: [{
            type: "string",
            identifier: "string",
            scopeLevel: "string",
        }],
        resourceGroupIdentifier: "string",
        roleIdentifier: "string",
        disabled: false,
        identifier: "string",
        managed: false,
        orgId: "string",
        projectId: "string",
    });
    
    type: harness:platform:RoleAssignments
    properties:
        disabled: false
        identifier: string
        managed: false
        orgId: string
        principals:
            - identifier: string
              scopeLevel: string
              type: string
        projectId: string
        resourceGroupIdentifier: string
        roleIdentifier: string
    

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

    Principals List<Lbrlabs.PulumiPackage.Harness.Platform.Inputs.RoleAssignmentsPrincipal>
    Principal.
    ResourceGroupIdentifier string
    Resource group identifier.
    RoleIdentifier string
    Role identifier.
    Disabled bool
    Disabled or not.
    Identifier string
    Identifier for role assignment.
    Managed bool
    Managed or not.
    OrgId string
    Org identifier.
    ProjectId string
    Project Identifier
    Principals []RoleAssignmentsPrincipalArgs
    Principal.
    ResourceGroupIdentifier string
    Resource group identifier.
    RoleIdentifier string
    Role identifier.
    Disabled bool
    Disabled or not.
    Identifier string
    Identifier for role assignment.
    Managed bool
    Managed or not.
    OrgId string
    Org identifier.
    ProjectId string
    Project Identifier
    principals List<RoleAssignmentsPrincipal>
    Principal.
    resourceGroupIdentifier String
    Resource group identifier.
    roleIdentifier String
    Role identifier.
    disabled Boolean
    Disabled or not.
    identifier String
    Identifier for role assignment.
    managed Boolean
    Managed or not.
    orgId String
    Org identifier.
    projectId String
    Project Identifier
    principals RoleAssignmentsPrincipal[]
    Principal.
    resourceGroupIdentifier string
    Resource group identifier.
    roleIdentifier string
    Role identifier.
    disabled boolean
    Disabled or not.
    identifier string
    Identifier for role assignment.
    managed boolean
    Managed or not.
    orgId string
    Org identifier.
    projectId string
    Project Identifier
    principals Sequence[RoleAssignmentsPrincipalArgs]
    Principal.
    resource_group_identifier str
    Resource group identifier.
    role_identifier str
    Role identifier.
    disabled bool
    Disabled or not.
    identifier str
    Identifier for role assignment.
    managed bool
    Managed or not.
    org_id str
    Org identifier.
    project_id str
    Project Identifier
    principals List<Property Map>
    Principal.
    resourceGroupIdentifier String
    Resource group identifier.
    roleIdentifier String
    Role identifier.
    disabled Boolean
    Disabled or not.
    identifier String
    Identifier for role assignment.
    managed Boolean
    Managed or not.
    orgId String
    Org identifier.
    projectId String
    Project Identifier

    Outputs

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

    Get an existing RoleAssignments 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?: RoleAssignmentsState, opts?: CustomResourceOptions): RoleAssignments
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            disabled: Optional[bool] = None,
            identifier: Optional[str] = None,
            managed: Optional[bool] = None,
            org_id: Optional[str] = None,
            principals: Optional[Sequence[RoleAssignmentsPrincipalArgs]] = None,
            project_id: Optional[str] = None,
            resource_group_identifier: Optional[str] = None,
            role_identifier: Optional[str] = None) -> RoleAssignments
    func GetRoleAssignments(ctx *Context, name string, id IDInput, state *RoleAssignmentsState, opts ...ResourceOption) (*RoleAssignments, error)
    public static RoleAssignments Get(string name, Input<string> id, RoleAssignmentsState? state, CustomResourceOptions? opts = null)
    public static RoleAssignments get(String name, Output<String> id, RoleAssignmentsState 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:
    Disabled bool
    Disabled or not.
    Identifier string
    Identifier for role assignment.
    Managed bool
    Managed or not.
    OrgId string
    Org identifier.
    Principals List<Lbrlabs.PulumiPackage.Harness.Platform.Inputs.RoleAssignmentsPrincipal>
    Principal.
    ProjectId string
    Project Identifier
    ResourceGroupIdentifier string
    Resource group identifier.
    RoleIdentifier string
    Role identifier.
    Disabled bool
    Disabled or not.
    Identifier string
    Identifier for role assignment.
    Managed bool
    Managed or not.
    OrgId string
    Org identifier.
    Principals []RoleAssignmentsPrincipalArgs
    Principal.
    ProjectId string
    Project Identifier
    ResourceGroupIdentifier string
    Resource group identifier.
    RoleIdentifier string
    Role identifier.
    disabled Boolean
    Disabled or not.
    identifier String
    Identifier for role assignment.
    managed Boolean
    Managed or not.
    orgId String
    Org identifier.
    principals List<RoleAssignmentsPrincipal>
    Principal.
    projectId String
    Project Identifier
    resourceGroupIdentifier String
    Resource group identifier.
    roleIdentifier String
    Role identifier.
    disabled boolean
    Disabled or not.
    identifier string
    Identifier for role assignment.
    managed boolean
    Managed or not.
    orgId string
    Org identifier.
    principals RoleAssignmentsPrincipal[]
    Principal.
    projectId string
    Project Identifier
    resourceGroupIdentifier string
    Resource group identifier.
    roleIdentifier string
    Role identifier.
    disabled bool
    Disabled or not.
    identifier str
    Identifier for role assignment.
    managed bool
    Managed or not.
    org_id str
    Org identifier.
    principals Sequence[RoleAssignmentsPrincipalArgs]
    Principal.
    project_id str
    Project Identifier
    resource_group_identifier str
    Resource group identifier.
    role_identifier str
    Role identifier.
    disabled Boolean
    Disabled or not.
    identifier String
    Identifier for role assignment.
    managed Boolean
    Managed or not.
    orgId String
    Org identifier.
    principals List<Property Map>
    Principal.
    projectId String
    Project Identifier
    resourceGroupIdentifier String
    Resource group identifier.
    roleIdentifier String
    Role identifier.

    Supporting Types

    RoleAssignmentsPrincipal, RoleAssignmentsPrincipalArgs

    Type string
    Type.
    Identifier string
    Identifier.
    ScopeLevel string
    Scope level.
    Type string
    Type.
    Identifier string
    Identifier.
    ScopeLevel string
    Scope level.
    type String
    Type.
    identifier String
    Identifier.
    scopeLevel String
    Scope level.
    type string
    Type.
    identifier string
    Identifier.
    scopeLevel string
    Scope level.
    type str
    Type.
    identifier str
    Identifier.
    scope_level str
    Scope level.
    type String
    Type.
    identifier String
    Identifier.
    scopeLevel String
    Scope level.

    Import

    Import account level role assignments

     $ pulumi import harness:platform/roleAssignments:RoleAssignments example <role_assignments_id>
    

    Import org level role assignments

     $ pulumi import harness:platform/roleAssignments:RoleAssignments example <ord_id>/<role_assignments_id>
    

    Import project level role assignments

     $ pulumi import harness:platform/roleAssignments:RoleAssignments example <org_id>/<project_id>/<role_assignments_id>
    

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

    Package Details

    Repository
    harness lbrlabs/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.0.6 published on Saturday, Jul 1, 2023 by lbrlabs