cloudwatch-logs

CloudWatch Logs Module Documentation

This directory contains machine-readable documentation for the AWS CloudWatch Logs Terraform module.

Files

Documentation Structure

The module.hcl.yaml file contains:

Inputs (5 variables)

NameTypeRequiredDescription
log_group_namestringYesName of the CloudWatch Log Group (immutable, forceReplace)
retention_in_daysnumberNoDays to retain log events (default: 30)
kms_key_arnstringNoKMS key ARN for encryption (immutable)
metric_filterslist(object)NoMetric filters for log-to-metric conversion
tagsmap(string)NoResource tags for organization

Outputs (2 values)

NameTypeDescription
log_group_arnstringARN for IAM policies and cross-account access
log_group_namestringName for CloudWatch Logs Insights queries

Behaviors (5 patterns)

  • Log group name immutability and data loss warnings
  • KMS key immutability requiring recreation
  • Immediate retention changes
  • Metric filter forward-only processing
  • Mandatory encryption-at-rest

Examples (2 scenarios)

  • simple - Minimal configuration with required inputs only
  • complete - Full configuration with encryption, filters, and tags

Usage

For Humans

Read the YAML to understand:

  • Variable constraints and validation rules
  • Default behaviors and side effects
  • Example values for different use cases
  • Relationships between variables

For Machines

Parse the YAML to:

  • Generate UI forms with validation
  • Index for module registries
  • Enforce policy compliance
  • Generate API documentation
  • Validate module usage

Schema Version

apiVersion: hcl.terraform.io/v1alpha1

Quality Metrics

MetricValue
Inputs documented5/5 (100%)
Outputs documented2/2 (100%)
Inputs with remarks5/5 (100%)
Inputs with examples5/5 (100%)
Behaviors documented5
Example scenarios2
i18n supporten, fr

Completeness Checklist

  • All inputs have summary + remarks
  • All inputs have 2+ concrete examples
  • Complex types have complete object examples
  • All outputs have remarks explaining usage
  • All outputs have example values
  • Validation rules are complete
  • Immutable/forceReplace flags set correctly
  • Behavioral interactions documented
  • Example scenarios described
  • i18n annotations included

References