Skip to content
Merged
Show file tree
Hide file tree
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
3 changes: 1 addition & 2 deletions .github/workflows/ms.powerbidedicated.capacities.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,7 @@ jobs:
- name: 'Using test file [${{ matrix.moduleTestFilePaths }}]'
uses: ./.github/actions/templates/validateModuleDeployment
with:
templateFilePath: '${{ env.modulePath }}/deploy.bicep'
parameterFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}'
templateFilePath: '${{ env.modulePath }}/${{ matrix.moduleTestFilePaths }}'
location: '${{ env.location }}'
resourceGroupName: '${{ env.resourceGroupName }}'
subscriptionId: '${{ secrets.ARM_SUBSCRIPTION_ID }}'
Expand Down
6 changes: 3 additions & 3 deletions SUPPORT.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Microsoft Support Policy

If issues are encountered when deploying these Bicep modules users will be able to engage Microsoft support via their usual channels. Please provide corelation IDs where possible when contacting support to be able to investigate the issue effectively and in a timely fashion. For instructions on how to get deployments and correlation ID, please follow this link [here](https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-history?tabs=azure-portal#get-deployments-and-correlation-id).
If issues are encountered when deploying these Bicep modules users will be able to engage Microsoft support via their usual channels. Please provide correlation IDs where possible when contacting support to be able to investigate the issue effectively and in a timely fashion. For instructions on how to get deployments and correlation ID, please follow this link [here](https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/deployment-history?tabs=azure-portal#get-deployments-and-correlation-id).

Following list of issues are within the scope of Microsoft support:

Expand All @@ -22,7 +22,7 @@ Project maintainers will aim to respond to new issues on a best effort basis.

This project uses GitHub Issues to track bugs and feature requests. Please search the existing issues before filing new issues to avoid duplicates. For new issues, file your bug or feature request as a new Issue.

For help and questions about using this project, please submit a Github issue with corresponding [Issue Labels found here](https://github.com/Azure/ResourceModules/labels).
For help and questions about using this project, please submit a GitHub issue with corresponding [Issue Labels found here](https://github.com/Azure/ResourceModules/labels).


<!-- Local -->
Expand All @@ -32,5 +32,5 @@ For help and questions about using this project, please submit a Github issue wi
[GitHubIssues]: <https://github.com/Azure/Modules/issues>
[Contributing]: CONTRIBUTING.md
[AzureIcon]: docs/media/MicrosoftAzure-32px.png
[PowershellIcon]: docs/media/MicrosoftPowerShellCore-32px.png
[PowerShellIcon]: docs/media/MicrosoftPowerShellCore-32px.png
[BashIcon]: docs/media/Bash_Logo_black_and_white_icon_only-32px.svg.png
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@description('Optional. The location to deploy to.')
param location string = resourceGroup().location

@description('Required. The name of the Managed Identity to create.')
param managedIdentityName string

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
name: managedIdentityName
location: location
}

@description('The principal ID of the created Managed Identity.')
output managedIdentityPrincipalId string = managedIdentity.properties.principalId

Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
targetScope = 'subscription'

// ========== //
// Parameters //
// ========== //
@description('Optional. The name of the resource group to deploy for testing purposes.')
@maxLength(90)
param resourceGroupName string = 'ms.powerbidedicated.capacities-${serviceShort}-rg'

@description('Optional. The location to deploy resources to.')
param location string = deployment().location

@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.')
param serviceShort string = 'pbdcapcom'

// =========== //
// Deployments //
// =========== //

// General resources
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: location
}

module resourceGroupResources 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-paramNested'
params: {
managedIdentityName: 'dep-<<namePrefix>>-msi-${serviceShort}'
}
}

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
skuCapacity: 1
lock: 'CanNotDelete'
members: [
resourceGroupResources.outputs.managedIdentityPrincipalId
]
roleAssignments: [
{
roleDefinitionIdOrName: 'Reader'
principalIds: [
resourceGroupResources.outputs.managedIdentityPrincipalId
]
principalType: 'ServicePrincipal'
}
]
tags: {
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
@description('Optional. The location to deploy to.')
param location string = resourceGroup().location

@description('Required. The name of the Managed Identity to create.')
param managedIdentityName string

resource managedIdentity 'Microsoft.ManagedIdentity/userAssignedIdentities@2018-11-30' = {
name: managedIdentityName
location: location
}

@description('The principal ID of the created Managed Identity.')
output managedIdentityPrincipalId string = managedIdentity.properties.principalId

Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
targetScope = 'subscription'

// ========== //
// Parameters //
// ========== //
@description('Optional. The name of the resource group to deploy for testing purposes.')
@maxLength(90)
param resourceGroupName string = 'ms.powerbidedicated.capacities-${serviceShort}-rg'

@description('Optional. The location to deploy resources to.')
param location string = deployment().location

@description('Optional. A short identifier for the kind of deployment. Should be kept short to not run into resource-name length-constraints.')
param serviceShort string = 'pbdcapmin'

// =========== //
// Deployments //
// =========== //

// General resources
// =================
resource resourceGroup 'Microsoft.Resources/resourceGroups@2021-04-01' = {
name: resourceGroupName
location: location
}

module resourceGroupResources 'dependencies.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name, location)}-paramNested'
params: {
managedIdentityName: 'dep-<<namePrefix>>-msi-${serviceShort}'
}
}

// ============== //
// Test Execution //
// ============== //

module testDeployment '../../deploy.bicep' = {
scope: resourceGroup
name: '${uniqueString(deployment().name)}-test-${serviceShort}'
params: {
name: '<<namePrefix>>${serviceShort}001'
skuCapacity: 1
members: [
resourceGroupResources.outputs.managedIdentityPrincipalId
]
}
}
99 changes: 93 additions & 6 deletions modules/Microsoft.PowerBIDedicated/capacities/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -161,21 +161,108 @@ The following module usage examples are retrieved from the content of the files

>**Note**: Each example lists all the required parameters first, followed by the rest - each in alphabetical order.

<h3>Example 1: Min</h3>
<h3>Example 1: Common</h3>

<details>

<summary>via Bicep module</summary>

```bicep
module capacities './Microsoft.PowerBIDedicated/capacities/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-Capacities'
name: '${uniqueString(deployment().name)}-test-pbdcapcom'
params: {
// Required parameters
members: [
'<<deploymentSpId>>'
'<managedIdentityPrincipalId>'
]
name: '<<namePrefix>>azpbid001'
name: '<<namePrefix>>pbdcapcom001'
skuCapacity: 1
// Non-required parameters
lock: 'CanNotDelete'
roleAssignments: [
{
principalIds: [
'<managedIdentityPrincipalId>'
]
principalType: 'ServicePrincipal'
roleDefinitionIdOrName: 'Reader'
}
]
tags: {
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
}
}
}
```

</details>
<p>

<details>

<summary>via JSON Parameter file</summary>

```json
{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
// Required parameters
"members": {
"value": [
"<managedIdentityPrincipalId>"
]
},
"name": {
"value": "<<namePrefix>>pbdcapcom001"
},
"skuCapacity": {
"value": 1
},
// Non-required parameters
"lock": {
"value": "CanNotDelete"
},
"roleAssignments": {
"value": [
{
"principalIds": [
"<managedIdentityPrincipalId>"
],
"principalType": "ServicePrincipal",
"roleDefinitionIdOrName": "Reader"
}
]
},
"tags": {
"value": {
"Environment": "Non-Prod",
"Role": "DeploymentValidation"
}
}
}
}
```

</details>
<p>

<h3>Example 2: Min</h3>

<details>

<summary>via Bicep module</summary>

```bicep
module capacities './Microsoft.PowerBIDedicated/capacities/deploy.bicep' = {
name: '${uniqueString(deployment().name)}-test-pbdcapmin'
params: {
// Required parameters
members: [
'<managedIdentityPrincipalId>'
]
name: '<<namePrefix>>pbdcapmin001'
skuCapacity: 1
}
}
Expand All @@ -196,11 +283,11 @@ module capacities './Microsoft.PowerBIDedicated/capacities/deploy.bicep' = {
// Required parameters
"members": {
"value": [
"<<deploymentSpId>>"
"<managedIdentityPrincipalId>"
]
},
"name": {
"value": "<<namePrefix>>azpbid001"
"value": "<<namePrefix>>pbdcapmin001"
},
"skuCapacity": {
"value": 1
Expand Down