How can I read a PFX Certificate and pass it as in...
# typescript
p
How can I read a PFX Certificate and pass it as input to a Certificate Resource? I do the following:
Copy code
const fs = require("fs");
const certBinary = fs.readFileSync("./mycomp.com.pfx");

const cert = new azure.appservice.Certificate("mycert", {
  name: "mycert",
  location: "switzerlandnorth",
  resourceGroupName: "my-rg",
  password: "xxxx",
  pfxBlob: certBinary,
});
But I get this error:
Copy code
azure:appservice:Certificate (mycert):
    error: azure:appservice/certificate:Certificate resource 'mycert' has a problem: pfx_blob must be a single value, not a map
The certificate is fine, I can upload it without any issues via the azure portal by hand.
sorry, I found the problem, this works:
Copy code
const certBinary = fs.readFileSync("./mycomp.com.pfx").toString("base64");