terraform stacks migrate translate-config reference
Use the terraform stacks migrate translate-config command to convert a traditional
Terraform root module into Terraform Stacks configuration.
Usage
$ TF_STACKS_MIGRATE_EXPERIMENTAL=true terraform stacks <global-stacks-flags> migrate translate-config <options>
Description
The terraform stacks migrate translate-config command reads a migrate manifest,
inspects the traditional Terraform root module, and writes a Terraform Stacks
configuration layout to the manifest's stacks_configuration path.
The generated layout contains component configuration, deployment configuration, and a
copy of the source module. The command validates the manifest before conversion so it can
report manifest or filesystem errors before writing files. Use validate-manifest when
you only need to validate the manifest and expected filesystem layout.
Options
-migrate-manifest: The path to the migrate manifest.- Optional.
- String.
- Default:
migrate-manifest.json.
-root-component-name: The name to use for the root component in generated Terraform Stacks configuration.- Optional.
- String.
- Default:
workspace.
-json: Output results in JSON format instead of the default human-readable text format.- Optional.
- Boolean flag.
- Default: false.
Examples
The following command generates Terraform Stacks configuration from the default migrate manifest:
$ TF_STACKS_MIGRATE_EXPERIMENTAL=true terraform stacks migrate translate-config
The following command generates Terraform Stacks configuration from a manifest at a custom path:
$ TF_STACKS_MIGRATE_EXPERIMENTAL=true terraform stacks migrate translate-config \
-migrate-manifest=./migration/migrate-manifest.json
The following command uses a custom root component name in the generated configuration:
$ TF_STACKS_MIGRATE_EXPERIMENTAL=true terraform stacks migrate translate-config \
-root-component-name=application
Global flags
Refer to Global flags reference for information about flags you can use with all commands.