Mocking large sets of output with Terragrunt
Are there any solutions for mocking large sets of outputs (multiple dependency modules with multiple complex outputs) besides explicitly defining every output?
Mocks can be saved in YAML files and re-used as mock outputs multiple times Example: ``` . ├── module1 │ ├── main.tf │ ├── terraform.tfstate │ └── terragrunt.hcl ├── module2 │ ├── main.tf │ └── terragrunt.hcl └── module2_mocks.yaml ``` module2_mocks.yaml ``` vpc_id: "abc" ``` module1/terragrunt.hcl ``` dependency "module2" { config_path = "../module2" mock_outputs = yamldecode(file(find_in_parent_folders("module2_mocks.yaml"))) } inputs = { vpc_id = dependency.module2.outputs.vpc_id } ``` Reference to `vpc_id` will work because it is defined mocks, reference to another variable will generate errors: ``` vpc_id = dependency.module2.outputs.vpc_id2 ... Error: Unsupported attribute; This object does not have an attribute named "vpc_id2" ```