summaryrefslogtreecommitdiffstats
path: root/lua/conform/formatters/terragrunt_hclfmt.lua
blob: 71807466ed7210349bd773eddb9d0861df4b5171 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
---@type conform.FileFormatterConfig
return {
  meta = {
    url = "https://terragrunt.gruntwork.io/docs/reference/cli-options/#hclfmt",
    description = "Format hcl files into a canonical format.",
  },
  command = "terragrunt",
  args = { "hclfmt", "--terragrunt-hclfmt-file", "$FILENAME" },
  stdin = false,
  condition = function(self, ctx)
    return vim.fs.basename(ctx.filename) ~= "terragrunt.hcl"
  end,
}