I've completed a thorough review of PR #3034. Here's a summary:
PR Review Summary
PR #3034: Phase 1 Module Extraction Status: All CI checks passing (previous review comment resolved)
High Priority Issues (3)
- S3 Module Uses Deprecated Patterns (
modules/s3/main.tf) - Uses inline
acl,logging,versioning,website,cors_ruleonaws_s3_bucket -
Deprecated since AWS Provider 4.0; other modules (
static_web,sftp) correctly use separate resources -
Hardcoded External IDs (
modules/kinesis/locals.tf:10-13) - Hevo connector external IDs are hardcoded in source code
-
Should be variables with
sensitive = true -
Overly Permissive KMS Policies (
modules/ddb/policy_doc.tf,modules/kinesis/kms.tf) - Both use
principals { identifiers = ["*"] }in KMS policies - Security scanners will flag this
Medium Priority (4)
- Inconsistent enable/disable patterns (
resource_countvscreatevs nothing) - Duplicate
aws_elb_service_accountdata source in S3 module - Missing
prevent_destroyon SFTP S3 buckets - Potential KMS cross-region replication permission gaps
Low Priority (4)
- Provider version constraint is loose (
>= 3.75.0) - Missing variable validation blocks
- Individual module READMEs are empty
- Docs workflow job may need explicit write permissions
Recommendation
Address the 3 high-priority issues before merging. The S3 deprecated patterns are the most pressing as they'll cause issues with provider upgrades. Medium/low items can be follow-up work.