So I have 2 modules 1 depending on the other.
patching_group -> common
I haven’t re-applied “common” so I know it’s missing some outputs I have added recently.
So I understood that mock are there for that usage.
This is my patching_group terragrunt.hcl:
locals {
...
}
terraform {
source = ...
}
include {
path = find_in_parent_folders()
}
dependency "common" {
config_path = "../common"
mock_outputs = {
log_bucket = "log-bucket"
auto_patching_metadata_amazon_linux_patch_baseline = "mock"
auto_patching_metadata_centos_patch_baseline = "mock"
auto_patching_metadata_role_arn = "mock"
auto_patching_metadata_ubuntu_patch_group = "mock"
auto_patching_metadata_windows_os_apps_patch_baseline = "mock"
}
}
inputs = {
auto_patching_metadata_amazon_linux_patch_baseline = dependency.common.outputs.auto_patching_metadata_amazon_linux_patch_baseline
auto_patching_metadata_centos_patch_baseline = dependency.common.outputs.auto_patching_metadata_centos_patch_baseline
auto_patching_metadata_role_arn = dependency.common.outputs.auto_patching_metadata_role_arn
auto_patching_metadata_ubuntu_patch_group = dependency.common.outputs.auto_patching_metadata_ubuntu_patch_group
auto_patching_metadata_windows_os_apps_patch_baseline = dependency.common.outputs.auto_patching_metadata_windows_os_apps_patch_baseline
log_bucket = dependency.common.outputs.log_bucket
patch_maintenance_window_schedule = "cron(20 6 ? * SUN *)" # At 06:20 every Sunday of the month
patch_maintenance_window_schedule_2 = "cron(20 6 ? * SAT *)" # At 06:20 every Saturday of the month
}
When running init/plan/apply/validate:
terragrunt plan
[terragrunt] [.../patching_groups] 2020/12/18 12:55:47 Running command: terraform --version
[terragrunt] 2020/12/18 12:55:48 Terraform version: 0.13.5
[terragrunt] 2020/12/18 12:55:48 Reading Terragrunt config file at .../patching_groups/terragrunt.hcl
[terragrunt] [.../common] 2020/12/18 12:55:48 Assuming IAM role ...
[terragrunt] [.../common] 2020/12/18 12:55:49 Generated file .../common/.terragrunt-cache/533830599/backend.tf.
[terragrunt] [.../common] 2020/12/18 12:55:49 Running command: terraform init -get=false -get-plugins=false
[terragrunt] [.../common] 2020/12/18 12:57:05 Running command: terraform output -json
[terragrunt] 2020/12/18 12:57:10 .../patching_groups/terragrunt.hcl:29,83-134: Unsupported attribute; This object does not have an attribute named "auto_patching_metadata_amazon_linux_patch_baseline"., and 6 other diagnostic(s)
[terragrunt] 2020/12/18 12:57:10 Unable to determine underlying exit code, so Terragrunt will exit with error code 1
Do I need to specify more things in the mock?
My terragrunt version is:
terragrunt --version
terragrunt version v0.26.7