Standards and workflows for building secure, well-structured Terraform modules, including planning gates, validation steps, and implementation guidance.
82
84%
Does it follow best practices?
Impact
80%
1.77xAverage score across 5 eval scenarios
Passed
No known issues
A new engineer joining the platform team has flagged that the modules/deepmerge/ utility module is poorly documented. The module itself is stable and widely used internally — it merges YAML maps/objects via utils_deep_merge_yaml — but the only documentation that exists is the sparse inline comments in the Terraform files themselves. There's no explanation in the modules index of when to use it, what problem it solves, or what its key inputs/outputs are.
The team lead has asked you to add a proper description of the deepmerge module to the repository documentation so it shows up correctly when engineers look for merge utilities. The existing module source code should not be changed — this is purely a documentation task to improve discoverability.
Complete this task as you normally would, including any record-keeping that the team expects after meaningful work.
Updated repository documentation files reflecting the improved deepmerge module description. Include any task record-keeping your workflow requires.
The following files represent the current state of the repository's documentation and the deepmerge module. Extract them before beginning.
=============== FILE: docs/repo-indexes/modules.md ===============
Navigate local helper modules under modules/ that affect root-module behavior.
modules/deepmerge/: merges maps/objects via utils_deep_merge_yamlmodules/event_triggers/: EventBridge rules and SQS event source mappings for Lambdasmodules/method_settings/: per-endpoint API Gateway method settings fan-outmodules/deepmerge/main.tfmodules/deepmerge/variables.tfmodules/event_triggers/main.tfmodules/event_triggers/variables.tfmodules/method_settings/main.tfmodules/method_settings/method_settings_loop/main.tfutils_deep_merge_yaml, mergedaws_cloudwatch_event_rule, aws_lambda_event_source_mappingaws_api_gateway_method_settings=============== FILE: docs/repo-indexes/repo-root.md ===============
Navigate the Terraform module at the repository root.
main.tf: core resources, Lambda assembly, API Gateway construction, OpenAPI generation, VPC/WAF hooks, log subscriptionsvariables.tf: module inputs for lambdas, API behavior, DNS, WAF, supporting resources, ElastiCache, secrets, SSMoutputs.tf: module outputs for OpenAPI, Lambda artifacts, VPC, method settings, secrets, ElastiCachedns.tf: ACM validation, custom domains, base path mappings, Route53 recordsmemcached.tf: optional ElastiCache cluster wiringversions.tf: provider requirements and alias expectationsREADME.md: public module descriptionAGENTS.md: agent entrypointaws_lambda_function, aws_lambda_aliasaws_security_group, aws_vpc_security_group_paths_spec, x-amazon-apigatewayaws_api_gateway_domain_name, aws_route53_record, acm_validationsmodule.elasticache, dynamodb_tables, sqs_queues=============== FILE: modules/deepmerge/variables.tf =============== variable "base" { description = "The base map to merge into" type = any }
variable "override" { description = "The override map whose values take precedence" type = any }
=============== FILE: modules/deepmerge/main.tf ===============
locals { merged = yamldecode( provider::utils::deep_merge_yaml( yamlencode(var.base), yamlencode(var.override) ) ) }
output "merged" { description = "The deeply merged result" value = local.merged }