forked from Azure/arm-ttk
-
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.
526 allowed values location (Azure#593)
* Fixing Azure#526 - location related issues with AllowedValues * Adding positive test for Azure#526
- Loading branch information
1 parent
4889da4
commit 22e9196
Showing
3 changed files
with
153 additions
and
2 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
111 changes: 111 additions & 0 deletions
111
...lues-Should-Actually-Be-Allowed/Pass/ResourceGroupLocationAllowed/createUiDefinition.json
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 |
---|---|---|
@@ -0,0 +1,111 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/0.1.2-preview/CreateUIDefinition.MultiVm.json#", | ||
"handler": "Microsoft.Azure.CreateUIDef", | ||
"version": "0.1.2-preview", | ||
"parameters": { | ||
"config": { | ||
"isWizard": false, | ||
"basics": { | ||
"description": "sample description", | ||
"location": { | ||
"allowedValues": [ | ||
"eastus", | ||
"eastus2" | ||
] | ||
} | ||
} | ||
}, | ||
"basics": [ | ||
{ | ||
"name": "actionSection", | ||
"type": "Microsoft.Common.Section", | ||
"label": "sample label", | ||
"elements": [ | ||
{ | ||
"name": "createOrUpdate", | ||
"type": "Microsoft.Common.OptionsGroup", | ||
"label": "Select one:", | ||
"constraints": { | ||
"allowedValues": [ | ||
{ | ||
"label": "Create", | ||
"value": "Create" | ||
}, | ||
{ | ||
"label": "Update", | ||
"value": "Update" | ||
} | ||
] | ||
} | ||
} | ||
] | ||
} | ||
], | ||
"steps": [ | ||
{ | ||
"name": "configureStep", | ||
"label": "Configure Step", | ||
"elements": [ | ||
{ | ||
"name": "nodeSection", | ||
"type": "Microsoft.Common.Section", | ||
"label": " Size of your Node", | ||
"elements": [ | ||
{ | ||
"name": "nodeSize", | ||
"type": "Microsoft.Compute.SizeSelector", | ||
"label": "Node size:", | ||
"recommendedSizes": [ | ||
"Standard_F16s_v2" | ||
], | ||
"constraints": { | ||
"allowedSizes": [ | ||
"Standard_F8s_v2", | ||
"Standard_F16s_v2" | ||
] | ||
}, | ||
"osPlatform": "Linux", | ||
"count": 1 | ||
} | ||
] | ||
} | ||
] | ||
}, | ||
{ | ||
"name": "updateStep", | ||
"label": "Update Configuration", | ||
"elements": [ | ||
{ | ||
"name": "updateSection", | ||
"type": "Microsoft.Common.Section", | ||
"label": "Update", | ||
"elements": [ | ||
{ | ||
"name": "userAssignedIdentitiesApi", | ||
"type": "Microsoft.Solutions.ArmApiControl", | ||
"request": { | ||
"method": "GET", | ||
"path": "[concat(subscription().id,'/resourceGroups/',resourceGroup().name, '/providers/Microsoft.ManagedIdentity/userAssignedIdentities?api-version=2018-11-30')]" | ||
} | ||
}, | ||
{ | ||
"name": "userAssignedIdentitiesDropDown", | ||
"type": "Microsoft.Common.DropDown", | ||
"label": "Select deployment user identity:", | ||
"constraints": { | ||
"allowedValues": "[map(steps('updateStep').updateSection.userAssignedIdentitiesApi.value, (item) => parse(concat('{\"label\":\"', item.name, '\",\"value\":\"', item.id, '\"}')))]" | ||
} | ||
} | ||
] | ||
} | ||
] | ||
} | ||
], | ||
"outputs": { | ||
"location": "[location()]", | ||
"createOrUpdate": "[basics('actionSection').createOrUpdate]", | ||
"nodeSize": "[steps('configureStep').nodeSection.nodeSize]", | ||
"updateIdentityId": "[steps('updateStep').updateSection.userAssignedIdentitiesDropDown]" | ||
} | ||
} | ||
} |
37 changes: 37 additions & 0 deletions
37
...wed-Values-Should-Actually-Be-Allowed/Pass/ResourceGroupLocationAllowed/mainTemplate.json
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 |
---|---|---|
@@ -0,0 +1,37 @@ | ||
{ | ||
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | ||
"contentVersion": "1.0.0.0", | ||
"parameters": { | ||
"nodeSize": { | ||
"type": "string", | ||
"defaultValue": "Standard_F16s_v2", | ||
"allowedValues": [ | ||
"Standard_F16s_v2" | ||
], | ||
"metadata": { | ||
"description": "The size of the Virtual Machine." | ||
} | ||
}, | ||
"location": { | ||
"type": "string", | ||
"defaultValue": "[resourceGroup().location]", | ||
"metadata": { | ||
"description": "The location of the Managed Cluster resource." | ||
} | ||
}, | ||
"createOrUpdate": { | ||
"type": "string", | ||
"defaultValue": "Create", | ||
"allowedValues": [ | ||
"Create", | ||
"Update" | ||
] | ||
}, | ||
"updateIdentityId": { | ||
"type": "string", | ||
"defaultValue": "N/A" | ||
} | ||
}, | ||
"resources": [ | ||
] | ||
} |