future-kite-91191
06/18/2020, 2:28 PMTemplateDeployment
resource.
I'm getting this error:
Error validating Template for Deployment "adyen-sa" (Resource Group "uel-dev-rg"): Deployment template validation failed: 'Template parameter JToken type is not valid. Expected 'Integer'. Actual 'String'. Please see <https://aka.ms/resource-manager-parameter-files> for usage details.'.
This is caused by the ARM template input parameters that some of them expect an integer as input. Problem is that TemplateDeploymentArgs
has field
readonly parameters?: pulumi.Input<{
[key: string]: pulumi.Input<string>;
}>;
..that ony accepts string parameter values? Is there a way to use integer ARM template parameters with ``TemplateDeployment` ?
Here's a sample of the ARM json template:
{
"$schema": "<http://schema.management.azure.com/schemas/2015-01-01/deploymentTemplate.json#>",
"contentVersion": "1.0.0.0",
"parameters": {
"OutputErrorPolicy": {
"type": "string",
"allowedValues": [
"Drop",
"Stop"
]
},
"EventsLateArrivalMaxDelayInSeconds": {
"type": "int"
},
"EventsOutOfOrderMaxDelayInSeconds": {
"type": "int"
},
So here EventsOutOfOrderMaxDelayInSeconds
parameter is of type int
but in the Pulumi code I cannot use
const asa = new azure.core.TemplateDeployment("blabla", {
name: "blabla",
deploymentMode: "Incremental",
resourceGroupName: resourceGroup.name,
templateBody: fs.readFileSync("template.json").toString(),
parameters: {
"OutputErrorPolicy": "Stop",
"EventsOutOfOrderMaxDelayInSeconds": 0,
"EventsOutOfOrderPolicy": "Adjust",
"StreamingUnits": "6",
This does not compile at the line EventsOutOfOrderMaxDelayInSeconds": 0,
as 0
should be provided as a stringtall-librarian-49374
06/18/2020, 2:46 PMparameters
is wrong then. Do you mind filing an issue? As a workaround, you should be able to pass any
there, e.g.
"EventsOutOfOrderMaxDelayInSeconds": (any)0,
future-kite-91191
06/18/2020, 2:55 PM"EventsLateArrivalMaxDelayInSeconds": 5 as any,
does compile, but still returns error
Diagnostics:
azure:core:TemplateDeployment (bla-sa):
error: Error validating Template for Deployment "bla-sa" (Resource Group "uel-dev-rg"): Deployment template validation failed: 'Template parameter JToken type is not valid. Expected 'Integer'. Actual 'String'. Please see <https://aka.ms/resource-manager-parameter-files> for usage details.'.
tall-librarian-49374
06/18/2020, 3:07 PMfuture-kite-91191
06/18/2020, 3:29 PM