We recommend using Azure Native.
azure.marketplace.RoleAssignment
Explore with Pulumi AI
Assigns a given Principal (User or Group) to a given Role in a Private Azure Marketplace.
Example Usage
Using A Role Definition Name)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.core.getClientConfig({});
const exampleRoleAssignment = new azure.marketplace.RoleAssignment("example", {
roleDefinitionName: "Marketplace Admin",
principalId: example.then(example => example.objectId),
});
import pulumi
import pulumi_azure as azure
example = azure.core.get_client_config()
example_role_assignment = azure.marketplace.RoleAssignment("example",
role_definition_name="Marketplace Admin",
principal_id=example.object_id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/marketplace"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
_, err = marketplace.NewRoleAssignment(ctx, "example", &marketplace.RoleAssignmentArgs{
RoleDefinitionName: pulumi.String("Marketplace Admin"),
PrincipalId: pulumi.String(example.ObjectId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Core.GetClientConfig.Invoke();
var exampleRoleAssignment = new Azure.Marketplace.RoleAssignment("example", new()
{
RoleDefinitionName = "Marketplace Admin",
PrincipalId = example.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.marketplace.RoleAssignment;
import com.pulumi.azure.marketplace.RoleAssignmentArgs;
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) {
final var example = CoreFunctions.getClientConfig(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
var exampleRoleAssignment = new RoleAssignment("exampleRoleAssignment", RoleAssignmentArgs.builder()
.roleDefinitionName("Marketplace Admin")
.principalId(example.objectId())
.build());
}
}
resources:
exampleRoleAssignment:
type: azure:marketplace:RoleAssignment
name: example
properties:
roleDefinitionName: Marketplace Admin
principalId: ${example.objectId}
variables:
example:
fn::invoke:
function: azure:core:getClientConfig
arguments: {}
Using A Role Definition ID)
import * as pulumi from "@pulumi/pulumi";
import * as azure from "@pulumi/azure";
const example = azure.core.getClientConfig({});
const exampleGetRoleDefinition = azure.authorization.getRoleDefinition({
name: "Log Analytics Reader",
});
const exampleRoleAssignment = new azure.marketplace.RoleAssignment("example", {
roleDefinitionId: exampleGetRoleDefinition.then(exampleGetRoleDefinition => exampleGetRoleDefinition.id),
principalId: example.then(example => example.objectId),
});
import pulumi
import pulumi_azure as azure
example = azure.core.get_client_config()
example_get_role_definition = azure.authorization.get_role_definition(name="Log Analytics Reader")
example_role_assignment = azure.marketplace.RoleAssignment("example",
role_definition_id=example_get_role_definition.id,
principal_id=example.object_id)
package main
import (
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/authorization"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/core"
"github.com/pulumi/pulumi-azure/sdk/v6/go/azure/marketplace"
"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
)
func main() {
pulumi.Run(func(ctx *pulumi.Context) error {
example, err := core.GetClientConfig(ctx, map[string]interface{}{}, nil)
if err != nil {
return err
}
exampleGetRoleDefinition, err := authorization.LookupRoleDefinition(ctx, &authorization.LookupRoleDefinitionArgs{
Name: pulumi.StringRef("Log Analytics Reader"),
}, nil)
if err != nil {
return err
}
_, err = marketplace.NewRoleAssignment(ctx, "example", &marketplace.RoleAssignmentArgs{
RoleDefinitionId: pulumi.String(exampleGetRoleDefinition.Id),
PrincipalId: pulumi.String(example.ObjectId),
})
if err != nil {
return err
}
return nil
})
}
using System.Collections.Generic;
using System.Linq;
using Pulumi;
using Azure = Pulumi.Azure;
return await Deployment.RunAsync(() =>
{
var example = Azure.Core.GetClientConfig.Invoke();
var exampleGetRoleDefinition = Azure.Authorization.GetRoleDefinition.Invoke(new()
{
Name = "Log Analytics Reader",
});
var exampleRoleAssignment = new Azure.Marketplace.RoleAssignment("example", new()
{
RoleDefinitionId = exampleGetRoleDefinition.Apply(getRoleDefinitionResult => getRoleDefinitionResult.Id),
PrincipalId = example.Apply(getClientConfigResult => getClientConfigResult.ObjectId),
});
});
package generated_program;
import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.azure.core.CoreFunctions;
import com.pulumi.azure.authorization.AuthorizationFunctions;
import com.pulumi.azure.authorization.inputs.GetRoleDefinitionArgs;
import com.pulumi.azure.marketplace.RoleAssignment;
import com.pulumi.azure.marketplace.RoleAssignmentArgs;
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) {
final var example = CoreFunctions.getClientConfig(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference);
final var exampleGetRoleDefinition = AuthorizationFunctions.getRoleDefinition(GetRoleDefinitionArgs.builder()
.name("Log Analytics Reader")
.build());
var exampleRoleAssignment = new RoleAssignment("exampleRoleAssignment", RoleAssignmentArgs.builder()
.roleDefinitionId(exampleGetRoleDefinition.id())
.principalId(example.objectId())
.build());
}
}
resources:
exampleRoleAssignment:
type: azure:marketplace:RoleAssignment
name: example
properties:
roleDefinitionId: ${exampleGetRoleDefinition.id}
principalId: ${example.objectId}
variables:
example:
fn::invoke:
function: azure:core:getClientConfig
arguments: {}
exampleGetRoleDefinition:
fn::invoke:
function: azure:authorization:getRoleDefinition
arguments:
name: Log Analytics Reader
API Providers
This resource uses the following Azure API Providers:
Microsoft.Authorization
: 2022-05-01-preview, 2022-04-01
Create RoleAssignment Resource
Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.
Constructor syntax
new RoleAssignment(name: string, args: RoleAssignmentArgs, opts?: CustomResourceOptions);
@overload
def RoleAssignment(resource_name: str,
args: RoleAssignmentArgs,
opts: Optional[ResourceOptions] = None)
@overload
def RoleAssignment(resource_name: str,
opts: Optional[ResourceOptions] = None,
principal_id: Optional[str] = None,
condition: Optional[str] = None,
condition_version: Optional[str] = None,
delegated_managed_identity_resource_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
role_definition_id: Optional[str] = None,
role_definition_name: Optional[str] = None,
skip_service_principal_aad_check: Optional[bool] = None)
func NewRoleAssignment(ctx *Context, name string, args RoleAssignmentArgs, opts ...ResourceOption) (*RoleAssignment, error)
public RoleAssignment(string name, RoleAssignmentArgs args, CustomResourceOptions? opts = null)
public RoleAssignment(String name, RoleAssignmentArgs args)
public RoleAssignment(String name, RoleAssignmentArgs args, CustomResourceOptions options)
type: azure:marketplace:RoleAssignment
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 RoleAssignmentArgs
- 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 RoleAssignmentArgs
- 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 RoleAssignmentArgs
- The arguments to resource properties.
- opts ResourceOption
- Bag of options to control resource's behavior.
- name string
- The unique name of the resource.
- args RoleAssignmentArgs
- The arguments to resource properties.
- opts CustomResourceOptions
- Bag of options to control resource's behavior.
- name String
- The unique name of the resource.
- args RoleAssignmentArgs
- 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 roleAssignmentResource = new Azure.Marketplace.RoleAssignment("roleAssignmentResource", new()
{
PrincipalId = "string",
Condition = "string",
ConditionVersion = "string",
DelegatedManagedIdentityResourceId = "string",
Description = "string",
Name = "string",
RoleDefinitionId = "string",
RoleDefinitionName = "string",
SkipServicePrincipalAadCheck = false,
});
example, err := marketplace.NewRoleAssignment(ctx, "roleAssignmentResource", &marketplace.RoleAssignmentArgs{
PrincipalId: pulumi.String("string"),
Condition: pulumi.String("string"),
ConditionVersion: pulumi.String("string"),
DelegatedManagedIdentityResourceId: pulumi.String("string"),
Description: pulumi.String("string"),
Name: pulumi.String("string"),
RoleDefinitionId: pulumi.String("string"),
RoleDefinitionName: pulumi.String("string"),
SkipServicePrincipalAadCheck: pulumi.Bool(false),
})
var roleAssignmentResource = new com.pulumi.azure.marketplace.RoleAssignment("roleAssignmentResource", com.pulumi.azure.marketplace.RoleAssignmentArgs.builder()
.principalId("string")
.condition("string")
.conditionVersion("string")
.delegatedManagedIdentityResourceId("string")
.description("string")
.name("string")
.roleDefinitionId("string")
.roleDefinitionName("string")
.skipServicePrincipalAadCheck(false)
.build());
role_assignment_resource = azure.marketplace.RoleAssignment("roleAssignmentResource",
principal_id="string",
condition="string",
condition_version="string",
delegated_managed_identity_resource_id="string",
description="string",
name="string",
role_definition_id="string",
role_definition_name="string",
skip_service_principal_aad_check=False)
const roleAssignmentResource = new azure.marketplace.RoleAssignment("roleAssignmentResource", {
principalId: "string",
condition: "string",
conditionVersion: "string",
delegatedManagedIdentityResourceId: "string",
description: "string",
name: "string",
roleDefinitionId: "string",
roleDefinitionName: "string",
skipServicePrincipalAadCheck: false,
});
type: azure:marketplace:RoleAssignment
properties:
condition: string
conditionVersion: string
delegatedManagedIdentityResourceId: string
description: string
name: string
principalId: string
roleDefinitionId: string
roleDefinitionName: string
skipServicePrincipalAadCheck: false
RoleAssignment 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 RoleAssignment resource accepts the following input properties:
- Principal
Id string The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- Condition string
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- Condition
Version string - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - Delegated
Managed stringIdentity Resource Id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- Description string
- The description for this Role Assignment. Changing this forces a new resource to be created.
- Name string
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- Role
Definition stringId - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - Role
Definition stringName The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- Skip
Service boolPrincipal Aad Check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
- Principal
Id string The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- Condition string
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- Condition
Version string - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - Delegated
Managed stringIdentity Resource Id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- Description string
- The description for this Role Assignment. Changing this forces a new resource to be created.
- Name string
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- Role
Definition stringId - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - Role
Definition stringName The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- Skip
Service boolPrincipal Aad Check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
- principal
Id String The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- condition String
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- condition
Version String - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - delegated
Managed StringIdentity Resource Id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- description String
- The description for this Role Assignment. Changing this forces a new resource to be created.
- name String
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- role
Definition StringId - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - role
Definition StringName The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- skip
Service BooleanPrincipal Aad Check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
- principal
Id string The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- condition string
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- condition
Version string - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - delegated
Managed stringIdentity Resource Id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- description string
- The description for this Role Assignment. Changing this forces a new resource to be created.
- name string
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- role
Definition stringId - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - role
Definition stringName The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- skip
Service booleanPrincipal Aad Check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
- principal_
id str The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- condition str
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- condition_
version str - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - delegated_
managed_ stridentity_ resource_ id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- description str
- The description for this Role Assignment. Changing this forces a new resource to be created.
- name str
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- role_
definition_ strid - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - role_
definition_ strname The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- skip_
service_ boolprincipal_ aad_ check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
- principal
Id String The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- condition String
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- condition
Version String - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - delegated
Managed StringIdentity Resource Id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- description String
- The description for this Role Assignment. Changing this forces a new resource to be created.
- name String
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- role
Definition StringId - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - role
Definition StringName The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- skip
Service BooleanPrincipal Aad Check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
Outputs
All input properties are implicitly available as output properties. Additionally, the RoleAssignment resource produces the following output properties:
- Id string
- The provider-assigned unique ID for this managed resource.
- Principal
Type string - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc.
- Id string
- The provider-assigned unique ID for this managed resource.
- Principal
Type string - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc.
- id String
- The provider-assigned unique ID for this managed resource.
- principal
Type String - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc.
- id string
- The provider-assigned unique ID for this managed resource.
- principal
Type string - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc.
- id str
- The provider-assigned unique ID for this managed resource.
- principal_
type str - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc.
- id String
- The provider-assigned unique ID for this managed resource.
- principal
Type String - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc.
Look up Existing RoleAssignment Resource
Get an existing RoleAssignment 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?: RoleAssignmentState, opts?: CustomResourceOptions): RoleAssignment
@staticmethod
def get(resource_name: str,
id: str,
opts: Optional[ResourceOptions] = None,
condition: Optional[str] = None,
condition_version: Optional[str] = None,
delegated_managed_identity_resource_id: Optional[str] = None,
description: Optional[str] = None,
name: Optional[str] = None,
principal_id: Optional[str] = None,
principal_type: Optional[str] = None,
role_definition_id: Optional[str] = None,
role_definition_name: Optional[str] = None,
skip_service_principal_aad_check: Optional[bool] = None) -> RoleAssignment
func GetRoleAssignment(ctx *Context, name string, id IDInput, state *RoleAssignmentState, opts ...ResourceOption) (*RoleAssignment, error)
public static RoleAssignment Get(string name, Input<string> id, RoleAssignmentState? state, CustomResourceOptions? opts = null)
public static RoleAssignment get(String name, Output<String> id, RoleAssignmentState state, CustomResourceOptions options)
resources: _: type: azure:marketplace:RoleAssignment 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.
- Condition string
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- Condition
Version string - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - Delegated
Managed stringIdentity Resource Id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- Description string
- The description for this Role Assignment. Changing this forces a new resource to be created.
- Name string
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- Principal
Id string The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- Principal
Type string - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc. - Role
Definition stringId - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - Role
Definition stringName The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- Skip
Service boolPrincipal Aad Check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
- Condition string
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- Condition
Version string - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - Delegated
Managed stringIdentity Resource Id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- Description string
- The description for this Role Assignment. Changing this forces a new resource to be created.
- Name string
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- Principal
Id string The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- Principal
Type string - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc. - Role
Definition stringId - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - Role
Definition stringName The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- Skip
Service boolPrincipal Aad Check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
- condition String
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- condition
Version String - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - delegated
Managed StringIdentity Resource Id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- description String
- The description for this Role Assignment. Changing this forces a new resource to be created.
- name String
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- principal
Id String The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- principal
Type String - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc. - role
Definition StringId - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - role
Definition StringName The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- skip
Service BooleanPrincipal Aad Check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
- condition string
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- condition
Version string - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - delegated
Managed stringIdentity Resource Id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- description string
- The description for this Role Assignment. Changing this forces a new resource to be created.
- name string
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- principal
Id string The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- principal
Type string - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc. - role
Definition stringId - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - role
Definition stringName The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- skip
Service booleanPrincipal Aad Check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
- condition str
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- condition_
version str - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - delegated_
managed_ stridentity_ resource_ id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- description str
- The description for this Role Assignment. Changing this forces a new resource to be created.
- name str
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- principal_
id str The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- principal_
type str - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc. - role_
definition_ strid - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - role_
definition_ strname The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- skip_
service_ boolprincipal_ aad_ check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
- condition String
- The condition that limits the resources that the role can be assigned to. Changing this forces a new resource to be created.
- condition
Version String - The version of the condition. Possible values are
1.0
or2.0
. Changing this forces a new resource to be created. - delegated
Managed StringIdentity Resource Id The delegated Azure Resource ID which contains a Managed Identity. Changing this forces a new resource to be created.
Note: This field is only used in cross tenant scenarios.
- description String
- The description for this Role Assignment. Changing this forces a new resource to be created.
- name String
- A unique UUID/GUID for this Role Assignment - one will be generated if not specified. Changing this forces a new resource to be created.
- principal
Id String The ID of the Principal (User, Group or Service Principal) to assign the Role Definition to. Changing this forces a new resource to be created.
Note: The Principal ID is also known as the Object ID (i.e. not the "Application ID" for applications). To assign Azure roles, the Principal must have
Microsoft.Authorization/roleAssignments/write
permissions. See documentation for more information.- principal
Type String - The type of the
principal_id
, e.g. User, Group, Service Principal, Application, etc. - role
Definition StringId - The Scoped-ID of the Role Definition. Changing this forces a new resource to be created. Conflicts with
role_definition_name
. - role
Definition StringName The name of a built-in Role. Changing this forces a new resource to be created. Conflicts with
role_definition_id
.Note: To assign
Marketplace Admin
role, the calling Principal must first be assigned Privileged Role Administrator (likeOwner
role) or Global Administrator. See documentation for more information.- skip
Service BooleanPrincipal Aad Check If the
principal_id
is a newly provisionedService Principal
set this value totrue
to skip theAzure Active Directory
check which may fail due to replication lag. This argument is only valid if theprincipal_id
is aService Principal
identity. Defaults tofalse
. Changing this forces a new resource to be created.Note: This field takes effect only when
principal_id
is aService Principal
identity.
Import
Role Assignments can be imported using the resource id
, e.g.
$ pulumi import azure:marketplace/roleAssignment:RoleAssignment example /providers/Microsoft.Marketplace/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000
text
/providers/Microsoft.Marketplace/providers/Microsoft.Authorization/roleAssignments/00000000-0000-0000-0000-000000000000|00000000-0000-0000-0000-000000000000
To learn more about importing existing cloud resources, see Importing resources.
Package Details
- Repository
- Azure Classic pulumi/pulumi-azure
- License
- Apache-2.0
- Notes
- This Pulumi package is based on the
azurerm
Terraform Provider.