I am trying to access variables from variables.tf file inside terragrunt.hcl file.
Project structure:
| Terraform
| shared-folder
- variables.tf
-vars.tf
-terragrunt.hcl
This is the code snippet from .hcl file
locals{
account_vars = "${get_parent_terragrunt_dir()}/variables.tf"
env = local.account_vars.locals.account_name
}
remote_state {
backend = "s3"
config = {
bucket = get_env("STATEFILE_BUCKET", "terragrunt-${get_aws_account_id()}-statefiles")
key = "jsworld/state/jsTutorial-${local.env}.tfstate"
}
}
variables.tf
locals {
account_name = "devl"
}
How can I access this into .hcl file