Skip to content
CLI 5.75.0 Config as Code: zero-change adoption and volume preservation
antillesdigitalmedia
OP

an hour ago

We need version-specific guidance before migrating an existing service and volume to Config as Code. We have not applied IaC or changed ownership as part of this assessment.

  1. Restart-policy normalization: with CLI 5.75.0, how is an absent current restartPolicyType mapped against desired ON_FAILURE? The 5.71.1 release notes mention default-restart normalization. Does a zero-change plan establish that effective file-sourced restart behavior will be preserved when legacy configuration files stop being read, or is another verification required?

  2. Volume attachment metadata: SDK 3.18 normalization includes attachment-level volumeConfig, while native desired/current output can omit it and retain mountPath and the volume reference. Is volumeConfig helper-only metadata on this path? What supported checks establish preservation of the existing volume identity, mount, capacity, region and data during first adoption?

  3. First ownership claim: current public documentation says the first apply records ownership even with zero changes. Retained CLI 5.75.0 control-flow inspection appears to return on zero changes before invoking the apply runner. Which supported version/path records ownership in this case? Does first apply stage or redeploy anything, claim both declared service and volume, and leave undeclared, unowned services untouched?

  4. Rollback: what supported reversal restores pre-adoption ownership, effective service configuration and volume attachment if verification fails? We understand migrate undo restores stored configuration paths, deployment rollback restores retained image/custom variables, and partial release changes ownership metadata. We have not found a documented full-adoption rollback guarantee.

Please identify the supported migration version/path and any limitations. We want to resolve these semantics without using a production apply as the diagnostic.

Awaiting User Response

1 Reply

Railway
BOT

an hour ago

railway config plan compares your .railway/railway.ts with the settings stored on the Railway environment, not with the contents of railway.toml/railway.json. A zero-change plan therefore does not show that file-only behavior, such as a restart policy, will carry over once the file stops being read. Put those values into the IaC file, then confirm they are stored on the service before you remove the file or clear its path.

Cutover only clears each declared service's Config File path in the linked environment. It does not change build, start, variables or volumes, it does not deploy, and the volume stays mounted. Apply can delete a volume that the file omits. In a non-interactive run, destructive changes need --confirm-destructive, so a plan with no volume delete and no service delete is the check that applies here.

For named partials, the first apply claims every resource the file declares, and the apply runs even with no configuration changes. A partial deletes only resources it owns and leaves unowned ones alone. We can't confirm the exact 5.75.0 control flow you described. Migrating a single service creates a named partial, which then blocks whole-project applies in that environment. Migrate every service in the environment together.

No single command fully reverses an adoption. railway config migrate undo restores the stored config paths without deploying, and railway config partials release removes ownership while leaving resources running. If you need to rely on this path, try it first in a separate non-production environment.


Status changed to Awaiting User Response Railway • about 1 hour ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...