DSC resource model versus ARM keys inconsistencies #1288
Unanswered
Gijs Reijn (Gijsreyn)
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Whilst working on #1286, I noticed inconsistencies between the ARM language versus what we can define in DSC. For example, here's a raw ARM template:
{ "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", "contentVersion": "1.0.0.0", "parameters": { "location": { "type": "string", "defaultValue": "[resourceGroup().location]" }, "keyIndex": { "type": "int", "defaultValue": 0, "allowedValues": [0, 1] } }, "resources": [ { "type": "Microsoft.CognitiveServices/accounts", "apiVersion": "2023-05-01", "name": "myCogService", "location": "[parameters('location')]", "sku": { "name": "S0" }, "kind": "CognitiveServices", "properties": {} }, { "type": "Microsoft.Insights/components", "apiVersion": "2020-02-02", "name": "myAppInsights", "location": "[parameters('location')]", "properties": { "Application_Type": "web", "CognitiveApiKey": "[reference(resourceId('Microsoft.CognitiveServices/accounts', 'myCogService')).keys[parameters('keyIndex')].value]" } } ], "outputs": { "selectedKey": { "type": "string", "value": "[reference(resourceId('Microsoft.CognitiveServices/accounts', 'myCogService')).keys[parameters('keyIndex')].value]" } } }In one of the test cases, we built up:
I was wondering if this is "as expected" that we don't use
.keys[]?All reactions