terraform stacks migrate validate-manifest reference
Use the terraform stacks migrate validate-manifest command to validate a migrate
manifest and its expected filesystem layout.
Usage
$ TF_STACKS_MIGRATE_EXPERIMENTAL=true terraform stacks <global-stacks-flags> migrate validate-manifest <options>
Description
The terraform stacks migrate validate-manifest command reads a migrate manifest,
validates its schema, and checks the files and directories the manifest references. Use
this command after you prepare a manifest and before you translate the state.
Manifest paths resolve relative to the directory that contains the manifest unless the path is absolute.
The command validates that the following conditions are true:
- The manifest uses version
1. - The manifest contains at least one deployment.
- The manifest sets the top-level
source_configurationandstacks_configurationvalues. - Each deployment has a name, an inputs array, a
state.tfstatepath, and astate.tfstackstatepath. - Each deployment name is unique.
- Workspace IDs are unique if they are present.
- Each deployment input key appears only once per deployment.
- All deployments use the same input keys with the same sensitivity settings.
- The source configuration directory exists and is not empty.
- The Stack configuration directory and state artifact directories exist and are writable.
- Each
state.tfstatepath points to a readable Terraform state file created with Terraform v0.12+.
Options
-migrate-manifest: The path to the migrate manifest to validate.- Optional.
- String.
- Default:
migrate-manifest.json.
-json: Output results and diagnostics in JSON format instead of the default human-readable text format.- Optional.
- Boolean flag.
- Default:
false.
Examples
The following command validates the default migrate manifest:
$ TF_STACKS_MIGRATE_EXPERIMENTAL=true terraform stacks migrate validate-manifest
The following command validates a manifest at a custom path:
$ TF_STACKS_MIGRATE_EXPERIMENTAL=true terraform stacks migrate validate-manifest \
-migrate-manifest=./migration/migrate-manifest.json
The following command validates the manifest and returns the result in JSON format:
$ TF_STACKS_MIGRATE_EXPERIMENTAL=true terraform stacks migrate validate-manifest \
-migrate-manifest=./migration/migrate-manifest.json \
-json
Global flags
Refer to Global flags reference for information about flags you can use with all commands.