Skip to content

feat(helpers): add managed AWS Config S3 notifications - #653

Draft
edersonbrilhante wants to merge 2 commits into
mainfrom
feat/aws-config-notifications
Draft

feat(helpers): add managed AWS Config S3 notifications#653
edersonbrilhante wants to merge 2 commits into
mainfrom
feat/aws-config-notifications

Conversation

@edersonbrilhante

@edersonbrilhante edersonbrilhante commented Aug 13, 2026

Copy link
Copy Markdown
Member

Description

Add a managed regional delivery path to the AWS Config recording helper:

  • create a private, versioned, SSE-S3 delivery bucket by default
  • publish AWS Config .json.gz object notifications to an encrypted SQS queue with a dead-letter queue
  • restrict AWS Config and S3 service access by source account, Region, bucket, and queue
  • expose bucket and queue outputs for a Splunk Data Manager s3-custom-logs input
  • preserve caller-managed bucket compatibility through delivery_bucket_name
  • remove the obsolete AWS Config delivery policy from the shared storage helper
  • update the helper and Splunk Data Manager examples with an explicit output handoff and ingestion-validation guidance

Migration

Apply aws_config_recording and confirm AWS Config delivery to its new managed regional bucket before applying the updated storage module. The storage update deletes aws_s3_bucket_policy.config_delivery; callers that keep using an external delivery bucket must establish equivalent delivery permissions outside storage first.

This change does not delete the long-term bucket or its historical AWSLogs/<account-id>/Config/ objects. Retention, migration, and historical backfill remain separate operator decisions.

Type of Change

  • Feature
  • Bug Fix
  • Documentation
  • Refactor
  • Other: __________

Testing

  • tofu -chdir=modules/helpers/aws_config_recording test -no-color (6 passed)
  • tofu -chdir=modules/helpers/storage test -no-color (3 passed)
  • OpenTofu validation and TFLint for both affected helpers
  • Checkov: AWS Config helper (15 passed) and storage helper (12 passed), 0 failed
  • pytest -q tests/quality (27 passed)
  • repository pre-commit hooks, including Terraform validation, security checks, dependency audit, and formatting

No live AWS or Splunk deployment was performed.

@github-actions

Copy link
Copy Markdown
Contributor

Dependency Review

✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.

Scanned Files

None

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Automation gate tests

Result: passed

Suite Passed Failed Errors Skipped Total Duration Result
Automation gate tests 27 0 0 0 27 0.86s passed

Coverage: 85.22% (692/812 lines)

Lowest-covered Lambda files

File Coverage Missed lines

@github-actions

Copy link
Copy Markdown
Contributor

OPA/conftest tenant-isolation gate

Result: passed

Gate Result
conftest verify --policy policy/opa passed

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Offline IaC contract tests

Result: passed

Suite Passed Failed Errors Skipped Total Duration Result
Offline IaC contracts 128 0 0 0 128 5.25s passed

Coverage: 95.14% (1467/1542 lines)

Lowest-covered Lambda files

File Coverage Missed lines

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Mutation test critical Lambda boundaries

Result: passed

Suite Passed Failed Errors Skipped Total Duration Result
Mutation tests 17 0 0 0 17 1.48s passed

Coverage: 39.67% (1215/3063 lines)

Lowest-covered Lambda files

File Coverage Missed lines

Comment on lines +12 to +21
resource "aws_s3_bucket" "config_delivery" {
count = local.create_delivery_resources ? 1 : 0

#checkov:skip=CKV_AWS_145:SSE-S3 is compatible with AWS Config delivery and avoids a KMS key dependency for the archive.
#checkov:skip=CKV_AWS_144:Each recorder writes to a regional bucket; cross-region replication is outside this module's archival contract.
#checkov:skip=CKV_AWS_18:CloudTrail provides control-plane audit records; a separate access-log bucket is not part of this helper.
bucket = local.delivery_bucket_name
force_destroy = false
tags = local.all_security_tags
}
Comment on lines +12 to +21
resource "aws_s3_bucket" "config_delivery" {
count = local.create_delivery_resources ? 1 : 0

#checkov:skip=CKV_AWS_145:SSE-S3 is compatible with AWS Config delivery and avoids a KMS key dependency for the archive.
#checkov:skip=CKV_AWS_144:Each recorder writes to a regional bucket; cross-region replication is outside this module's archival contract.
#checkov:skip=CKV_AWS_18:CloudTrail provides control-plane audit records; a separate access-log bucket is not part of this helper.
bucket = local.delivery_bucket_name
force_destroy = false
tags = local.all_security_tags
}
Comment on lines +12 to +21
resource "aws_s3_bucket" "config_delivery" {
count = local.create_delivery_resources ? 1 : 0

#checkov:skip=CKV_AWS_145:SSE-S3 is compatible with AWS Config delivery and avoids a KMS key dependency for the archive.
#checkov:skip=CKV_AWS_144:Each recorder writes to a regional bucket; cross-region replication is outside this module's archival contract.
#checkov:skip=CKV_AWS_18:CloudTrail provides control-plane audit records; a separate access-log bucket is not part of this helper.
bucket = local.delivery_bucket_name
force_destroy = false
tags = local.all_security_tags
}
Comment on lines +23 to +33
resource "aws_s3_bucket_ownership_controls" "config_delivery" {
count = local.create_delivery_resources ? 1 : 0

# AWS Config delivers objects with the bucket-owner-full-control ACL.
#checkov:skip=CKV2_AWS_65:BucketOwnerPreferred preserves the ACL required by the AWS Config delivery contract.
bucket = aws_s3_bucket.config_delivery[0].id

rule {
object_ownership = "BucketOwnerPreferred"
}
}
@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

OpenTofu module tests (latest-stable)

Result: passed

OpenTofu version: 1.12.5

Metric Count
Passed modules 72
Failed modules 0
Total modules 72
Module Result
modules/helpers/ami_policy passed
modules/helpers/ami_sharing passed
modules/helpers/aws_config_recording passed
modules/helpers/cloud_custodian passed
modules/helpers/cloud_formation passed
modules/helpers/dedicated_mac_hosts passed
modules/helpers/ecr passed
modules/helpers/forge_subscription passed
modules/helpers/microvm passed
modules/helpers/opt_in_regions passed
modules/helpers/service_linked_roles passed
modules/helpers/storage passed
modules/infra/eks passed
modules/integrations/github_webhook_relay_destination passed
modules/integrations/github_webhook_relay_destination_receivers passed
modules/integrations/github_webhook_relay_destination_receivers/webex_webhook_relay passed
modules/integrations/splunk_aws_billing passed
modules/integrations/splunk_cloud_conf_shared passed
modules/integrations/splunk_cloud_data_manager passed
modules/integrations/splunk_cloud_data_manager/data_input passed
modules/integrations/splunk_cloud_data_manager/log_group_reconciler passed
modules/integrations/splunk_cloud_data_manager/sec_meta_ec2_tags passed
modules/integrations/splunk_cloud_data_manager_common passed
modules/integrations/splunk_dependency_monitor passed
modules/integrations/splunk_o11y_aws_integration passed
modules/integrations/splunk_o11y_aws_integration_common passed
modules/integrations/splunk_o11y_conf_shared passed
modules/integrations/splunk_o11y_conf_shared/dashboards/arc_runner_operations passed
modules/integrations/splunk_o11y_conf_shared/dashboards/aws_regional_health passed
modules/integrations/splunk_o11y_conf_shared/dashboards/aws_service_limits passed
modules/integrations/splunk_o11y_conf_shared/dashboards/billing passed
modules/integrations/splunk_o11y_conf_shared/dashboards/dependency_probes passed
modules/integrations/splunk_o11y_conf_shared/dashboards/dynamodb passed
modules/integrations/splunk_o11y_conf_shared/dashboards/ebs passed
modules/integrations/splunk_o11y_conf_shared/dashboards/forge_impact passed
modules/integrations/splunk_o11y_conf_shared/dashboards/k8s_control_plane passed
modules/integrations/splunk_o11y_conf_shared/dashboards/lambda passed
modules/integrations/splunk_o11y_conf_shared/dashboards/lambda_control_plane passed
modules/integrations/splunk_o11y_conf_shared/dashboards/metric_ingest passed
modules/integrations/splunk_o11y_conf_shared/dashboards/opencost passed
modules/integrations/splunk_o11y_conf_shared/dashboards/runner_ec2 passed
modules/integrations/splunk_o11y_conf_shared/dashboards/runner_k8s passed
modules/integrations/splunk_o11y_conf_shared/dashboards/runner_usage passed
modules/integrations/splunk_o11y_conf_shared/dashboards/s3 passed
modules/integrations/splunk_o11y_conf_shared/dashboards/s3_control_plane passed
modules/integrations/splunk_o11y_conf_shared/dashboards/sqs passed
modules/integrations/splunk_o11y_conf_shared/dashboards/sqs_control_plane passed
modules/integrations/splunk_o11y_conf_shared/detectors/aws_regional_health passed
modules/integrations/splunk_o11y_conf_shared/detectors/dependency_probes passed
modules/integrations/splunk_o11y_conf_shared/detectors/ec2_runner_health passed
modules/integrations/splunk_o11y_conf_shared/detectors/k8s passed
modules/integrations/splunk_opencost_eks passed
modules/integrations/splunk_otel_eks passed
modules/integrations/splunk_secrets passed
modules/integrations/splunk_stuck_workflow_job_dispatcher passed
modules/integrations/teleport passed
modules/integrations/teleport/tenant passed
modules/platform/arc passed
modules/platform/arc/scale_set passed
modules/platform/arc/scale_set_controller passed
modules/platform/arc_deployment passed
modules/platform/ec2_deployment passed
modules/platform/ec2_deployment/ec2_update_runner_ssm_ami passed
modules/platform/ec2_deployment/ec2_update_runner_tags passed
modules/platform/forge_runners passed
modules/platform/forge_runners/forge_trust_validator passed
modules/platform/forge_runners/github_actions_job_logs passed
modules/platform/forge_runners/github_app_runner_group passed
modules/platform/forge_runners/github_global_lock passed
modules/platform/forge_runners/github_webhook_relay passed
modules/platform/forge_runners/github_webhook_relay/source passed
modules/platform/forge_runners/redrive_deadletter passed

@github-actions

github-actions Bot commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

OpenTofu module tests (minimum-supported)

Result: passed

OpenTofu version: 1.11.0

Metric Count
Passed modules 72
Failed modules 0
Total modules 72
Module Result
modules/helpers/ami_policy passed
modules/helpers/ami_sharing passed
modules/helpers/aws_config_recording passed
modules/helpers/cloud_custodian passed
modules/helpers/cloud_formation passed
modules/helpers/dedicated_mac_hosts passed
modules/helpers/ecr passed
modules/helpers/forge_subscription passed
modules/helpers/microvm passed
modules/helpers/opt_in_regions passed
modules/helpers/service_linked_roles passed
modules/helpers/storage passed
modules/infra/eks passed
modules/integrations/github_webhook_relay_destination passed
modules/integrations/github_webhook_relay_destination_receivers passed
modules/integrations/github_webhook_relay_destination_receivers/webex_webhook_relay passed
modules/integrations/splunk_aws_billing passed
modules/integrations/splunk_cloud_conf_shared passed
modules/integrations/splunk_cloud_data_manager passed
modules/integrations/splunk_cloud_data_manager/data_input passed
modules/integrations/splunk_cloud_data_manager/log_group_reconciler passed
modules/integrations/splunk_cloud_data_manager/sec_meta_ec2_tags passed
modules/integrations/splunk_cloud_data_manager_common passed
modules/integrations/splunk_dependency_monitor passed
modules/integrations/splunk_o11y_aws_integration passed
modules/integrations/splunk_o11y_aws_integration_common passed
modules/integrations/splunk_o11y_conf_shared passed
modules/integrations/splunk_o11y_conf_shared/dashboards/arc_runner_operations passed
modules/integrations/splunk_o11y_conf_shared/dashboards/aws_regional_health passed
modules/integrations/splunk_o11y_conf_shared/dashboards/aws_service_limits passed
modules/integrations/splunk_o11y_conf_shared/dashboards/billing passed
modules/integrations/splunk_o11y_conf_shared/dashboards/dependency_probes passed
modules/integrations/splunk_o11y_conf_shared/dashboards/dynamodb passed
modules/integrations/splunk_o11y_conf_shared/dashboards/ebs passed
modules/integrations/splunk_o11y_conf_shared/dashboards/forge_impact passed
modules/integrations/splunk_o11y_conf_shared/dashboards/k8s_control_plane passed
modules/integrations/splunk_o11y_conf_shared/dashboards/lambda passed
modules/integrations/splunk_o11y_conf_shared/dashboards/lambda_control_plane passed
modules/integrations/splunk_o11y_conf_shared/dashboards/metric_ingest passed
modules/integrations/splunk_o11y_conf_shared/dashboards/opencost passed
modules/integrations/splunk_o11y_conf_shared/dashboards/runner_ec2 passed
modules/integrations/splunk_o11y_conf_shared/dashboards/runner_k8s passed
modules/integrations/splunk_o11y_conf_shared/dashboards/runner_usage passed
modules/integrations/splunk_o11y_conf_shared/dashboards/s3 passed
modules/integrations/splunk_o11y_conf_shared/dashboards/s3_control_plane passed
modules/integrations/splunk_o11y_conf_shared/dashboards/sqs passed
modules/integrations/splunk_o11y_conf_shared/dashboards/sqs_control_plane passed
modules/integrations/splunk_o11y_conf_shared/detectors/aws_regional_health passed
modules/integrations/splunk_o11y_conf_shared/detectors/dependency_probes passed
modules/integrations/splunk_o11y_conf_shared/detectors/ec2_runner_health passed
modules/integrations/splunk_o11y_conf_shared/detectors/k8s passed
modules/integrations/splunk_opencost_eks passed
modules/integrations/splunk_otel_eks passed
modules/integrations/splunk_secrets passed
modules/integrations/splunk_stuck_workflow_job_dispatcher passed
modules/integrations/teleport passed
modules/integrations/teleport/tenant passed
modules/platform/arc passed
modules/platform/arc/scale_set passed
modules/platform/arc/scale_set_controller passed
modules/platform/arc_deployment passed
modules/platform/ec2_deployment passed
modules/platform/ec2_deployment/ec2_update_runner_ssm_ami passed
modules/platform/ec2_deployment/ec2_update_runner_tags passed
modules/platform/forge_runners passed
modules/platform/forge_runners/forge_trust_validator passed
modules/platform/forge_runners/github_actions_job_logs passed
modules/platform/forge_runners/github_app_runner_group passed
modules/platform/forge_runners/github_global_lock passed
modules/platform/forge_runners/github_webhook_relay passed
modules/platform/forge_runners/github_webhook_relay/source passed
modules/platform/forge_runners/redrive_deadletter passed

@edersonbrilhante
edersonbrilhante force-pushed the feat/aws-config-notifications branch from 7486d14 to 5e77db6 Compare August 13, 2026 19:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants