Skip to content

fixed override parameters undefined issue #20973

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,6 @@
"loc.messages.AuthSchemeNotSupported": "Auth Scheme %s is not supported",
"loc.messages.ErrorInSettingUpSubscription": "Error in setting up subscription: %s",
"loc.messages.BicepParamBuildFailed": "\"az bicep build-param\" failed. Error: %s",
"loc.messages.IncompatibleAzureCLIVersionBicepParam": "Azure CLI version should be >= 2.47.0 to use .bicepparam file"
"loc.messages.IncompatibleAzureCLIVersionBicepParam": "Azure CLI version should be >= 2.47.0 to use .bicepparam file",
"loc.messages.ErrorWhileOverrideParameterUndefined": "The provided metadata file '%s' is missing metadata of parameter '%s'"
}
Original file line number Diff line number Diff line change
Expand Up @@ -371,6 +371,9 @@ class Utils {
try {
overrideParameter.value = this.castToType(overrideParameter.value, template.parameters[overrideParameter.name].type);
} catch (error) {
if (template.parameters[overrideParameter.name] === undefined) {
tl.error(tl.loc("ErrorWhileOverrideParameterUndefined", taskParameters.csmFile, overrideParameter.name));
}
console.log(tl.loc("ErrorWhileParsingParameter", overrideParameter.name, error.toString()));
}
parameters[overrideParameter.name] = {
Expand Down Expand Up @@ -528,4 +531,4 @@ class Utils {
}
}

export = Utils;
export = Utils;
5 changes: 3 additions & 2 deletions Tasks/AzureResourceManagerTemplateDeploymentV3/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 3,
"Minor": 254,
"Patch": 0
"Patch": 1
},
"demands": [],
"minimumAgentVersion": "2.119.1",
Expand Down Expand Up @@ -341,6 +341,7 @@
"AuthSchemeNotSupported": "Auth Scheme %s is not supported",
"ErrorInSettingUpSubscription": "Error in setting up subscription: %s",
"BicepParamBuildFailed": "\"az bicep build-param\" failed. Error: %s",
"IncompatibleAzureCLIVersionBicepParam": "Azure CLI version should be >= 2.47.0 to use .bicepparam file"
"IncompatibleAzureCLIVersionBicepParam": "Azure CLI version should be >= 2.47.0 to use .bicepparam file",
"ErrorWhileOverrideParameterUndefined": "The provided metadata file '%s' is missing metadata of parameter '%s'"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"version": {
"Major": 3,
"Minor": 254,
"Patch": 0
"Patch": 1
},
"demands": [],
"minimumAgentVersion": "2.119.1",
Expand Down Expand Up @@ -341,6 +341,7 @@
"AuthSchemeNotSupported": "ms-resource:loc.messages.AuthSchemeNotSupported",
"ErrorInSettingUpSubscription": "ms-resource:loc.messages.ErrorInSettingUpSubscription",
"BicepParamBuildFailed": "ms-resource:loc.messages.BicepParamBuildFailed",
"IncompatibleAzureCLIVersionBicepParam": "ms-resource:loc.messages.IncompatibleAzureCLIVersionBicepParam"
"IncompatibleAzureCLIVersionBicepParam": "ms-resource:loc.messages.IncompatibleAzureCLIVersionBicepParam",
"ErrorWhileOverrideParameterUndefined": "ms-resource:loc.messages.ErrorWhileOverrideParameterUndefined"
}
}