fjall add edits an application’s infrastructure.ts through the codemod engine. It does not deploy. Run fjall deploy afterwards to apply changes to AWS.Overview
fjall add appends a resource to an existing application’s infrastructure.ts. It writes valid CDK code, wires connections to existing resources, and reports the lines changed. The command runs the codemod engine directly in both human and agent modes. There is no interactive resource picker on this path.
Usage
Resource Types
<type> is one of these exact values:
There is no
proxy or service type, and there is no colon syntax. A database variant, RDS proxy, or additional ECS service is configured with property flags, not a separate type. fjall add database:Aurora is invalid.Property flags
Every flag after--app, --name, --verbose, and --non-interactive is a resource property, parsed as a --<name> <value> pair. Three rules apply:
- Each flag consumes the next token as its value. A trailing flag with no value is rejected.
- A flag immediately followed by another
--flagis rejected (no value-less booleans). Pass an explicit value such as--require-tls true. - Duplicate flags are rejected so typos surface instead of being silently overwritten.
Examples
Add a database
database is always the type. Choose the variant with the --type property (Aurora, Instance, GlobalAurora, ClickHouse, or DynamoDB):
DatabaseFactory.build("Analytics", { type: "Aurora", ... }).
Add a compute service
Add a storage bucket
Add a CDN distribution
Restore a database from a snapshot
Pass the snapshot details as property flags. The master username is baked into the snapshot:Add an RDS proxy
A proxy is a property of a database resource, configured with property flags such as--proxy and --max-connections:
Options
These are the only flags theadd command registers. Everything else is a property flag.
Agent options
For AI-agent and scripted use,add also accepts the standard agent flags:
Non-Interactive Mode
For CI/CD pipelines, pass--non-interactive with all required flags so no prompt is reached:
Connection Management
When adding a resource, Fjall detects existing resources, configures security groups, and sets environment variables on connected compute. Connected resources receive automatic environment variables:Add Multiple Resources
Chain commands for a multi-resource setup:Resource Naming
Resource names are PascalCase and must be unique within the application. Pick descriptive names such asAnalytics, Sessions, or Uploads so resources are easy to identify later. If a name conflicts with an existing resource, the codemod reports the conflict instead of overwriting.
After Adding a Resource
- Review the modified
infrastructure.ts. - List the application’s resources to confirm the change:
fjall list --app api. - Deploy to apply the change to AWS:
fjall deploy api.
Next Steps
fjall deploy
Apply the new resource to AWS.
fjall list
List the resources in an application’s infrastructure.ts.
fjall create
Create a new application before adding resources to it.
fjall secrets
Manage application secrets in AWS.