Open
Description
Library name and version
Azure.Provisioning 1.0.0
Describe the bug
The CosmosDBSqlRoleAssignment
type defined in the library doesn't expose a setter for the Name
property, making it impossible to set on an instantiated type.
Expected behavior
Name
should be a settable property on the resource.
Actual behavior
Calling the following:
var roleAssignment = new CosmosDBSqlRoleAssignment(Infrastructure.NormalizeBicepIdentifier("roleAssignment"))
{
PrincipalId = principalIdParameter,
Scope = cosmosDbAccount.Id,
Parent = cosmosDbAccount,
};
will produce incomplete bicep:
resource roleAssignment 'Microsoft.DocumentDB/databaseAccounts/sqlRoleAssignments@2024-08-15' = {
properties: {
principalId: principalId
scope: cosmosdb.id
}
parent: cosmosdb
}
Reproduction Steps
var roleAssignment = new CosmosDBSqlRoleAssignment(Infrastructure.NormalizeBicepIdentifier("roleAssignment"))
{
PrincipalId = principalIdParameter,
Scope = cosmosDbAccount.Id,
Parent = cosmosDbAccount,
};
Environment
No response