Deploy cmd with toml config from stdin

Hi,

The deploy command is fly deploy for using the fly.toml from the current directory or fly deploy -c path/to/toml to specify the path of the config.
But is there a way to pass the config file in stdin ?
I tried cat conf.toml | fly deploy -c - but it is not working.

Regards,

I’m not sure there’s an way to do that through flyctl directly but I believe there’s combinations of bash commands we can use to make that possible!

  1. Do something that outputs a toml
  2. Pipe into a tmp file
  3. fly deploy -c /path/to/tmp/file

ok, if it’s not possible at the moment, because the point of my question is to avoid creating a file.
The scenario would be: A third party program would spawn the flyctl deploy command with a dynamic fly.toml.
So not writing a file but passing it in stdin would be nice.

There’s two other options in case creating a tmp file is out of the box

  1. Look into fly deploy --help to see if you can do everything you want through flags`
  2. Use https://api.machines.dev/ and run a deploy without flyctl (our CLI just uses this API behind the scenes!)
1 Like

Oh nice!

So which api endpoints are used in case of deploy command and set secret command with flyctl?

Our CLI is open source so you can find examples for everything

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.