Enable static IP for environments created via CLI
devilirika
PROOP

a month 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

a month 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 about 1 month ago


devilirika
PROOP

a month ago

That works, thank you!


Status changed to Awaiting Railway Response Railway about 1 month ago


Status changed to Solved devilirika about 1 month ago


devilirika
PROOP

a month 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 26 days ago


a month 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 26 days ago


Railway
BOT

19 days 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 19 days ago


Loading...