terragrunt
terragrunt copied to clipboard
Cache is generating in wrong way
I'm using Terragrunt to manage a quite large amount of AWS accounts (>100).
I don't need to categorize these accounts per region/env (every account is independent, managed by different unit), my current directory strategy is looking in this way:
├──cloud-configuration
│ ├── infra
│ ├── terragrunt.hcl
│ │ ├── IT
│ │ │ ├──1234567890
│ │ │ │ ├── ap-northeast-1
│ │ │ │ ├── ap-northeast-2
...
│ │ │ │ ├── ap-south-1
│ │ │ │ │ ├── region.hcl
│ │ │ │ │ └── CONFIG_RULES
│ │ │ │ │ └── REQUIRED_TAGS
│ │ │ │ │ │ └── terragrunt.hcl
│ │ │ │ ├── us-west-1
│ │ │ │ └── us-west-2
│ │ │ │ ├──2345678901
│ │ │ │ ├── ap-northeast-1
│ │ │ │ ├── ap-northeast-2
...
│ │ │ │ ├── ap-south-1
│ │ │ │ │ ├── region.hcl
│ │ │ │ │ └── CONFIG_RULES
│ │ │ │ │ └── REQUIRED_TAGS
│ │ │ │ │ │ └── terragrunt.hcl
│ │ │ │ ├── us-west-1
│ │ │ │ └── us-west-2
├── cloud-modules-aws-config-rules
│ ├── REQUIRED_TAGS
As the administrator, I'm implementing unique account configurations, like AWS Config Rules. Every region has a different configuration (different pack of AWS Config Rules).
Unfortunately, I realized that Terragrunt is generating for every region and for every rule an incredible size of the cache.
Issue:
├──cloud-configuration
│ ├── infra
│ ├── terragrunt.hcl
│ │ ├── IT
│ │ │ ├──1234567890
│ │ │ │ ├── ap-northeast-1
│ │ │ │ ├── ap-northeast-2
...
│ │ │ │ ├── ap-south-1
│ │ │ │ │ ├── region.hcl
│ │ │ │ │ └── CONFIG_RULES
│ │ │ │ │ └── REQUIRED_TAGS
│ │ │ │ │ │ └── terragrunt.hcl
│ │ │ │ │ │ └── .terragrunt-cache
│ │ │ │ │ │ │ └──cloud-configuration
│ │ │ │ │ │ │ │ └──infra
│ │ │ │ │ │ │ │ └──...
│ │ │ │ ├── us-west-1
│ │ │ │ └── us-west-2
│ │ │ │ ├──2345678901
│ │ │ │ ├── ap-northeast-1
│ │ │ │ ├── ap-northeast-2
...
│ │ │ │ ├── ap-south-1
│ │ │ │ │ ├── region.hcl
│ │ │ │ │ └── CONFIG_RULES
│ │ │ │ │ └── REQUIRED_TAGS
│ │ │ │ │ │ └── terragrunt.hcl
│ │ │ │ │ │ └── .terragrunt-cache
│ │ │ │ │ │ │ └──cloud-configuration
│ │ │ │ │ │ │ │ └──infra
│ │ │ │ │ │ │ │ └──...
│ │ │ │ ├── us-west-1
│ │ │ │ └── us-west-2
├── cloud-modules-aws-config-rules
│ ├── REQUIRED_TAGS
For every account (>100) the cache is generated to every region (16) and for every module (every AWS Config Rule) In the end, the execution took hours to plan all and apply all.
https://github.com/gruntwork-io/terragrunt/issues/1390
Hi,
I was wondering if can be used --terragrunt-download-dir <persistent-path>
to help keep cached dependencies between runs
Hi @denis256 ,
The --terragrunt-download-dir
@headincl0ud you come up with a solution? we're facing something similar
Same issue here. As we add more and more resources, terragrunt seems have to become slower and slower.
+1 very slow
Extremely slow for me as well, anyone found a solution?