Skip to content

Commit cd3c1fc

Browse files
authored
Merge pull request #202224 from mumian/0620-spring-cloud-app-insight
[Azure Spring Cloud App Insight] - incorporate Mason Chen's feedback
2 parents 8e8aa7a + 87d6b2b commit cd3c1fc

File tree

1 file changed

+12
-9
lines changed

1 file changed

+12
-9
lines changed

articles/spring-cloud/how-to-application-insights.md

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ author: karlerickson
55
ms.author: karler
66
ms.service: spring-cloud
77
ms.topic: how-to
8-
ms.date: 06/08/2022
8+
ms.date: 06/20/2022
99
ms.custom: devx-track-java, devx-track-azurecli, event-tier1-build-2022
1010
zone_pivot_groups: spring-cloud-tier-selection
1111
---
@@ -351,16 +351,17 @@ The following sections describe how to automate your deployment using Bicep, Azu
351351
To deploy using a Bicep file, copy the following content into a *main.bicep* file. For more information, see [Microsoft.AppPlatform Spring/monitoringSettings](/azure/templates/microsoft.appplatform/spring/monitoringsettings).
352352

353353
```bicep
354+
param springName string
354355
param location string = resourceGroup().location
355356
356-
resource customize_this 'Microsoft.AppPlatform/Spring@2020-07-01' = {
357-
name: 'customize this'
357+
resource spring 'Microsoft.AppPlatform/Spring@2020-07-01' = {
358+
name: springName
358359
location: location
359360
properties: {}
360361
}
361362
362-
resource customize_this_default 'Microsoft.AppPlatform/Spring/monitoringSettings@2020-11-01-preview' = {
363-
parent: customize_this
363+
resource monitorSetting 'Microsoft.AppPlatform/Spring/monitoringSettings@2020-11-01-preview' = {
364+
parent: spring
364365
name: 'default'
365366
properties: {
366367
appInsightsInstrumentationKey: '00000000-0000-0000-0000-000000000000'
@@ -378,6 +379,9 @@ To deploy using an ARM template, copy the following content into an *azuredeploy
378379
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
379380
"contentVersion": "1.0.0.0",
380381
"parameters": {
382+
"springName": {
383+
"type": "string"
384+
},
381385
"location": {
382386
"type": "string",
383387
"defaultValue": "[resourceGroup().location]"
@@ -387,25 +391,24 @@ To deploy using an ARM template, copy the following content into an *azuredeploy
387391
{
388392
"type": "Microsoft.AppPlatform/Spring",
389393
"apiVersion": "2020-07-01",
390-
"name": "customize this",
394+
"name": "[parameters('springName')]",
391395
"location": "[parameters('location')]",
392396
"properties": {}
393397
},
394398
{
395399
"type": "Microsoft.AppPlatform/Spring/monitoringSettings",
396400
"apiVersion": "2020-11-01-preview",
397-
"name": "[format('{0}/{1}', 'customize this', 'default')]",
401+
"name": "[format('{0}/{1}', parameters('springName'), 'default')]",
398402
"properties": {
399403
"appInsightsInstrumentationKey": "00000000-0000-0000-0000-000000000000",
400404
"appInsightsSamplingRate": 88
401405
},
402406
"dependsOn": [
403-
"[resourceId('Microsoft.AppPlatform/Spring', 'customize this')]"
407+
"[resourceId('Microsoft.AppPlatform/Spring', parameters('springName'))]"
404408
]
405409
}
406410
]
407411
}
408-
409412
```
410413

411414
### Terraform

0 commit comments

Comments
 (0)