Skip to content

Generate

The terramate generate command generates files for all code generation strategies. For an overview of code generation strategies available please see the code generation documentation.

Usage

terramate generate [options]

Examples

Generate files for all configurations defined in the current directory and its subdirectories.

bash
terramate generate

To generate Terraform files targeting configurations defined within a specific subdirectory, use the -C (or --chdir) flag followed by the desired directory path.

bash
terramate -C some/dir generate

By default, Terramate returns status code = 0 when it succeeds at ensuring that all files are updated. Use the --detailed-exit-code flag to check when files were modified on disk.

bash
terramate generate --detailed-exit-code