Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

Allow querying for multiple labels from ARM Template using listKeyValue

Đang mở
#412 14 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Đánh giá

Độ khó
5/5
Thời gian dự kiến
Hơn một tuần
Mức phù hợp với người mới
25/100
Loại issue
Tính năng
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
azure
Lĩnh vực
cloud, infrastructure

Hướng nghiên cứu

Issue không nêu tệp repository, test hoặc entry point triển khai nào. Hãy bắt đầu bằng cách xác định integration ARM-template cho listKeyValue và hành vi hiện tại với một label duy nhất; done nên được định nghĩa là các label theo thứ tự trả về key value khớp đầu tiên, với coverage cho các ví dụ fallback và override được mô tả ở đây.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

ARM enhancement

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.

{
  "$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.
Ngôn ngữ chính
Không có dữ liệu ngôn ngữ
Star
263
Fork
82
Merge trung bình
7 ngày 14 giờ
Pull request đã merge (30 ngày)
3

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Azure/AppConfiguration

Tất cả issue của Azure/AppConfiguration

Issue tương tự

Thêm issue về Cloud

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.