Building Plugin - Secret inputs


I’m developing a plugin to Logre.IO to log the build info there and the plugin, has two inputs, box id and box secret, since the box secret is a sensitive information is there a way to use an environment variable or something else instead of plain text in the config file?


Hi @BrunoQuaresma,

Looking forward to see this plugin!

Secret information cannot be in the netlify.toml indeed. However you can either:

  • use an environment variable process.env.MY_SECRET inside the plugin. The user would need to add that environment variable in their Site settings
  • if your application has a configuration file, ask the user to put it there, then read that configuration file inside the plugin.

That being said, I have opened the following discussion to evaluate our current solutions. Any feedback is welcome!

1 Like

Thank you @ehmicky. It was really helpful!

1 Like