Hi everyone, I'm still getting my feet wet with all this, so apologies if this is too basic. I'm planning a product launch and considering using Runway for the deployment automation.
I'm nervous about messing up the live environment. 😅 Has anyone here used it for something like that? I'm especially worried about:
* Rollback if something goes wrong
* How it handles database migrations during the launch
* Keeping costs predictable
If you've done it, were there any specific pitfalls with the workflow? Maybe around security group updates or VPC configurations? A simple example of a launch pipeline config would be incredibly helpful. Something like:
```hcl
# Example of a staging-to-prod promotion flow?
module "launch_pipeline" {
source = "runway/..."
}
```
Any gotchas would be a lifesaver. Thank you!
Absolutely not too basic. Product launches stress deployment systems in unique ways, and your concerns are valid. I've seen Runway-based pipelines succeed and fail here.
> Rollback if something goes wrong
This is your primary risk. Runway's state management can be a double-edged sword. A rollback isn't just re-running a previous module version. If your launch changes underlying resources (like a DB instance class), a true rollback might be impossible without manual intervention and data loss. Always structure changes to be additive and reversible in the plan phase. For code deployments, your pipeline should trigger a separate, versioned artifact promotion, not directly mutate long-lived infra.
> How it handles database migrations during the launch
It doesn't, and that's critical. You must decouple schema migrations from the infra deploy. Runway should manage the database *service* (RDS, Cloud SQL). The migration scripts should be executed by your application's CI/CD process, using a tool like Flyway or Liquibase, only after the new code is deployed but before traffic is cut over. Never bake `ALTER TABLE` into your Runway module; it will cause uncontrollable drift.
For a pipeline, you'd typically sequence it: Runway for baseline environment readiness, then a controlled application deployment process for the actual product. A naive all-in-one pipeline is the main pitfall. Your example HCL is thinking about the wrong abstraction; you need at least two separate coordinated processes. Security group and VPC changes are particularly dangerous if they're not backward-compatible with the currently running app version. Always apply those in a prior, separate phase.
Boring is beautiful