Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Modules] New module Microsoft.Insights webtests #3042

Merged
merged 63 commits into from
Apr 3, 2023
Merged
Show file tree
Hide file tree
Changes from 11 commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
e861360
Update settings.yml
shaban-khan Mar 6, 2023
c8a6b60
Merge branch 'Azure:main' into main
shaban-khan Mar 15, 2023
fb4a8fb
EventGrid DomainTopic module added
shaban-khan Mar 16, 2023
ed67126
DomaintTopics module's readme.md file update
shaban-khan Mar 16, 2023
8382a54
Update modules/Microsoft.EventGrid/domainTopics/readme.md
shaban-khan Mar 16, 2023
f7c5d13
Update modules/Microsoft.EventGrid/domainTopics/readme.md
shaban-khan Mar 16, 2023
fdda50e
Update settings.yml
shaban-khan Mar 16, 2023
87391d6
Update settings.yml
shaban-khan Mar 16, 2023
6cee8bb
Update modules/Microsoft.EventGrid/domainTopics/.test/common/dependen…
shaban-khan Mar 16, 2023
d815e44
updated role assigment code
shaban-khan Mar 16, 2023
34fdb81
Added Topics module under Domainst
shaban-khan Mar 17, 2023
4d58404
Service connection updated
shaban-khan Mar 17, 2023
c3d5989
updated service connetion
shaban-khan Mar 17, 2023
14ea0bb
Update modules/Microsoft.EventGrid/domains/topics/deploy.bicep
shaban-khan Mar 17, 2023
04adb55
Update modules/Microsoft.EventGrid/domains/topics/deploy.bicep
shaban-khan Mar 17, 2023
da7bdc4
Update modules/Microsoft.EventGrid/domains/deploy.bicep
shaban-khan Mar 17, 2023
226deec
Update modules/Microsoft.EventGrid/domains/topics/readme.md
shaban-khan Mar 17, 2023
9084d66
Update modules/Microsoft.EventGrid/domains/topics/readme.md
shaban-khan Mar 17, 2023
811539e
Update modules/Microsoft.EventGrid/domainTopics/.bicep/nested_roleAss…
shaban-khan Mar 17, 2023
2883010
Update modules/Microsoft.EventGrid/domainTopics/.bicep/nested_roleAss…
shaban-khan Mar 17, 2023
5d2a14c
Update modules/Microsoft.EventGrid/domainTopics/.bicep/nested_roleAss…
shaban-khan Mar 17, 2023
b7801c5
Update topics child module
shaban-khan Mar 17, 2023
e58bdaf
update
shaban-khan Mar 17, 2023
503f69f
update
shaban-khan Mar 17, 2023
403e1d9
update
shaban-khan Mar 20, 2023
86156ba
Try to fix issue in domains module
shaban-khan Mar 20, 2023
55148a9
service connection update
shaban-khan Mar 20, 2023
d1a8131
update
shaban-khan Mar 20, 2023
1ece2c7
updated settings.yml file
shaban-khan Mar 21, 2023
f7d1d61
added new module webTests
shaban-khan Mar 23, 2023
56885ee
Update modules/Microsoft.EventGrid/domains/deploy.bicep
shaban-khan Mar 27, 2023
41553a9
Update modules/Microsoft.Insights/webTests/readme.md
shaban-khan Mar 27, 2023
c35ca7e
Update modules/Microsoft.Insights/webTests/readme.md
shaban-khan Mar 27, 2023
1dc40a9
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Mar 27, 2023
8b2b704
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Mar 27, 2023
dc63823
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Mar 27, 2023
0a118d4
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Mar 27, 2023
3eff405
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Mar 27, 2023
2147779
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Mar 27, 2023
0f995d3
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Mar 27, 2023
742fa4e
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Mar 27, 2023
c0d8625
Update modules/Microsoft.Insights/webTests/.test/min/deploy.test.bicep
shaban-khan Mar 27, 2023
bf31d50
Update modules/Microsoft.Insights/webTests/.test/min/dependencies.bicep
shaban-khan Mar 27, 2023
4e4168e
Merge branch 'Azure:main' into main
shaban-khan Mar 27, 2023
221c25c
updated the moduel as per PR comment
shaban-khan Mar 27, 2023
b6e04d8
updated readme.md file
shaban-khan Mar 27, 2023
836acf6
updated topics module as per comment in PR
shaban-khan Mar 27, 2023
cfe44d8
update the setting.yaml file
shaban-khan Mar 27, 2023
b328c66
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Mar 28, 2023
ee0a434
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Mar 28, 2023
4dd5ae3
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Mar 28, 2023
36e2078
Updated as per PR comment
shaban-khan Mar 28, 2023
cb8cafa
updated the module
shaban-khan Mar 28, 2023
ab343d2
Update modules/Microsoft.Insights/webTests/deploy.bicep
shaban-khan Apr 3, 2023
37639b1
Updated module's Tag description
shaban-khan Apr 3, 2023
087a7c6
Updated readme.md file
shaban-khan Apr 3, 2023
28efcfc
Updated readme.md file
shaban-khan Apr 3, 2023
423e37b
setting.yml file updated
shaban-khan Apr 3, 2023
1d72be2
updated setting.yml file
shaban-khan Apr 3, 2023
10dc57d
Update modules/Microsoft.Insights/webTests/.test/min/deploy.test.bicep
shaban-khan Apr 3, 2023
182612b
Updated readme.md file
shaban-khan Apr 3, 2023
62a82d6
updated service connection
shaban-khan Apr 3, 2023
90bcca3
Update settings.yml
shaban-khan Apr 3, 2023
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
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ var builtInRoleNames = {
'Cognitive Services User': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a97b65f3-24c7-4388-baec-2e87135dc908')
'Collaborative Data Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'daa9e50b-21df-454c-94a6-a8050adab352')
'Collaborative Runtime Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '7a6f0e70-c033-4fb1-828c-08514e5f4102')
'ContainerApp Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'ad2dd5fb-cd4b-4fd4-a9b6-4fed3630980b')
Contributor: subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'b24988ac-6180-42a0-ab88-20f7382dd24c')
'Cosmos DB Account Reader Role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'fbdf93bf-df7d-467e-a4d2-9458aa1360c8')
'Cosmos DB Operator': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '230815da-be43-4aae-9cb4-875f7bd000aa')
Expand Down Expand Up @@ -124,6 +125,8 @@ var builtInRoleNames = {
'Load Test Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '749a398d-560b-491b-bb21-08924219302e')
'Load Test Owner': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '45bb0b16-2f0c-4e78-afaa-a07599b003f6')
'Load Test Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '3ae3fb29-0000-4ccd-bf80-542e7b26e081')
'LocalNGFirewallAdministrator role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'a8835c7d-b5cb-47fa-b6f0-65ea10ce07a2')
'LocalRulestacksAdministrator role': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', 'bfc3b73d-c6ff-45eb-9a5f-40298295bf20')
'Log Analytics Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '92aaf0da-9dab-42b6-94a3-d43ce8d16293')
'Log Analytics Reader': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '73c42c96-874c-492b-b04d-ab87d138a893')
'Logic App Contributor': subscriptionResourceId('Microsoft.Authorization/roleDefinitions', '87a39d53-fc1b-424a-814c-f7e04687dc9e')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ module testDeployment '../../deploy.bicep' = {
enableDefaultTelemetry: enableDefaultTelemetry
webTestName: 'wt<<namePrefix>>$${serviceShort}001'
syntheticMonitorId: '<<namePrefix>>${serviceShort}001'
webTestGeolocation: [
locations: [
{
Id: 'emea-nl-ams-azr'
}
Expand Down
AlexanderSehr marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,8 @@ module testDeployment '../../deploy.bicep' = {
params: {
AlexanderSehr marked this conversation as resolved.
Show resolved Hide resolved
name: '<<namePrefix>>${serviceShort}001'
tags: {
Environment: 'Non-Prod'
Role: 'DeploymentValidation'
shaban-khan marked this conversation as resolved.
Show resolved Hide resolved
'hidden-link:${nestedDependencies.outputs.appInsightResourceId}': 'Resource'
}
enableDefaultTelemetry: enableDefaultTelemetry
Expand Down
55 changes: 28 additions & 27 deletions modules/Microsoft.Insights/webTests/deploy.bicep
Original file line number Diff line number Diff line change
@@ -1,34 +1,34 @@
@description('Required. Name of the webtest.')
@sys.description('Required. Name of the webtest.')
param name string

@description('Required. User defined name if this WebTest.')
@sys.description('Required. User defined name if this WebTest.')
param webTestName string

AlexanderSehr marked this conversation as resolved.
Show resolved Hide resolved
@description('Optional. Tags of the resource.')
param tags object = {}
@sys.description('Required. A single hidden-link tag pointing to an existing AI component is required.')
param tags object

@description('Required. The collection of request properties.')
@sys.description('Required. The collection of request properties.')
param request object

@description('Optional. Location for all Resources.')
@sys.description('Optional. Location for all Resources.')
param location string = resourceGroup().location

@description('Optional. User defined description for this WebTest.')
param descriptionWebTest string = ''
@sys.description('Optional. User defined description for this WebTest.')
param description string = ''

@description('Optional. Unique ID of this WebTest.')
@sys.description('Optional. Unique ID of this WebTest.')
param syntheticMonitorId string = name

@description('Optional. The kind of WebTest that this web test watches.')
@sys.description('Optional. The kind of WebTest that this web test watches.')
@allowed([
'multistep'
'ping'
'standard'
])
param kind string = 'standard'

@description('Optional. List of where to physically run the tests from to give global coverage for accessibility of your application.')
param webTestGeolocation array = [
@sys.description('Optional. List of where to physically run the tests from to give global coverage for accessibility of your application.')
param locations array = [
{
Id: 'us-il-ch1-azr'
}
Expand All @@ -46,36 +46,36 @@ param webTestGeolocation array = [
}
]

@description('Optional. Is the test actively being monitored.')
@sys.description('Optional. Is the test actively being monitored.')
param enabled bool = true

@description('Optional. Interval in seconds between test runs for this WebTest.')
@sys.description('Optional. Interval in seconds between test runs for this WebTest.')
param frequency int = 300

@description('Optional. Seconds until this WebTest will timeout and fail.')
@sys.description('Optional. Seconds until this WebTest will timeout and fail.')
param timeout int = 30

@description('Optional. Allow for retries should this WebTest fail.')
@sys.description('Optional. Allow for retries should this WebTest fail.')
param retryEnabled bool = true

@description('Optional. The collection of validation rule properties.')
@sys.description('Optional. The collection of validation rule properties.')
param validationRules object = {}

@description('Optional. An XML configuration specification for a WebTest.')
@sys.description('Optional. An XML configuration specification for a WebTest.')
param configuration object = {}

@allowed([
''
'CanNotDelete'
'ReadOnly'
])
@description('Optional. Specify the type of lock.')
@sys.description('Optional. Specify the type of lock.')
param lock string = ''

@description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalId\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
@sys.description('Optional. Array of role assignment objects that contain the \'roleDefinitionIdOrName\' and \'principalId\' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: \'/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11\'.')
param roleAssignments array = []

@description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
@sys.description('Optional. Enable telemetry via a Globally Unique Identifier (GUID).')
param enableDefaultTelemetry bool = true

resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (enableDefaultTelemetry) {
Expand All @@ -89,15 +89,16 @@ resource defaultTelemetry 'Microsoft.Resources/deployments@2021-04-01' = if (ena
}
}
}

resource webtest 'Microsoft.Insights/webtests@2022-06-15' = {
shaban-khan marked this conversation as resolved.
Show resolved Hide resolved
name: name
location: location
tags: tags
properties: {
Kind: kind
Locations: webTestGeolocation
Locations: locations
Name: webTestName
Description: descriptionWebTest
Description: description
SyntheticMonitorId: syntheticMonitorId
Enabled: enabled
Frequency: frequency
Expand Down Expand Up @@ -131,14 +132,14 @@ module webtest_roleAssignments '.bicep/nested_roleAssignments.bicep' = [for (rol
}
}]

@description('The name of the webtest.')
@sys.description('The name of the webtest.')
output name string = webtest.name

@description('The resource ID of the webtest.')
@sys.description('The resource ID of the webtest.')
output resourceId string = webtest.id

@description('The resource group the resource was deployed into.')
@sys.description('The resource group the resource was deployed into.')
output resourceGroupName string = resourceGroup().name

@description('The location the resource was deployed into.')
@sys.description('The location the resource was deployed into.')
output location string = webtest.location
62 changes: 33 additions & 29 deletions modules/Microsoft.Insights/webTests/readme.md
eriqua marked this conversation as resolved.
Show resolved Hide resolved
Original file line number Diff line number Diff line change
Expand Up @@ -26,27 +26,27 @@ This module deploys Web Tests.
| :-- | :-- | :-- |
| `name` | string | Name of the webtest. |
| `request` | object | The collection of request properties. |
| `tags` | object | A single hidden-link tag pointing to an existing AI component is required. |
| `webTestName` | string | User defined name if this WebTest. |

**Optional parameters**

| Parameter Name | Type | Default Value | Allowed Values | Description |
| :-- | :-- | :-- | :-- | :-- |
| `configuration` | object | `{object}` | | An XML configuration specification for a WebTest. |
| `descriptionWebTest` | string | `''` | | User defined description for this WebTest. |
| `description` | string | `''` | | User defined description for this WebTest. |
| `enabled` | bool | `True` | | Is the test actively being monitored. |
| `enableDefaultTelemetry` | bool | `True` | | Enable telemetry via a Globally Unique Identifier (GUID). |
| `frequency` | int | `300` | | Interval in seconds between test runs for this WebTest. |
| `kind` | string | `'standard'` | `[multistep, ping, standard]` | The kind of WebTest that this web test watches. |
| `location` | string | `[resourceGroup().location]` | | Location for all Resources. |
| `locations` | array | `[System.Management.Automation.OrderedHashtable, System.Management.Automation.OrderedHashtable, System.Management.Automation.OrderedHashtable, System.Management.Automation.OrderedHashtable, System.Management.Automation.OrderedHashtable]` | | List of where to physically run the tests from to give global coverage for accessibility of your application. |
| `lock` | string | `''` | `['', CanNotDelete, ReadOnly]` | Specify the type of lock. |
| `retryEnabled` | bool | `True` | | Allow for retries should this WebTest fail. |
| `roleAssignments` | array | `[]` | | Array of role assignment objects that contain the 'roleDefinitionIdOrName' and 'principalId' to define RBAC role assignments on this resource. In the roleDefinitionIdOrName attribute, you can provide either the display name of the role definition, or its fully qualified ID in the following format: '/providers/Microsoft.Authorization/roleDefinitions/c2f4ef07-c644-48eb-af81-4b1b4947fb11'. |
| `syntheticMonitorId` | string | `[parameters('name')]` | | Unique ID of this WebTest. |
| `tags` | object | `{object}` | | Tags of the resource. |
| `timeout` | int | `30` | | Seconds until this WebTest will timeout and fail. |
| `validationRules` | object | `{object}` | | The collection of validation rule properties. |
| `webTestGeolocation` | array | `[System.Management.Automation.OrderedHashtable, System.Management.Automation.OrderedHashtable, System.Management.Automation.OrderedHashtable, System.Management.Automation.OrderedHashtable, System.Management.Automation.OrderedHashtable]` | | List of where to physically run the tests from to give global coverage for accessibility of your application. |


### Parameter Usage: `roleAssignments`
Expand Down Expand Up @@ -185,19 +185,19 @@ module webTests './Microsoft.Insights/webTests/deploy.bicep' = {
HttpVerb: 'GET'
RequestUrl: 'https://learn.microsoft.com/en-us/'
}
webTestName: 'wt<<namePrefix>>$iwtcom001'
// Non-required parameters
enableDefaultTelemetry: '<enableDefaultTelemetry>'
lock: 'CanNotDelete'
syntheticMonitorId: '<<namePrefix>>iwtcom001'
tags: {
'hidden-link:${nestedDependencies.outputs.appInsightResourceId}': 'Resource'
}
webTestGeolocation: [
webTestName: 'wt<<namePrefix>>$iwtcom001'
// Non-required parameters
enableDefaultTelemetry: '<enableDefaultTelemetry>'
locations: [
{
Id: 'emea-nl-ams-azr'
}
]
lock: 'CanNotDelete'
syntheticMonitorId: '<<namePrefix>>iwtcom001'
}
}
```
Expand All @@ -224,30 +224,30 @@ module webTests './Microsoft.Insights/webTests/deploy.bicep' = {
"RequestUrl": "https://learn.microsoft.com/en-us/"
}
},
"tags": {
"value": {
"hidden-link:${nestedDependencies.outputs.appInsightResourceId}": "Resource"
}
},
"webTestName": {
"value": "wt<<namePrefix>>$iwtcom001"
},
// Non-required parameters
"enableDefaultTelemetry": {
"value": "<enableDefaultTelemetry>"
},
"lock": {
"value": "CanNotDelete"
},
"syntheticMonitorId": {
"value": "<<namePrefix>>iwtcom001"
},
"tags": {
"value": {
"hidden-link:${nestedDependencies.outputs.appInsightResourceId}": "Resource"
}
},
"webTestGeolocation": {
"locations": {
"value": [
{
"Id": "emea-nl-ams-azr"
}
]
},
"lock": {
"value": "CanNotDelete"
},
"syntheticMonitorId": {
"value": "<<namePrefix>>iwtcom001"
}
}
}
Expand All @@ -272,12 +272,14 @@ module webTests './Microsoft.Insights/webTests/deploy.bicep' = {
HttpVerb: 'GET'
RequestUrl: 'https://learn.microsoft.com/en-us/'
}
webTestName: 'wt<<namePrefix>>$iwtmin001'
// Non-required parameters
enableDefaultTelemetry: '<enableDefaultTelemetry>'
tags: {
Environment: 'Non-Prod'
'hidden-link:${nestedDependencies.outputs.appInsightResourceId}': 'Resource'
Role: 'DeploymentValidation'
}
webTestName: 'wt<<namePrefix>>$iwtmin001'
// Non-required parameters
enableDefaultTelemetry: '<enableDefaultTelemetry>'
}
}
```
Expand All @@ -304,17 +306,19 @@ module webTests './Microsoft.Insights/webTests/deploy.bicep' = {
"RequestUrl": "https://learn.microsoft.com/en-us/"
}
},
"tags": {
"value": {
"Environment": "Non-Prod",
"hidden-link:${nestedDependencies.outputs.appInsightResourceId}": "Resource",
"Role": "DeploymentValidation"
}
},
"webTestName": {
"value": "wt<<namePrefix>>$iwtmin001"
},
// Non-required parameters
"enableDefaultTelemetry": {
"value": "<enableDefaultTelemetry>"
},
"tags": {
"value": {
"hidden-link:${nestedDependencies.outputs.appInsightResourceId}": "Resource"
}
}
}
}
Expand Down