forked from Azure/bicep-registry-modules
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: Added unique filter to PSRule results & updated action group use…
…d for testing (Azure#583) ## Description - Added unique filter to PSRule results - Updated action group used for testing (nullable types, location warning) | Pipeline | | - | | [![avm.res.insights.action-group](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.insights.action-group.yml/badge.svg?branch=users%2Falsehr%2FactionGroupPSRule)](https://github.com/AlexanderSehr/bicep-registry-modules/actions/workflows/avm.res.insights.action-group.yml) | Example of a test where I provoked PSRule to fail: ![image](https://github.com/Azure/bicep-registry-modules/assets/5365358/3d9c84f6-d896-4a9a-b296-4345b79c7826) ([source](https://github.com/AlexanderSehr/bicep-registry-modules/actions/runs/6596572027)) --------- Co-authored-by: Erika Gressi <[email protected]>
- Loading branch information
1 parent
6924d09
commit edbd874
Showing
7 changed files
with
177 additions
and
137 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -42,6 +42,20 @@ module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { | |
// Required parameters | ||
groupShortName: 'agiagmin001' | ||
name: 'iagmin001' | ||
// Non-required parameters | ||
armRoleReceivers: '<armRoleReceivers>' | ||
automationRunbookReceivers: '<automationRunbookReceivers>' | ||
azureAppPushReceivers: '<azureAppPushReceivers>' | ||
azureFunctionReceivers: '<azureFunctionReceivers>' | ||
emailReceivers: '<emailReceivers>' | ||
itsmReceivers: '<itsmReceivers>' | ||
location: 'global' | ||
logicAppReceivers: '<logicAppReceivers>' | ||
roleAssignments: '<roleAssignments>' | ||
smsReceivers: '<smsReceivers>' | ||
tags: '<tags>' | ||
voiceReceivers: '<voiceReceivers>' | ||
webhookReceivers: '<webhookReceivers>' | ||
} | ||
} | ||
``` | ||
|
@@ -64,6 +78,46 @@ module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { | |
}, | ||
"name": { | ||
"value": "iagmin001" | ||
}, | ||
// Non-required parameters | ||
"armRoleReceivers": { | ||
"value": "<armRoleReceivers>" | ||
}, | ||
"automationRunbookReceivers": { | ||
"value": "<automationRunbookReceivers>" | ||
}, | ||
"azureAppPushReceivers": { | ||
"value": "<azureAppPushReceivers>" | ||
}, | ||
"azureFunctionReceivers": { | ||
"value": "<azureFunctionReceivers>" | ||
}, | ||
"emailReceivers": { | ||
"value": "<emailReceivers>" | ||
}, | ||
"itsmReceivers": { | ||
"value": "<itsmReceivers>" | ||
}, | ||
"location": { | ||
"value": "global" | ||
}, | ||
"logicAppReceivers": { | ||
"value": "<logicAppReceivers>" | ||
}, | ||
"roleAssignments": { | ||
"value": "<roleAssignments>" | ||
}, | ||
"smsReceivers": { | ||
"value": "<smsReceivers>" | ||
}, | ||
"tags": { | ||
"value": "<tags>" | ||
}, | ||
"voiceReceivers": { | ||
"value": "<voiceReceivers>" | ||
}, | ||
"webhookReceivers": { | ||
"value": "<webhookReceivers>" | ||
} | ||
} | ||
} | ||
|
@@ -98,6 +152,7 @@ module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { | |
useCommonAlertSchema: true | ||
} | ||
] | ||
location: 'global' | ||
roleAssignments: [ | ||
{ | ||
principalId: '<principalId>' | ||
|
@@ -155,6 +210,9 @@ module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { | |
} | ||
] | ||
}, | ||
"location": { | ||
"value": "global" | ||
}, | ||
"roleAssignments": { | ||
"value": [ | ||
{ | ||
|
@@ -201,37 +259,23 @@ module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { | |
groupShortName: 'agiagwaf001' | ||
name: 'iagwaf001' | ||
// Non-required parameters | ||
emailReceivers: [ | ||
{ | ||
emailAddress: '[email protected]' | ||
name: 'TestUser_-EmailAction-' | ||
useCommonAlertSchema: true | ||
} | ||
{ | ||
emailAddress: '[email protected]' | ||
name: 'TestUser2' | ||
useCommonAlertSchema: true | ||
} | ||
] | ||
roleAssignments: [ | ||
{ | ||
principalId: '<principalId>' | ||
principalType: 'ServicePrincipal' | ||
roleDefinitionIdOrName: 'Reader' | ||
} | ||
] | ||
smsReceivers: [ | ||
{ | ||
countryCode: '1' | ||
name: 'TestUser_-SMSAction-' | ||
phoneNumber: '2345678901' | ||
} | ||
] | ||
armRoleReceivers: '<armRoleReceivers>' | ||
automationRunbookReceivers: '<automationRunbookReceivers>' | ||
azureAppPushReceivers: '<azureAppPushReceivers>' | ||
azureFunctionReceivers: '<azureFunctionReceivers>' | ||
emailReceivers: '<emailReceivers>' | ||
itsmReceivers: '<itsmReceivers>' | ||
location: 'global' | ||
logicAppReceivers: '<logicAppReceivers>' | ||
roleAssignments: '<roleAssignments>' | ||
smsReceivers: '<smsReceivers>' | ||
tags: { | ||
Environment: 'Non-Prod' | ||
'hidden-title': 'This is visible in the resource name' | ||
Role: 'DeploymentValidation' | ||
} | ||
voiceReceivers: '<voiceReceivers>' | ||
webhookReceivers: '<webhookReceivers>' | ||
} | ||
} | ||
``` | ||
|
@@ -256,44 +300,48 @@ module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { | |
"value": "iagwaf001" | ||
}, | ||
// Non-required parameters | ||
"armRoleReceivers": { | ||
"value": "<armRoleReceivers>" | ||
}, | ||
"automationRunbookReceivers": { | ||
"value": "<automationRunbookReceivers>" | ||
}, | ||
"azureAppPushReceivers": { | ||
"value": "<azureAppPushReceivers>" | ||
}, | ||
"azureFunctionReceivers": { | ||
"value": "<azureFunctionReceivers>" | ||
}, | ||
"emailReceivers": { | ||
"value": [ | ||
{ | ||
"emailAddress": "[email protected]", | ||
"name": "TestUser_-EmailAction-", | ||
"useCommonAlertSchema": true | ||
}, | ||
{ | ||
"emailAddress": "[email protected]", | ||
"name": "TestUser2", | ||
"useCommonAlertSchema": true | ||
} | ||
] | ||
"value": "<emailReceivers>" | ||
}, | ||
"itsmReceivers": { | ||
"value": "<itsmReceivers>" | ||
}, | ||
"location": { | ||
"value": "global" | ||
}, | ||
"logicAppReceivers": { | ||
"value": "<logicAppReceivers>" | ||
}, | ||
"roleAssignments": { | ||
"value": [ | ||
{ | ||
"principalId": "<principalId>", | ||
"principalType": "ServicePrincipal", | ||
"roleDefinitionIdOrName": "Reader" | ||
} | ||
] | ||
"value": "<roleAssignments>" | ||
}, | ||
"smsReceivers": { | ||
"value": [ | ||
{ | ||
"countryCode": "1", | ||
"name": "TestUser_-SMSAction-", | ||
"phoneNumber": "2345678901" | ||
} | ||
] | ||
"value": "<smsReceivers>" | ||
}, | ||
"tags": { | ||
"value": { | ||
"Environment": "Non-Prod", | ||
"hidden-title": "This is visible in the resource name", | ||
"Role": "DeploymentValidation" | ||
} | ||
}, | ||
"voiceReceivers": { | ||
"value": "<voiceReceivers>" | ||
}, | ||
"webhookReceivers": { | ||
"value": "<webhookReceivers>" | ||
} | ||
} | ||
} | ||
|
@@ -337,35 +385,30 @@ module actionGroup 'br/public:avm-res-insights-actiongroup:1.0.0' = { | |
The list of ARM role receivers that are part of this action group. Roles are Azure RBAC roles and only built-in roles are supported. | ||
- Required: No | ||
- Type: array | ||
- Default: `[]` | ||
|
||
### Parameter: `automationRunbookReceivers` | ||
|
||
The list of AutomationRunbook receivers that are part of this action group. | ||
- Required: No | ||
- Type: array | ||
- Default: `[]` | ||
|
||
### Parameter: `azureAppPushReceivers` | ||
|
||
The list of AzureAppPush receivers that are part of this action group. | ||
- Required: No | ||
- Type: array | ||
- Default: `[]` | ||
|
||
### Parameter: `azureFunctionReceivers` | ||
|
||
The list of function receivers that are part of this action group. | ||
- Required: No | ||
- Type: array | ||
- Default: `[]` | ||
|
||
### Parameter: `emailReceivers` | ||
|
||
The list of email receivers that are part of this action group. | ||
- Required: No | ||
- Type: array | ||
- Default: `[]` | ||
|
||
### Parameter: `enabled` | ||
|
||
|
@@ -392,7 +435,6 @@ The short name of the action group. | |
The list of ITSM receivers that are part of this action group. | ||
- Required: No | ||
- Type: array | ||
- Default: `[]` | ||
|
||
### Parameter: `location` | ||
|
||
|
@@ -406,7 +448,6 @@ Location for all resources. | |
The list of logic app receivers that are part of this action group. | ||
- Required: No | ||
- Type: array | ||
- Default: `[]` | ||
|
||
### Parameter: `name` | ||
|
||
|
@@ -487,28 +528,24 @@ Required. The name of the role to assign. If it cannot be found you can specify | |
The list of SMS receivers that are part of this action group. | ||
- Required: No | ||
- Type: array | ||
- Default: `[]` | ||
|
||
### Parameter: `tags` | ||
|
||
Tags of the resource. | ||
- Required: No | ||
- Type: object | ||
- Default: `{object}` | ||
|
||
### Parameter: `voiceReceivers` | ||
|
||
The list of voice receivers that are part of this action group. | ||
- Required: No | ||
- Type: array | ||
- Default: `[]` | ||
|
||
### Parameter: `webhookReceivers` | ||
|
||
The list of webhook receivers that are part of this action group. | ||
- Required: No | ||
- Type: array | ||
- Default: `[]` | ||
|
||
|
||
## Outputs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.