harness.platform.RoleAssignments
Explore with Pulumi AI
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=[{
        "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
In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.
The RoleAssignments resource accepts the following input properties:
- Principals
List<RoleAssignments Principal> 
- Principal.
- ResourceGroup stringIdentifier 
- Resource group identifier.
- RoleIdentifier string
- Role identifier.
- Disabled bool
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- Identifier string
- Identifier for role assignment.
- Managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- OrgId string
- Org identifier.
- ProjectId string
- Project Identifier
- Principals
[]RoleAssignments Principal Args 
- Principal.
- ResourceGroup stringIdentifier 
- Resource group identifier.
- RoleIdentifier string
- Role identifier.
- Disabled bool
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- Identifier string
- Identifier for role assignment.
- Managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- OrgId string
- Org identifier.
- ProjectId string
- Project Identifier
- principals
List<RoleAssignments Principal> 
- Principal.
- resourceGroup StringIdentifier 
- Resource group identifier.
- roleIdentifier String
- Role identifier.
- disabled Boolean
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- identifier String
- Identifier for role assignment.
- managed Boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- orgId String
- Org identifier.
- projectId String
- Project Identifier
- principals
RoleAssignments Principal[] 
- Principal.
- resourceGroup stringIdentifier 
- Resource group identifier.
- roleIdentifier string
- Role identifier.
- disabled boolean
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- identifier string
- Identifier for role assignment.
- managed boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- orgId string
- Org identifier.
- projectId string
- Project Identifier
- principals
Sequence[RoleAssignments Principal Args] 
- Principal.
- resource_group_ stridentifier 
- Resource group identifier.
- role_identifier str
- Role identifier.
- disabled bool
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- identifier str
- Identifier for role assignment.
- managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- org_id str
- Org identifier.
- project_id str
- Project Identifier
- principals List<Property Map>
- Principal.
- resourceGroup StringIdentifier 
- Resource group identifier.
- roleIdentifier String
- Role identifier.
- disabled Boolean
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- identifier String
- Identifier for role assignment.
- managed Boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- 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) -> RoleAssignmentsfunc 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)resources:  _:    type: harness:platform:RoleAssignments    get:      id: ${id}- 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.
- Disabled bool
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- Identifier string
- Identifier for role assignment.
- Managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- OrgId string
- Org identifier.
- Principals
List<RoleAssignments Principal> 
- Principal.
- ProjectId string
- Project Identifier
- ResourceGroup stringIdentifier 
- Resource group identifier.
- RoleIdentifier string
- Role identifier.
- Disabled bool
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- Identifier string
- Identifier for role assignment.
- Managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- OrgId string
- Org identifier.
- Principals
[]RoleAssignments Principal Args 
- Principal.
- ProjectId string
- Project Identifier
- ResourceGroup stringIdentifier 
- Resource group identifier.
- RoleIdentifier string
- Role identifier.
- disabled Boolean
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- identifier String
- Identifier for role assignment.
- managed Boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- orgId String
- Org identifier.
- principals
List<RoleAssignments Principal> 
- Principal.
- projectId String
- Project Identifier
- resourceGroup StringIdentifier 
- Resource group identifier.
- roleIdentifier String
- Role identifier.
- disabled boolean
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- identifier string
- Identifier for role assignment.
- managed boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- orgId string
- Org identifier.
- principals
RoleAssignments Principal[] 
- Principal.
- projectId string
- Project Identifier
- resourceGroup stringIdentifier 
- Resource group identifier.
- roleIdentifier string
- Role identifier.
- disabled bool
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- identifier str
- Identifier for role assignment.
- managed bool
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- org_id str
- Org identifier.
- principals
Sequence[RoleAssignments Principal Args] 
- Principal.
- project_id str
- Project Identifier
- resource_group_ stridentifier 
- Resource group identifier.
- role_identifier str
- Role identifier.
- disabled Boolean
- The disabledattribute in the role assignment resource controls the status of the role assignment. Settingdisabledtofalseactivates the role and its permissions, enabling the assigned entity to perform allowed actions. Conversely, settingdisabledtotruedeactivates the role, revoking the entity's permissions and action capabilities. Default value should befalse.
- identifier String
- Identifier for role assignment.
- managed Boolean
- Specifies whether the role assignment is managed by Harness. Setting managed to truemeans that Harness will manage the lifecycle of the role assignment, including its creation, updates, and deletion. Conversely, setting it tofalseindicates that the role assignment is not managed by Harness, and thus Harness will not perform actions on it. Default value should befalse.
- orgId String
- Org identifier.
- principals List<Property Map>
- Principal.
- projectId String
- Project Identifier
- resourceGroup StringIdentifier 
- 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 harnessTerraform Provider.
