Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 5 additions & 10 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,11 @@ resource feedbackTable 'Microsoft.Storage/storageAccounts/tableServices/tables@2
name: 'explanations'
}

// Storage Table Data Contributor for the container app's managed identity
resource feedbackWriter 'Microsoft.Authorization/roleAssignments@2022-04-01' = {
name: guid(feedbackStorage.id, containerApp.id, 'table-data-contributor')
scope: feedbackStorage
properties: {
roleDefinitionId: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '0a9a7e1f-b9d0-4cc4-a60d-0319b160aebd')
principalId: containerApp.identity.principalId
principalType: 'ServicePrincipal'
}
}
// The container app writes with its managed identity. Its Storage Table Data Contributor role on
// this account is assigned by hand: the deploy principal is Contributor and may not write role
// assignments. Once, after the first deploy that creates the account:
// az role assignment create --role "Storage Table Data Contributor" --scope <feedbackStorage.id> \
// --assignee-object-id <containerApp.identity.principalId> --assignee-principal-type ServicePrincipal

@description('Custom hostname served by the container app')
param customHostname string = 'optimizer.evcc.io'
Expand Down
Loading