terragrunt.hcl

From wikieduonline
Revision as of 15:25, 20 June 2023 by Welcome (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

Blocks


Examples[edit]

include {
  path = find_in_parent_folders()
}

generate "remote_states" {
  path      = "tg_remote_states.tf"
  if_exists = "overwrite"
  contents = templatefile("../../../remote-states.tmpl",
  {
    remote_states = [
      {
        "name" = "vpc"
        "bucket" = "${get_env("AWS_SESSION_NAME")}-state-storage"
        "key" = "terraform/${get_env("AWS_SESSION_NAME")}/${get_env("AWS_ENV")}-vpc"
      }
    ]
  })
}

See also[edit]

  • https://terragrunt.gruntwork.io/docs/reference/built-in-functions/#find_in_parent_folders
  • Advertising: