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
23 stars 1 forks source link

adds `start_command` to service resource #15

Closed matifali closed 1 year ago

matifali commented 1 year ago

This is my first time working on a terraform provider and go. I did not add the tests. I would be happy if you could guide me in completing it.

pksunkara commented 1 year ago

startCommand is available in railway config file. https://docs.railway.app/deploy/config-as-code

As mentioned in the documentation:

⚠️ NOTE: All the other settings not specified here are recommended to be specified in the Railway config file.

Therefore, I am rejecting this PR.

matifali commented 1 year ago

@pksunkara I am trying to make it closer to other terraform providers that directly support a start command. For example fly.io. It will make it easier to just specify an image source and start command without needing to create a railway config file and track it in a repo.

resource railway_service "workspace" {
  image_source = "codercom/enterprise-base"
  start_command = coder_agent.me.init_script
}

The issue with a railway config is that it is not straight forward to use a dynamic startup script as the start command.

I am doing this in context of creating a native https://github.com/coder/coder template to be used with https://railway.app/template/coder.

Thanks.

pksunkara commented 1 year ago

I did not add the tests. I would be happy if you could guide me in completing it.

https://developer.hashicorp.com/terraform/plugin/sdkv2/testing/acceptance-tests is a good read.

pksunkara commented 1 year ago

Closing this until further update.

matifali commented 1 year ago

I don't think I will be able to find time to finish this any time in the near future. Thank you!