Enable static IP for environments created via CLI
devilirika
PROOP

5 months ago

We are creating/deleting PR environments via CLI (because inbuilt PR environments don't fit our use case) but we noticed that static IP isn't assigned to newly created environment. The option is disabled and we have to enable it manually via UI, then re-deploy.

How can we improve that? Ideally, this could be scriptable from Github actions.

Solved

4 Replies

5 months ago

I don't believe we have an option for that via CLI right now. You could script that with our GraphQL API. Best place to play around with whats possible on that is https://railway.com/graphiql


Status changed to Awaiting User Response Railway 5 months ago


devilirika
PROOP

5 months ago

That works, thank you!


Status changed to Awaiting Railway Response Railway 5 months ago


Status changed to Solved devilirika 5 months ago


devilirika
PROOP

5 months ago

We are seeing intermittent issues enabling static IP via GraphQL. When it doesn't work, we get this error. What could it be? The environment and the service are definitely available when we are trying to enable the IP, we can query them by their ID.

```

{

"errors": [

{

"message": "ServiceInstance not found",

"locations": [

{

"line": 1,

"column": 78

}

],

"path": [

"egressGatewayAssociationCreate"

],

"extensions": {

"code": "INTERNAL_SERVER_ERROR"

},

"traceId": "127486003035721161"

}

],

"data": null

}

```


Status changed to Awaiting Railway Response Railway 5 months ago


5 months ago

This seems like a race condition; you may need to do a lookup loop to verify the service instance exists.


Status changed to Awaiting User Response Railway 5 months ago


Railway
BOT

4 months ago

This thread has been marked as solved automatically due to a lack of recent activity. Please re-open this thread or create a new one if you require further assistance. Thank you!

Status changed to Solved Railway 4 months ago


Welcome!

Sign in to your Railway account to join the conversation.

Loading...