Managing applications with code

Is there a way to manage applications with code? Something like Terraform or AWS CDK for Fly.io?

I am considering Fly.io for a certain use case, and I’d need to manage about a dozen different apps and databases in different region-groups, and I’d really like to have all configuration coming from a Git repo with change history.

I can probably invent something that synchronizes with the GraphQL API, but wondering if there’s something that already exists.

The GraphQL that powers flyctl can do everything you need, but we don’t have a Terraform provider.

We’ve looked pretty closely at Pulumi, it shouldn’t be too hard to build a Pulumi provider for Fly. We just haven’t done it yet!

You might be able to do what you need with flyctl and some bash scripts, however. fly regions set, fly scale count, are fly scale vm are idempotent, you can safely run them over and over. If you create a bash file for a given app config, you can just run it over and over. You’d still have to create the initial postgres clusters and apps first, so it’s not perfect. But this is how I’d start.

1 Like