Skip to content

apply command

This command allows you to apply a forma. It returns immediately with a command ID that you can use to query the command's progress later using the status command, unless --watch is set, in which case the command keeps outputting the status directly.

Usage

formae apply [OPTIONS] <forma file>

Options

Option Description
--force Overwrite any changes since the last reconcile without prompting [default: "false"]
--mode Apply mode (reconcile | patch). This flag is required.
--output-consumer Consumer of the command result (human | machine) [default: "human"]
--output-schema The schema to use for the result output (json | yaml) [default: "json"]
--simulate Simulate the command rather than make actual changes [default: "false"]
--status-output-layout What to print as status output (summary
--yes Allow the command to run without any confirmations [default: "false"]
--watch Watch mode: continuously refresh the status until completion [default: "false"]

Consumer

Currently, there are two consumers:

  • human (default): The CLI assumes a human user is interacting with it. Output is less strictly formatted and more verbose
  • machine: The CLI assumes the data printed to stdout will be processed by a machine or another tool

Mode

The apply command requires a mode flag (--mode) that determines how changes are applied. For detailed explanations of reconcile and patch modes, see Workflows.

Simulation

The apply command can be fully simulated. The result will be a dry run outputting all changes that would be made if the command would run for real.

Properties

Properties are exposed as CLI command options but are dynamically determined based on the forma file provided with the command. These options only become visible and available after parsing the forma, ensuring that all configuration options align perfectly with the specific infrastructure resources you're working with. This approach means there are no static property options to document here, as they are derived directly from the forma's content at runtime.

In order to see the available forma properties, run:

formae apply --help <some forma that has properties>