Skip to main content
  • An application created with fjall create app, so an infrastructure.ts file exists.
  • The resource you want to change is already declared (add it first with fjall add).
  • Run the command from your project root, where the fjall/ directory lives.

Modify a resource

fjall modify changes the properties of an existing resource in an application’s infrastructure.ts. It edits the source file in place through the codemod engine, the same AST-based editor that powers fjall add and fjall remove.
fjall modify <type> [properties...] --app <name> --name <ResourceName>
Pass each property to change as a --<property> <value> pair. The --name value is the PascalCase resource name, and <type> is the resource category.

Examples

Change a database instance class:
fjall modify database --name AppDatabase --instanceClass db.t4g.medium --app api
Update a compute service port:
fjall modify compute --name ApiService --port 8080 --app api
Set several properties at once:
fjall modify database --name AppDatabase --instanceClass db.r6g.large --multiAz true --app web

What Happens

  1. Resolves the infrastructure.ts path for the application you pass to --app.
  2. Parses the file with the codemod engine (no AWS calls).
  3. Locates the resource named by --name and merges your --<property> <value> pairs into its declaration.
  4. Writes the updated file and records a snapshot under .fjall/history/.
fjall modify edits local source only. It never contacts AWS. To apply the change, deploy afterwards with fjall deploy <app>.

Property syntax

Every property is a flag with a trailing value. Value-less flags are rejected:
# correct
fjall modify compute --name ApiService --port 8080 --app api

# rejected: --port needs a value
fjall modify compute --name ApiService --port --app api

Resource types

<type> must be one of the codemod resource categories:
Value
databasemessaging
storagecdn
computenetwork
patternvpc-peer
vpc-peer-acceptercross-plan-connection

Agent mode

Pass --agent to emit structured output for AI agents instead of the interactive UI. The command applies the change and returns a result describing the resource, file path, and lines changed. Combine with --budget, --fields, and --full to tune the output.

Options

OptionDescriptionDefault
-a, --app <name>Application that owns the resource. Required.None
-n, --name <name>Resource name in PascalCase. Required.None
[properties...]One or more --<property> <value> pairs to apply.None
-v, --verboseEnable verbose logging.false
--non-interactiveForce plain CLI output (no UI).false
--agentEnable agent output mode.false
--budget <level>Output budget: minimal, compact, or a token count.None
--fields <fields>Request additional fields in the output.None
--fullDisable content truncation.false

Next Steps

fjall add

Add a new resource to an application’s infrastructure.

fjall list

List the resources declared in an application.

fjall deploy

Deploy the changed infrastructure to AWS.

Add resources

Learn how Fjall resources map to AWS services.