Back to Terragrunt

Find Json

docs/src/data/flags/find-json.mdx

1.0.3621 B
Original Source

import { Aside } from '@astrojs/starlight/components';

This flag is a convenient shorthand for --format=json. It's particularly useful when you need to process the results programmatically or integrate with other tools.

Example:

bash
$ terragrunt find --json | jq '.[:3]'
[
  {
    "type": "stack",
    "path": "basic"
  },
  {
    "type": "unit",
    "path": "basic/units/chick"
  },
  {
    "type": "unit",
    "path": "basic/units/chicken"
  }
]
<Aside type="note" title="Equivalent Flags">

The --json flag is equivalent to --format=json. You can use either one to get the same JSON output.

</Aside>