Skip to content

Commit 96ecf39

Browse files
committed
updates templates
1 parent 9ba5afa commit 96ecf39

File tree

2 files changed

+102
-96
lines changed

2 files changed

+102
-96
lines changed

articles/azure-resource-manager/managed-applications/publish-service-catalog-app.md

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,36 @@ Add the following JSON and save the file. It defines the resources to deploy an
5353
"defaultValue": "[resourceGroup().location]"
5454
},
5555
"appServicePlanNamePrefix": {
56-
"type": "string"
56+
"type": "string",
57+
"maxLength": 27,
58+
"metadata": {
59+
"description": "App Service plan name prefix."
60+
}
5761
},
5862
"appServiceNamePrefix": {
59-
"type": "string"
63+
"type": "string",
64+
"maxLength": 47,
65+
"metadata": {
66+
"description": "App Service name prefix."
67+
}
6068
},
6169
"storageAccountNamePrefix": {
6270
"type": "string",
6371
"maxLength": 11,
6472
"metadata": {
65-
"description": "Storage account name prefix"
73+
"description": "Storage account name prefix."
6674
}
6775
},
6876
"storageAccountType": {
69-
"type": "string"
77+
"type": "string",
78+
"allowedValues": [
79+
"Premium_LRS",
80+
"Standard_LRS",
81+
"Standard_GRS"
82+
],
83+
"metadata": {
84+
"description": "Storage account type allowed values"
85+
}
7086
}
7187
},
7288
"variables": {
@@ -163,14 +179,14 @@ Add the following JSON to the file and save it.
163179
"label": "Web App settings",
164180
"subLabel": {
165181
"preValidation": "Configure the web app settings",
166-
"postValidation": "Done"
182+
"postValidation": "Completed"
167183
},
168184
"elements": [
169185
{
170186
"name": "appServicePlanName",
171187
"type": "Microsoft.Common.TextBox",
172-
"label": "App service plan name prefix",
173-
"placeholder": "App service plan name prefix",
188+
"label": "App Service plan name prefix",
189+
"placeholder": "App Service plan name prefix",
174190
"defaultValue": "",
175191
"toolTip": "Use alphanumeric characters or hyphens with a maximum of 27 characters.",
176192
"constraints": {
@@ -183,8 +199,8 @@ Add the following JSON to the file and save it.
183199
{
184200
"name": "appServiceName",
185201
"type": "Microsoft.Common.TextBox",
186-
"label": "App service name prefix",
187-
"placeholder": "App service name prefix",
202+
"label": "App Service name prefix",
203+
"placeholder": "App Service name prefix",
188204
"defaultValue": "",
189205
"toolTip": "Use alphanumeric characters or hyphens with a maximum of 47 characters.",
190206
"constraints": {
@@ -200,8 +216,8 @@ Add the following JSON to the file and save it.
200216
"name": "storageConfig",
201217
"label": "Storage settings",
202218
"subLabel": {
203-
"preValidation": "Configure the infrastructure settings",
204-
"postValidation": "Done"
219+
"preValidation": "Configure the storage settings",
220+
"postValidation": "Completed"
205221
},
206222
"elements": [
207223
{
@@ -224,7 +240,8 @@ Add the following JSON to the file and save it.
224240
"Standard_LRS",
225241
"Standard_GRS"
226242
]
227-
}
243+
},
244+
"visible": true
228245
}
229246
]
230247
}

articles/azure-resource-manager/managed-applications/publish-service-catalog-bring-your-own-storage.md

Lines changed: 73 additions & 84 deletions
Original file line numberDiff line numberDiff line change
@@ -53,20 +53,36 @@ Add the following JSON and save the file. It defines the resources to deploy an
5353
"defaultValue": "[resourceGroup().location]"
5454
},
5555
"appServicePlanNamePrefix": {
56-
"type": "string"
56+
"type": "string",
57+
"maxLength": 27,
58+
"metadata": {
59+
"description": "App Service plan name prefix."
60+
}
5761
},
5862
"appServiceNamePrefix": {
59-
"type": "string"
63+
"type": "string",
64+
"maxLength": 47,
65+
"metadata": {
66+
"description": "App Service name prefix."
67+
}
6068
},
6169
"storageAccountNamePrefix": {
6270
"type": "string",
6371
"maxLength": 11,
6472
"metadata": {
65-
"description": "Storage account name prefix"
73+
"description": "Storage account name prefix."
6674
}
6775
},
6876
"storageAccountType": {
69-
"type": "string"
77+
"type": "string",
78+
"allowedValues": [
79+
"Premium_LRS",
80+
"Standard_LRS",
81+
"Standard_GRS"
82+
],
83+
"metadata": {
84+
"description": "Storage account type allowed values"
85+
}
7086
}
7187
},
7288
"variables": {
@@ -163,14 +179,14 @@ Add the following JSON to the file and save it.
163179
"label": "Web App settings",
164180
"subLabel": {
165181
"preValidation": "Configure the web app settings",
166-
"postValidation": "Done"
182+
"postValidation": "Completed"
167183
},
168184
"elements": [
169185
{
170186
"name": "appServicePlanName",
171187
"type": "Microsoft.Common.TextBox",
172-
"label": "App service plan name prefix",
173-
"placeholder": "App service plan name prefix",
188+
"label": "App Service plan name prefix",
189+
"placeholder": "App Service plan name prefix",
174190
"defaultValue": "",
175191
"toolTip": "Use alphanumeric characters or hyphens with a maximum of 27 characters.",
176192
"constraints": {
@@ -183,8 +199,8 @@ Add the following JSON to the file and save it.
183199
{
184200
"name": "appServiceName",
185201
"type": "Microsoft.Common.TextBox",
186-
"label": "App service name prefix",
187-
"placeholder": "App service name prefix",
202+
"label": "App Service name prefix",
203+
"placeholder": "App Service name prefix",
188204
"defaultValue": "",
189205
"toolTip": "Use alphanumeric characters or hyphens with a maximum of 47 characters.",
190206
"constraints": {
@@ -200,8 +216,8 @@ Add the following JSON to the file and save it.
200216
"name": "storageConfig",
201217
"label": "Storage settings",
202218
"subLabel": {
203-
"preValidation": "Configure the infrastructure settings",
204-
"postValidation": "Done"
219+
"preValidation": "Configure the storage settings",
220+
"postValidation": "Completed"
205221
},
206222
"elements": [
207223
{
@@ -224,7 +240,8 @@ Add the following JSON to the file and save it.
224240
"Standard_LRS",
225241
"Standard_GRS"
226242
]
227-
}
243+
},
244+
"visible": true
228245
}
229246
]
230247
}
@@ -437,78 +454,50 @@ roleid=$(az role definition list --name Owner --query [].name --output tsv)
437454

438455
Use the following ARM template to deploy the managed application definition in your service catalog. After the deployment, the definition files are stored in your bring your own storage account.
439456

440-
Open Visual Studio Code, create a file with the name _azuredeploy.json_ and save it.
457+
Open Visual Studio Code, create a file with the name _deployDefinition.bicep_ and save it.
441458

442459
Add the following JSON and save the file.
443460

444-
```json
445-
{
446-
"$schema": "http://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#",
447-
"contentVersion": "1.0.0.0",
448-
"parameters": {
449-
"location": {
450-
"type": "string",
451-
"defaultValue": "[resourceGroup().location]"
452-
},
453-
"managedApplicationDefinitionName": {
454-
"type": "string",
455-
"metadata": {
456-
"description": "Name of the managed application definition."
457-
}
458-
},
459-
"definitionStorageResourceID": {
460-
"type": "string",
461-
"metadata": {
462-
"description": "Resource ID for the bring your own storage account where the definition is stored."
463-
}
464-
},
465-
"packageFileUri": {
466-
"type": "string",
467-
"metadata": {
468-
"description": "The URI of the .zip package file."
469-
}
470-
},
471-
"principalId": {
472-
"type": "string",
473-
"metadata": {
474-
"description": "Publishers Principal ID that needs permissions to manage resources in the managed resource group."
475-
}
476-
},
477-
"roleId": {
478-
"type": "string",
479-
"metadata": {
480-
"description": "Role ID for permissions to the managed resource group."
481-
}
482-
}
483-
},
484-
"variables": {
485-
"definitionLockLevel": "ReadOnly",
486-
"definitionDescription": "Sample BYOS Managed application definition",
487-
"definitionDisplayName": "Sample BYOS Managed application definition"
488-
},
489-
"resources": [
490-
{
491-
"type": "Microsoft.Solutions/applicationDefinitions",
492-
"apiVersion": "2021-07-01",
493-
"name": "[parameters('managedApplicationDefinitionName')]",
494-
"location": "[parameters('location')]",
495-
"properties": {
496-
"lockLevel": "[variables('definitionLockLevel')]",
497-
"description": "[variables('definitionDescription')]",
498-
"displayName": "[variables('definitionDisplayName')]",
499-
"packageFileUri": "[parameters('packageFileUri')]",
500-
"storageAccountId": "[parameters('definitionStorageResourceID')]",
501-
"authorizations": [
502-
{
503-
"principalId": "[parameters('principalId')]",
504-
"roleDefinitionId": "[parameters('roleId')]"
505-
}
506-
]
461+
```bicep
462+
param location string = resourceGroup().location
463+
464+
@description('Name of the managed application definition.')
465+
param managedApplicationDefinitionName string
466+
467+
@description('Resource ID for the bring your own storage account where the definition is stored.')
468+
param definitionStorageResourceID string
469+
470+
@description('The URI of the .zip package file.')
471+
param packageFileUri string
472+
473+
@description('Publishers Principal ID that needs permissions to manage resources in the managed resource group.')
474+
param principalId string
475+
476+
@description('Role ID for permissions to the managed resource group.')
477+
param roleId string
478+
479+
var definitionLockLevel = 'ReadOnly'
480+
var definitionDescription = 'Sample BYOS Managed application definition'
481+
var definitionDisplayName = 'Sample BYOS Managed application definition'
482+
483+
resource managedApplicationDefinition 'Microsoft.Solutions/applicationDefinitions@2021-07-01' = {
484+
name: managedApplicationDefinitionName
485+
location: location
486+
properties: {
487+
lockLevel: definitionLockLevel
488+
description: definitionDescription
489+
displayName: definitionDisplayName
490+
packageFileUri: packageFileUri
491+
storageAccountId: definitionStorageResourceID
492+
authorizations: [
493+
{
494+
principalId: principalId
495+
roleDefinitionId: roleId
507496
}
508-
}
509-
],
510-
"outputs": {}
497+
]
498+
}
511499
}
500+
512501
```
513502

514503
For more information about the template's properties, see [Microsoft.Solutions/applicationDefinitions](/azure/templates/microsoft.solutions/applicationdefinitions?pivots=deployment-language-arm-template).
@@ -519,7 +508,7 @@ The `lockLevel` on the managed resource group prevents the customer from perform
519508

520509
The managed application definition's deployment template needs input for several parameters. The deployment command prompts you for the values or you can create a parameter file for the values. In this example, we use a parameter file to pass the parameter values to the deployment command.
521510

522-
In Visual Studio Code, create a new file named _azuredeploy-parameters.json_ and save it.
511+
In Visual Studio Code, create a new file named _deployDefinition.parameters.json_ and save it.
523512

524513
Add the following to your parameter file and save it. Then, replace the `{placeholder values}` including the curly braces, with your values.
525514

@@ -570,8 +559,8 @@ New-AzResourceGroup -Name byosAppDefinitionGroup -Location westus3
570559
571560
New-AzResourceGroupDeployment `
572561
-ResourceGroupName byosAppDefinitionGroup `
573-
-TemplateFile azuredeploy.json `
574-
-TemplateParameterFile azuredeploy-parameters.json
562+
-TemplateFile deployDefinition.bicep `
563+
-TemplateParameterFile deployDefinition.parameters.json
575564
```
576565

577566
# [Azure CLI](#tab/azure-cli)
@@ -581,8 +570,8 @@ az group create --name byosAppDefinitionGroup --location westus3
581570
582571
az deployment group create \
583572
--resource-group byosAppDefinitionGroup \
584-
--template-file azuredeploy.json \
585-
--parameters azuredeploy-parameters.json
573+
--template-file deployDefinition.bicep \
574+
--parameters @deployDefinition.parameters.json
586575
```
587576

588577
---

0 commit comments

Comments
 (0)