terragrunt icon indicating copy to clipboard operation
terragrunt copied to clipboard

unable to make include / exclude work

Open rrey-aviatrix opened this issue 2 years ago • 3 comments

$ terragrunt --version
terragrunt version v0.36.3

I have the following tree:

.
├── README.md
├── infra
│   ├── common.hcl
│   ├── dev
│   │   ├── env.hcl
│   │   └── us-east-2
│   │       ├── eks
│   │       │   └── terragrunt.hcl
│   │       ├── eks-aws-auth
│   │       │   └── terragrunt.hcl
│   │       ├── ingress-controller
│   │       │   └── terragrunt.hcl
│   │       ├── region.hcl
│   │       └── vpc
│   │           └── terragrunt.hcl
├── global
│   ├── dns
│   │   └── terragrunt.hcl
│   ├── iam-aws
│   │   └── terragrunt.hcl
│   └── region.hcl

When running the command terragrunt run-all validate --terragrunt-include-dir global/ I expected that everything under global directory would be validated, but nothing is detected:

$ terragrunt run-all validate  --terragrunt-include-dir global/
INFO[0002] The stack at <repo_dir> will be processed in the following order for command validate:
$

I have been trying to use --terragrunt-include-dir and/or --terragrunt-exclude-dir without success. Am I missing something ?

rrey-aviatrix avatar Mar 10 '22 15:03 rrey-aviatrix

Hi, it is also not working for case like --terragrunt-include-dir global/* ?

https://terragrunt.gruntwork.io/docs/reference/cli-options/#terragrunt-include-dir

denis256 avatar Mar 10 '22 20:03 denis256

I tried the following:

$ cd infra/
$ terragrunt run-all validate  --terragrunt-include-dir dev
INFO[0001] The stack at <repo_dir>/infra will be processed in the following order for command validate:
$ terragrunt run-all validate  --terragrunt-include-dir dev/*
INFO[0001] The stack at <repo_dir>/infra will be processed in the following order for command validate:
$

rrey-aviatrix avatar Mar 11 '22 09:03 rrey-aviatrix

any feedback please ? I now face another case I would need include/exclude and can't figure out the problem ...

rrey-aviatrix avatar Jun 07 '22 10:06 rrey-aviatrix