https://pulumi.com logo
#typescript
Title
# typescript
p

plain-eye-9759

01/16/2020, 10:37 AM
Hi everyone How do I pass parameters to an ARM template deployment? I tried passing the filename but I was getting this
Error Expanding the parameters_body for Azure RM Template Deployment
I have also tried passing the parameters directly with no success. Please help!
Copy code
const deployment = new azure.core.TemplateDeployment(name, {
     resourceGroupName: args.resourceGroupName,
     name,
     templateBody: pulumi.output(template).apply(JSON.stringify),
     // parametersBody: "params.json",
     // parametersBody: {
     //    "certContent": {
     //        "reference": {
     //             "keyVault": {
     //                 "id": "/id-of-the-keyvault"
     //              },
     //              "secretName": "SecretName"
     //          }
     //     }
     // },
      deploymentMode: "Incremental",
}, { parent: this });
So I got this to work by declaring the parameters as an object. and I passed it to the template like so:
Copy code
parametersBody: pulumi.output(params).apply(JSON.stringify)
👍 1