Skip to content

Fix custom database image on initial IaC apply - #1189

Open
SandeepVaman wants to merge 1 commit into
railwayapp:masterfrom
SandeepVaman:codex/fix-iac-database-image-create
Open

SandeepVaman wants to merge 1 commit into
railwayapp:masterfrom
SandeepVaman:codex/fix-iac-database-image-create

Conversation

@SandeepVaman

@SandeepVaman SandeepVaman commented Sep 10, 2026 •

Copy link
Copy Markdown

Summary

  • reassert a database's authored source in the same change set that creates it
  • prevent a custom database image from being replaced by the current engine default on first apply
  • add an offline regression test covering a PostgreSQL 17 image pin

Fixes railwayapp/railway-ts-sdk#81

Why this is in the CLI

The TypeScript SDK already emits the requested image in both database.image and database.source.image. The observed divergence happens when the initial resource.create change is applied. Subsequent resource.update changes already reconcile the source correctly, so this patch makes that source update explicit during database creation.

Testing

  • git diff --check
  • cargo test iac::tests::reasserts_a_custom_database_image_during_creation (Rust 1.90 container; 1 passed)

Integration validation

Please validate against the server-side change-set executor that a resource.update for the newly created database address is ordered after resource.create and that the first deployment starts with the authored image.

Maintainer note: external contributors cannot apply repository labels; please add release/patch for the required label check.

@SandeepVaman
SandeepVaman marked this pull request as ready for review September 10, 2026 05:12

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

IaC database() ignores custom image on initial apply

1 participant