Skip to content

Commit

Permalink
fix: static validation error and BCP error in `avm.res.dev-ops-infras…
Browse files Browse the repository at this point in the history
…tructure.pool` (Azure#3333)

## Description

This pull request fixes the following:
* The static validation is now passing, fixed by rerunning the
Set-AVMModule command
* BCP error regarding a property/parameter that cannot be null - fixed
this by making it required

Tagging @matebarabas @AlexanderSehr 

## Pipeline Reference

<!-- Insert your Pipeline Status Badge below -->

| Pipeline |
| -------- |
|
[![avm.res.dev-ops-infrastructure.pool](https://github.com/johnlokerse/bicep-registry-modules/actions/workflows/avm.res.dev-ops-infrastructure.pool.yml/badge.svg?branch=johnlokerse%2Ffix-staticvalidation-mdp)](https://github.com/johnlokerse/bicep-registry-modules/actions/workflows/avm.res.dev-ops-infrastructure.pool.yml)
|

## Type of Change

<!-- Use the checkboxes [x] on the options that are relevant. -->

- [x] Update to CI Environment or utilities (Non-module affecting
changes)
- [x] Azure Verified Module updates:
- [ ] Bugfix containing backwards-compatible bug fixes, and I have NOT
bumped the MAJOR or MINOR version in `version.json`:
- [ ] Someone has opened a bug report issue, and I have included "Closes
#{bug_report_issue_number}" in the PR description.
- [ ] The bug was found by the module author, and no one has opened an
issue to report it yet.
- [ ] Feature update backwards compatible feature updates, and I have
bumped the MINOR version in `version.json`.
- [ ] Breaking changes and I have bumped the MAJOR version in
`version.json`.
  - [x] Update to documentation

## Checklist

- [x] I'm sure there are no other open Pull Requests for the same
update/change
- [x] I have run `Set-AVMModule` locally to generate the supporting
module files.
- [x] My corresponding pipelines / checks run clean and green without
any errors or warnings

<!-- Please keep up to date with the contribution guide at
https://aka.ms/avm/contribute/bicep -->

---------

Co-authored-by: Erika Gressi <[email protected]>
  • Loading branch information
johnlokerse and eriqua authored Sep 19, 2024
1 parent c447185 commit f1d14ed
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 24 deletions.
41 changes: 23 additions & 18 deletions avm/res/dev-ops-infrastructure/pool/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ This module deploys the Managed DevOps Pool resource.
- [Usage examples](#Usage-examples)
- [Parameters](#Parameters)
- [Outputs](#Outputs)
- [Cross-referenced modules](#Cross-referenced-modules)
- [Notes](#Notes)
- [Data Collection](#Data-Collection)

## Resource Types
Expand All @@ -20,10 +20,6 @@ This module deploys the Managed DevOps Pool resource.
| `Microsoft.DevOpsInfrastructure/pools` | [2024-04-04-preview](https://learn.microsoft.com/en-us/azure/templates) |
| `Microsoft.Insights/diagnosticSettings` | [2021-05-01-preview](https://learn.microsoft.com/en-us/azure/templates/Microsoft.Insights/2021-05-01-preview/diagnosticSettings) |

## Notes

The Managed DevOps Pool resource requires external permissions in Azure DevOps. Make sure that the deployment principal has permission in Azure DevOps: [Managed DevOps Pools - Verify Azure DevOps Permissions](https://learn.microsoft.com/en-us/azure/devops/managed-devops-pools/prerequisites?view=azure-devops&tabs=azure-portal#verify-azure-devops-permissions)

## Usage examples

The following section provides usage examples for the module, which were used to validate and deploy the module successfully. For a full reference, please review the module's test folder in its repository.
Expand Down Expand Up @@ -544,7 +540,6 @@ module pool 'br/public:avm/res/dev-ops-infrastructure/pool:<version>' = {
</details>
<p>


## Parameters

**Required parameters**
Expand Down Expand Up @@ -739,26 +734,24 @@ The type of permission which determines which accounts are admins on the Azure D
- Required: No
- Type: object

**Optional parameters**
**Required parameters**

| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`groups`](#parameter-organizationprofilepermissionprofilegroups) | array | Group email addresses. |
| [`kind`](#parameter-organizationprofilepermissionprofilekind) | string | Determines who has admin permissions to the Azure DevOps pool. |
| [`users`](#parameter-organizationprofilepermissionprofileusers) | array | User email addresses. |

### Parameter: `organizationProfile.permissionProfile.groups`

Group email addresses.
**Optional parameters**

- Required: No
- Type: array
| Parameter | Type | Description |
| :-- | :-- | :-- |
| [`groups`](#parameter-organizationprofilepermissionprofilegroups) | array | Group email addresses. |
| [`users`](#parameter-organizationprofilepermissionprofileusers) | array | User email addresses. |

### Parameter: `organizationProfile.permissionProfile.kind`

Determines who has admin permissions to the Azure DevOps pool.

- Required: No
- Required: Yes
- Type: string
- Allowed:
```Bicep
Expand All @@ -769,6 +762,13 @@ Determines who has admin permissions to the Azure DevOps pool.
]
```

### Parameter: `organizationProfile.permissionProfile.groups`

Group email addresses.

- Required: No
- Type: array

### Parameter: `organizationProfile.permissionProfile.users`

User email addresses.
Expand Down Expand Up @@ -1104,6 +1104,12 @@ Array of role assignments to create.

- Required: No
- Type: array
- Roles configurable by name:
- `'Contributor'`
- `'Owner'`
- `'Reader'`
- `'Role Based Access Control Administrator (Preview)'`
- `'User Access Administrator'`

**Required parameters**

Expand Down Expand Up @@ -1300,7 +1306,6 @@ Tags of the resource.
- Required: No
- Type: object


## Outputs

| Output | Type | Description |
Expand All @@ -1311,9 +1316,9 @@ Tags of the resource.
| `resourceId` | string | The resource ID of the Managed DevOps Pool. |
| `systemAssignedMIPrincipalId` | string | The principal ID of the system assigned identity. |

## Cross-referenced modules
## Notes

_None_
The Managed DevOps Pool resource requires external permissions in Azure DevOps. Make sure that the deployment principal has permission in Azure DevOps: [Managed DevOps Pools - Verify Azure DevOps Permissions](https://learn.microsoft.com/en-us/azure/devops/managed-devops-pools/prerequisites?view=azure-devops&tabs=azure-portal#verify-azure-devops-permissions)

## Data Collection

Expand Down
4 changes: 2 additions & 2 deletions avm/res/dev-ops-infrastructure/pool/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -292,8 +292,8 @@ type organizationProfileType = {

@description('Optional. The type of permission which determines which accounts are admins on the Azure DevOps pool.')
permissionProfile: {
@description('Optional. Determines who has admin permissions to the Azure DevOps pool.')
kind: ('CreatorOnly' | 'Inherit' | 'SpecificAccounts')?
@description('Required. Determines who has admin permissions to the Azure DevOps pool.')
kind: 'CreatorOnly' | 'Inherit' | 'SpecificAccounts'

@description('Optional. Group email addresses.')
groups: string[]?
Expand Down
7 changes: 3 additions & 4 deletions avm/res/dev-ops-infrastructure/pool/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
"metadata": {
"_generator": {
"name": "bicep",
"version": "0.29.47.4906",
"templateHash": "9138966756251042726"
"version": "0.30.3.12046",
"templateHash": "15191897376801297199"
},
"name": "Managed DevOps Pool",
"description": "This module deploys the Managed DevOps Pool resource.",
Expand Down Expand Up @@ -189,9 +189,8 @@
"Inherit",
"SpecificAccounts"
],
"nullable": true,
"metadata": {
"description": "Optional. Determines who has admin permissions to the Azure DevOps pool."
"description": "Required. Determines who has admin permissions to the Azure DevOps pool."
}
},
"groups": {
Expand Down

0 comments on commit f1d14ed

Please sign in to comment.