Make pulled Postgres IaC reusable for new projects
andrewkucz
PROOP

14 hours ago

When I pull IaC from an existing project, Postgres and its volume are declared separately:

const Postgres = postgres("Postgres");

const postgresVolume = volume("postgres-volume", {
  sizeMB: 5000,
});

There’s no explicit connection between them. This seems fine for preserving existing state, but unclear or non-idempotent when applying the same config to a brand-new project. Will postgres() create its own volume while this creates another detached one?

It would be nice if the relationship could be represented directly, something like:

const Postgres = postgres("Postgres", {
  volume: postgresVolume,
});

That would make pulled IaC feel like a reusable infrastructure definition rather than a snapshot that only works correctly against the original project.

Under Review

0 Threads mention this feature

0 Replies

Welcome!

Sign in to your Railway account to join the conversation.

Loading...