Azure / Azure/AppConfiguration
Allow querying for multiple labels from ARM Template using listKeyValue
- Lingua principale
- Nessun dato sulla lingua
- Stelle
- 263
- Fork
- 82
- Merge medio
- 3g 15h
- PR unite (30g)
- 6
Descrizione
I have been exploring the integration of App Configuration with ARM templates. Ideally I would like to be able to query for the value of key with an array of labels, returning only the first matching value.
Example scenario:
An overly simple example might be the following.
```javascript
{
"$schema": "https://schema.management.azure.com/schemas/2019-08-01/deploymentTemplate.json#",
"contentVersion": "1.0.0.9",
"parameters": {
"environment": {
"type": "String",
"defaultValue": "dev",
"metadata": {
"description": "This is the SDLC environment that is being deployed to."
}
}
},
"variables": {
"keyVaultName":"[concat(parameters('environment'),'-keyvault01')]",
"skuFamily": {
"key": "/keyvault/sku/family",
"label": ["[variables('keyVaultName')]","[parameters('environment')]", "default"]
},
"skuName": {
"key": "/keyvault/sku/name",
"label": ["[variables('keyVaultName')]","[parameters('environment')]", "default"]
},
"enableSoftDelete": {
"key": "/keyvault/enableSoftDelete",
"label": ["[variables('keyVaultName')]","[parameters('environment')]", "default"]
}
},
"resources": [
{
"type": "Microsoft.KeyVault/vaults",
"apiVersion": "2016-10-01",
"name": "[variables('keyVaultName')]",
"location": "northcentral",
"properties": {
"sku": {
"family": "[listKeyValue(resourceId('Microsoft.AppConfiguration/configurationStores', 'appConfig01'), '2019-10-01',variables('skuFamily')).value]",
"name": "[listKeyValue(resourceId('Microsoft.AppConfiguration/configurationStores', 'appConfig01'), '2019-10-01',variables('skuName')).value]"
},
"accessPolicies": [],
"tenantId": "53a61a04-8224-4d62-b270-a5823ebeb33c",
"enabledForDeployment": false,
"enabledForDiskEncryption": false,
"enabledForTemplateDeployment": false,
"enableSoftDelete": "[listKeyValue(resourceId('Microsoft.AppConfiguration/configurationStores', 'appConfig01'), '2019-10-01',variables('enableSoftDelete')).value]"
}
}
]
}
```
You can see that I am querying for some configuration Keys for Sku and enableSoftDelete. I am ordering my array of labels from most specific to least in this case. Enabling something like this would allow me to:
- Provide a default for everything (least specific).
- All keyvaults will be deployed as standard
- Allow for an overload based on environment (more specific).
- All keyvaults in production will be deployed as premium
- While also allowing me to handle an exception for a specific named instance (most specific).
- This specific production keyvault should be standard.
Guida per i contributori
Nessuna guida per i contributori indicizzata per questo repository
Direzione di ricerca
L’issue non indica file del repository, test o punti di ingresso dell’implementazione. Inizia individuando l’integrazione ARM-template per listKeyValue e il suo comportamento attuale con una singola etichetta; done dovrebbe essere definito come etichette ordinate che restituiscono il primo valore di chiave corrispondente, con copertura per gli esempi di fallback e override descritti qui.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Valutazione
- Stack tecnologico
- azure
- Ambito
- cloud, infrastructure
- Tipo di issue
- Funzionalità
- Difficoltà
- 5/5
- Tempo stimato
- Più di una settimana
- Stato di attività
- Ferma
- Chiarezza
- Abbastanza chiara
- Idoneità per principianti
- 25/100