Skip to content

Commit 84832bb

Browse files
committed
Removing article with duplicate info
1 parent 1af1dcd commit 84832bb

7 files changed

+126
-232
lines changed

.openpublishing.redirection.azure-monitor.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6514,6 +6514,11 @@
65146514
"redirect_url": "/previous-versions/azure/azure-monitor/app/sampling",
65156515
"redirect_document_id": false
65166516
},
6517+
{
6518+
"source_path_from_root": "/articles/azure-monitor/app/resource-manager-app-resource.md",
6519+
"redirect_url": "/previous-versions/azure/azure-monitor/app/create-workspace-resource",
6520+
"redirect_document_id": false
6521+
},
65176522
{
65186523
"source_path_from_root": "/articles/azure-monitor/app/tutorial-asp-net-core.md",
65196524
"redirect_url": "/previous-versions/azure/azure-monitor/app/tutorial-asp-net-core",

articles/azure-monitor/app/convert-classic-resource.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,7 @@ To avoid this issue, make sure to use the latest version of the Terraform [azure
345345

346346
For backwards compatibility, calls to the old API for creating Application Insights resources will continue to work. Each of these calls will eventually create both a workspace-based Application Insights resource and a Log Analytics workspace to store the data.
347347

348-
We strongly encourage updating to the [new API](resource-manager-app-resource.md) for better control over resource creation.
348+
We strongly encourage updating to the [new API](create-workspace-resource.md) for better control over resource creation.
349349

350350
### Should I migrate diagnostic settings on classic Application Insights before moving to a workspace-based AI?
351351
Yes, we recommend migrating diagnostic settings on classic Application Insights resources before transitioning to a workspace-based Application Insights. It ensures continuity and compatibility of your diagnostic settings.

articles/azure-monitor/app/create-workspace-resource.md

Lines changed: 118 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -154,85 +154,137 @@ For the full PowerShell documentation for this cmdlet, and to learn how to retri
154154

155155
### Azure Resource Manager templates
156156

157-
To create a workspace-based resource, use the following Azure Resource Manager templates and deploy them with PowerShell.
157+
# [Bicep](#tab/bicep)
158+
159+
```bicep
160+
@description('Name of Application Insights resource.')
161+
param name string
162+
163+
@description('Type of app you are deploying. This field is for legacy reasons and will not impact the type of App Insights resource you deploy.')
164+
param type string
165+
166+
@description('Which Azure Region to deploy the resource to. This must be a valid Azure regionId.')
167+
param regionId string
168+
169+
@description('See documentation on tags: https://learn.microsoft.com/azure/azure-resource-manager/management/tag-resources.')
170+
param tagsArray object
171+
172+
@description('Source of Azure Resource Manager deployment')
173+
param requestSource string
174+
175+
@description('Log Analytics workspace ID to associate with your Application Insights resource.')
176+
param workspaceResourceId string
177+
178+
resource component 'Microsoft.Insights/components@2020-02-02' = {
179+
name: name
180+
location: regionId
181+
tags: tagsArray
182+
kind: 'other'
183+
properties: {
184+
Application_Type: type
185+
Flow_Type: 'Bluefield'
186+
Request_Source: requestSource
187+
WorkspaceResourceId: workspaceResourceId
188+
}
189+
}
190+
```
158191

159-
#### Template file
192+
# [JSON](#tab/json)
160193

161194
```json
162195
{
163-
"$schema": "http://schema.management.azure.com/schemas/2014-04-01-preview/deploymentTemplate.json#",
164-
"contentVersion": "1.0.0.0",
165-
"parameters": {
166-
"name": {
167-
"type": "string"
168-
},
169-
"type": {
170-
"type": "string"
171-
},
172-
"regionId": {
173-
"type": "string"
174-
},
175-
"tagsArray": {
176-
"type": "object"
177-
},
178-
"requestSource": {
179-
"type": "string"
180-
},
181-
"workspaceResourceId": {
182-
"type": "string"
183-
}
196+
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
197+
"contentVersion": "1.0.0.0",
198+
"parameters": {
199+
"name": {
200+
"type": "string",
201+
"metadata": {
202+
"description": "Name of Application Insights resource."
203+
}
204+
},
205+
"type": {
206+
"type": "string",
207+
"metadata": {
208+
"description": "Type of app you are deploying. This field is for legacy reasons and will not impact the type of App Insights resource you deploy."
209+
}
210+
},
211+
"regionId": {
212+
"type": "string",
213+
"metadata": {
214+
"description": "Which Azure Region to deploy the resource to. This must be a valid Azure regionId."
215+
}
216+
},
217+
"tagsArray": {
218+
"type": "object",
219+
"metadata": {
220+
"description": "See documentation on tags: https://learn.microsoft.com/azure/azure-resource-manager/management/tag-resources."
221+
}
184222
},
185-
"resources": [
186-
{
187-
"name": "[parameters('name')]",
188-
"type": "microsoft.insights/components",
189-
"location": "[parameters('regionId')]",
190-
"tags": "[parameters('tagsArray')]",
191-
"apiVersion": "2020-02-02-preview",
192-
"properties": {
193-
"ApplicationId": "[parameters('name')]",
194-
"Application_Type": "[parameters('type')]",
195-
"Flow_Type": "Bluefield",
196-
"Request_Source": "[parameters('requestSource')]",
197-
"WorkspaceResourceId": "[parameters('workspaceResourceId')]"
198-
}
199-
}
200-
]
223+
"requestSource": {
224+
"type": "string",
225+
"metadata": {
226+
"description": "Source of Azure Resource Manager deployment"
227+
}
228+
},
229+
"workspaceResourceId": {
230+
"type": "string",
231+
"metadata": {
232+
"description": "Log Analytics workspace ID to associate with your Application Insights resource."
233+
}
234+
}
235+
},
236+
"resources": [
237+
{
238+
"type": "Microsoft.Insights/components",
239+
"apiVersion": "2020-02-02",
240+
"name": "[parameters('name')]",
241+
"location": "[parameters('regionId')]",
242+
"tags": "[parameters('tagsArray')]",
243+
"kind": "other",
244+
"properties": {
245+
"Application_Type": "[parameters('type')]",
246+
"Flow_Type": "Bluefield",
247+
"Request_Source": "[parameters('requestSource')]",
248+
"WorkspaceResourceId": "[parameters('workspaceResourceId')]"
249+
}
250+
}
251+
]
201252
}
202253
```
203254

204255
> [!NOTE]
205256
> For more information on resource properties, see [Property values](/azure/templates/microsoft.insights/components?tabs=bicep#property-values).
206257
> `Flow_Type` and `Request_Source` aren't used but are included in this sample for completeness.
207258
208-
#### Parameters file
259+
---
260+
261+
### Parameter file
209262

210263
```json
211264
{
212-
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
213-
"contentVersion": "1.0.0.0",
214-
"parameters": {
215-
"type": {
216-
"value": "web"
217-
},
218-
"name": {
219-
"value": "customresourcename"
220-
},
221-
"regionId": {
222-
"value": "eastus"
223-
},
224-
"tagsArray": {
225-
"value": {}
226-
},
227-
"requestSource": {
228-
"value": "Custom"
229-
},
230-
"workspaceResourceId": {
231-
"value": "/subscriptions/00000000-0000-0000-0000-000000000000/resourcegroups/my_resource_group/providers/microsoft.operationalinsights/workspaces/myworkspacename"
232-
}
265+
"$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#",
266+
"contentVersion": "1.0.0.0",
267+
"parameters": {
268+
"name": {
269+
"value": "my_workspace_based_resource"
270+
},
271+
"type": {
272+
"value": "web"
273+
},
274+
"regionId": {
275+
"value": "westus2"
276+
},
277+
"tagsArray": {
278+
"value": {}
279+
},
280+
"requestSource": {
281+
"value": "CustomDeployment"
282+
},
283+
"workspaceResourceId": {
284+
"value": "/subscriptions/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/resourcegroups/testxxxx/providers/microsoft.operationalinsights/workspaces/testworkspace"
233285
}
286+
}
234287
}
235-
236288
```
237289

238290
## Modify the associated workspace
@@ -385,6 +437,10 @@ Unique customizations that commonly need to be manually re-created or updated fo
385437
> [!NOTE]
386438
> If the resource you're creating in a new region is replacing a classic resource, we recommend that you explore the benefits of [creating a new workspace-based resource](#workspace-based-application-insights-resources). Alternatively, [migrate your existing resource to workspace based](./convert-classic-resource.md).
387439
440+
### Can I use providers('Microsoft.Insights', 'components').apiVersions[0] in my Azure Resource Manager deployments?
441+
442+
We don't recommend using this method of populating the API version. The newest version can represent preview releases, which might contain breaking changes. Even with newer nonpreview releases, the API versions aren't always backward compatible with existing templates. In some cases, the API version might not be available to all subscriptions.
443+
388444
## Next steps
389445

390446
* [Explore metrics](../essentials/metrics-charts.md)

articles/azure-monitor/app/resource-manager-app-resource.md

Lines changed: 0 additions & 163 deletions
This file was deleted.

0 commit comments

Comments
 (0)