Scenario
Add Infra to Existing Project
Provision AWS ECS infrastructure for a project that was already scaffolded (without cloud infra). Use this workflow when you started with scaffold-only and are now ready to deploy to production.
Prerequisites
- An existing Fuel monorepo project (already scaffolded)
- OpenTofu >= 1.8 installed
- AWS account with IAM user that has Administrator access
- GitHub personal access token with repo and admin:repo_hook scopes
- ACM SSL certificate ARN for your domain
- FUEL CLI installed: npm install -g @swovohq/fuel
Make sure you are in the root directory of your existing Fuel project.
cd my-appRun fuel infra:init to interactively create the fuel.yml and .fuel-credentials files for your project.
fuel infra:init
$
Verify fuel.yml and credentials are correct before provisioning.
fuel config:verify fuel.yml
$
Run fuel infra:deploy --config fuel.yml to provision all AWS resources and push your existing code to a new GitHub repository.
fuel infra:deploy --config fuel.yml
$
Notes
- •If the command fails partway through, run fuel infra:deploy (without --config) to resume.
- •Use --plan-only first to preview the infrastructure changes before applying.
- •Use --tofu-only if you only want to run OpenTofu without touching GitHub.