Railway IaC - Allow for service image to be managed externally

I bumped into an issue which means unfortunately I can't use your IaC (as much as I have been anticipating it and would love to). This may be due to my set up but I'm sure I'm not the only person.

For context, I have multiple services, all within a monorepo, as well as a Postgres database, RabbitMq and a bucket. The IaC would work fine for the "common" services such as the database but it falls down when implementing it for my services.

My current set up uses Docker image tags, applied to Railway via my GitLab CI/CD pipeline.

The problem I have is, because my service images are managed outside of Railway, when I add those services to IaC, it wants to overwrite them. So if I have image v1.0.0 in IaC and I run a deployment that pushes v1.1.0, the next time I run railway config apply it wants to downgrade the service.

I can omit the image from the service's config completely, but then when I deploy and apply the image, the next railway config apply wants to remove it again, along with the container registry credentials which I then need to add in manually.

It would be good if I could do something like source: preserve() (similar to how environment variables use it) so that I can manage the services config using IaC without managing the source image.

I think I could technically use IaC to deploy the image, but if there is some config for a separate service that I don't yet want to apply, and there's no way to apply config for only one service — config apply is whole-project. A --service flag would be good.

Under Review

0 Threads mention this feature

0 Replies

Welcome!

Sign in to your Railway account to join the conversation.

Loading...