1. Packages
  2. Harness
  3. API Docs
  4. platform
  5. RoleAssignments
Harness v0.4.1 published on Monday, Oct 14, 2024 by Pulumi

harness.platform.RoleAssignments

Explore with Pulumi AI

harness logo
Harness v0.4.1 published on Monday, Oct 14, 2024 by Pulumi

    Example Usage

    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<RoleAssignmentsPrincipal>
    Principal.
    ResourceGroupIdentifier string
    Resource group identifier.
    RoleIdentifier string
    Role identifier.
    Disabled bool
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    Identifier string
    Identifier for role assignment.
    Managed bool
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    OrgId string
    Org identifier.
    ProjectId string
    Project Identifier
    Principals []RoleAssignmentsPrincipalArgs
    Principal.
    ResourceGroupIdentifier string
    Resource group identifier.
    RoleIdentifier string
    Role identifier.
    Disabled bool
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    Identifier string
    Identifier for role assignment.
    Managed bool
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    OrgId string
    Org identifier.
    ProjectId string
    Project Identifier
    principals List<RoleAssignmentsPrincipal>
    Principal.
    resourceGroupIdentifier String
    Resource group identifier.
    roleIdentifier String
    Role identifier.
    disabled Boolean
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    identifier String
    Identifier for role assignment.
    managed Boolean
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    orgId String
    Org identifier.
    projectId String
    Project Identifier
    principals RoleAssignmentsPrincipal[]
    Principal.
    resourceGroupIdentifier string
    Resource group identifier.
    roleIdentifier string
    Role identifier.
    disabled boolean
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    identifier string
    Identifier for role assignment.
    managed boolean
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    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
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    identifier str
    Identifier for role assignment.
    managed bool
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    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
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    identifier String
    Identifier for role assignment.
    managed Boolean
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    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
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    Identifier string
    Identifier for role assignment.
    Managed bool
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    OrgId string
    Org identifier.
    Principals List<RoleAssignmentsPrincipal>
    Principal.
    ProjectId string
    Project Identifier
    ResourceGroupIdentifier string
    Resource group identifier.
    RoleIdentifier string
    Role identifier.
    Disabled bool
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    Identifier string
    Identifier for role assignment.
    Managed bool
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    OrgId string
    Org identifier.
    Principals []RoleAssignmentsPrincipalArgs
    Principal.
    ProjectId string
    Project Identifier
    ResourceGroupIdentifier string
    Resource group identifier.
    RoleIdentifier string
    Role identifier.
    disabled Boolean
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    identifier String
    Identifier for role assignment.
    managed Boolean
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    orgId String
    Org identifier.
    principals List<RoleAssignmentsPrincipal>
    Principal.
    projectId String
    Project Identifier
    resourceGroupIdentifier String
    Resource group identifier.
    roleIdentifier String
    Role identifier.
    disabled boolean
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    identifier string
    Identifier for role assignment.
    managed boolean
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    orgId string
    Org identifier.
    principals RoleAssignmentsPrincipal[]
    Principal.
    projectId string
    Project Identifier
    resourceGroupIdentifier string
    Resource group identifier.
    roleIdentifier string
    Role identifier.
    disabled bool
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    identifier str
    Identifier for role assignment.
    managed bool
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    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
    The disabled attribute in the role assignment resource controls the status of the role assignment. Setting disabled to false activates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, setting disabled to true deactivates the role, revoking the entity's permissions and action capabilities. Default value should be false.
    identifier String
    Identifier for role assignment.
    managed Boolean
    Specifies whether the role assignment is managed by Harness. Setting managed to true means that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it to false indicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should be false.
    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 pulumi/pulumi-harness
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the harness Terraform Provider.
    harness logo
    Harness v0.4.1 published on Monday, Oct 14, 2024 by Pulumi