私は、キーボルトを配備したARMテンプレートを持っています。これは、secretsObjectパラメーターに含まれる配列の数に基づいて秘密を作成します。たとえば、私が持っている場合:secureObject配列をVSTS変数として渡す
"secretsObject": {
"type": "secureObject",
"defaultValue": {
"secrets": [
{
"secretName": "exampleSecret1",
"secretValue": "secretVaule1"
},
{
"secretName": "exampleSecret2",
"secretValue": "secretValue2"
}
]
}
}
テンプレートは2つの秘密を作成します。
"secrets": [
{
"secretName": "exampleSecret1",
"secretValue": "secretVaule1"
},
{
"secretName": "exampleSecret2",
"secretValue": "secretValue2"
}
]
問題がある、私は変数としてVSTSにそのような行を過ぎて(上書きする方法を見つけ出すことはできません:これは、私は、Visual Studioからテンプレートを展開する.parameters.jsonに入れラインがありますパラメータ)。 This is the ARM template I'm using
There were errors in your deployment. Error code: InvalidDeploymentParameterKey.
One of the deployment parameters has an empty key. Please see https://aka.ms/arm-deploy/#parameter-file for details.
Processed: ##vso[task.issue type=error;]One of the deployment parameters has an empty key. Please see https://aka.ms/arm-deploy/#parameter-file for details.
task result: Failed
Task failed while creating or updating the template deployment.
あなたはそれがパラメータを解析する方法のソースコードをチェックしてhttps://github.com/Microsoft/vsts-tasks/tree/master/Tasks/ AzureResourceGroupDeployment –
値はオブジェクトなので、値を{{"秘密":[{......}]} ' –
に指定してみてください。それは私が参照しているものです。私はちょうど '{"秘密 ":" {"secretName": "exampleSecret1"、 "secretValue": "secretVaule1"}、{"secretName": "exampleSecret2"、 "secretValue": "secretValue2"}、デプロイメントテンプレートの検証に失敗しました: 'テンプレートパラメータ' secretsObject 'の行' 1 'と列' 1411 'に指定された値は、' secretName ': "exampleSecret3"、 "secretValue": "secretVaule3"}]} '有効じゃない。'。 テンプレート配備の作成または更新中にタスクが失敗しました。 ' – WinBoss