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

Task AzureDevTestLabsCreateVM cannot handle key vault reference in the arm template

Đang mở
#677 1 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ó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Khá rõ ràng
Mức độ hoạt động
Đình trệ
Công nghệ
azure, typescript
Lĩnh vực
cloud, devops

Hướng nghiên cứu

Bắt đầu từ tasks/Node/src/modules/task-utils/deployutil.ts tại dòng được tham chiếu và tái hiện lỗi bằng JSON tham số ARM có tham chiếu Key Vault. Truy vết cách task đọc các giá trị tham số, sau đó xác minh rằng task chấp nhận dạng tham chiếu được tài liệu hóa mà không gặp lỗi undefined toString.

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

Mô tả

bug tasks

I'm trying to call task AzureDevTestLabsCreateVM in my yaml pipeline. I pass in the arm template and parameter file to the task. For sensitive parameters such as SAS token or password, I store them in key vault and reference the key vault in the parameter json file. For demo, I use the example json from https://docs.microsoft.com/en-us/azure/azure-resource-manager/templates/key-vault-parameter?tabs=azure-cli :

{
"$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentParameters.json#",
"contentVersion": "1.0.0.0",
"parameters": {
"adminPassword": {
"reference": {
"keyVault": {
"id": "/subscriptions//resourceGroups//providers/Microsoft.KeyVault/vaults/"
},
"secretName": "ExamplePassword"
}
}
}
}

However, the task give me this following error:
[error]Error => code: 'undefined'; message = 'Cannot read property 'toString' of undefined'

I then dug into the source code, and here is what I found:
https://github.com/Azure/azure-devtestlab/blob/cbca7792cbb717cf9dc613e1569f2dd7ce5cf546/tasks/Node/src/modules/task-utils/deployutil.ts#L96

This piece of code seems it only handles 'value' of parameter, and not 'reference', although 'reference' is allowed according to the schema.

Ngôn ngữ chính
PowerShell
Star
465
Fork
595
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

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/azure-devtestlab

Tất cả issue của Azure/azure-devtestlab

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.