terraform-community-providers / terraform-provider-railway

Terraform provider for railway.app
https://registry.terraform.io/providers/terraform-community-providers/railway/latest/docs
Mozilla Public License 2.0
22 stars 1 forks source link

Support builder & deploy settings for the service #7

Open matifali opened 1 year ago

matifali commented 1 year ago

I want to create a new railway project running a single service from a Dockerfile. How could this be achieved given the project and service are to be created from the terraform? I also want to modify the enrtypoint of the Dockerfile.

Funding

Fund with Polar

pksunkara commented 1 year ago

Not enough info.

matifali commented 1 year ago

Hi @pksunkara, I added more details to see if it helps.

pksunkara commented 1 year ago

You use the Railway config file. https://docs.railway.app/deploy/config-as-code

Example:

{
  "$schema": "https://railway.app/railway.schema.json",
  "build": {
    "builder": "DOCKERFILE",
    "dockerfilePath": "packages/api/Dockerfile",
    "watchPatterns": ["packages/api"]
  }
}

Please ask railway support if you have more questions.

matifali commented 1 year ago

But I am looking to achieve this using the terraform provider I see that we have resources for both service and project.

matifali commented 8 months ago

@pksunkara I guess this fork is doing exactly this.

pksunkara commented 8 months ago

Yes, and I would happily work with anyone (@mrbandler or you) to integrate those changes. After all, open source is about pooling efforts.

mrbandler commented 7 months ago

Yes, and I would happily work with anyone (@mrbandler or you) to integrate those changes. After all, open source is about pooling efforts.

Hi there, @pksunkara & @matifali; I am more than happy to implement changes to align with the current GraphQL API exposed by Railway.

It will just be a while since unfortunately, my company and my position there only allows me to do open-source work in between projects and when I find the time to do it.

Although, I fully intended to do it since I want to use Terraform and Railway for my side projects as well.

If any other culprits need fixing or features to be implemented, please open other issues so I am aware of them.

Many thanks to @pksunkara for the initial bootstrapping of the project!

matifali commented 7 months ago

@mrbandler Sounds great. Whenever you find time. It would be nice to have your changes consolidated here. 🌮

wertlex commented 2 months ago

Hey! I added num_replicas and region here: https://github.com/terraform-community-providers/terraform-provider-railway/pull/27