Skip to content

How I get the directory name up level? #625

Answered by Fabianoshz
weyderfs asked this question in How do I
Discussion options

You must be logged in to vote

Try this:

locals {
  parent = "${get_terragrunt_dir()}/../"
  name = basename(dirname(local.parent))
}

input = {
   name = local.name
}

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
1 reply
@weyderfs
Comment options

Comment options

You must be logged in to vote
1 reply
@weyderfs
Comment options

Answer selected by weyderfs
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants