Skip to content

Auto-generated

This page is generated by terraform-docs at build time from the infra/ repo. Do not edit manually.

VPC Flow Logs

One S3 destination bucket per region for VPC flow logs, and one flow log per VPC delivering into it. Part of the account security baseline (IS-67).

The bucket is private, versioned, AES256-encrypted with the bucket key, owner enforced, denies plaintext transport and only accepts writes from the log delivery service of this account and region. Objects and old versions expire after retention_days; the audit trail beyond that lives in CloudTrail.

Flow logs capture ALL traffic at the 10-minute aggregation interval in the default v2 format, plain text, no Hive partitioning, so existing readers of the buckets keep working.

Requirements

Name Version
terraform >= 1.6.0
aws ~> 6.0

Providers

Name Version
aws 6.66.0

Modules

No modules.

Resources

Name Type
aws_flow_log.this resource
aws_s3_bucket.this resource
aws_s3_bucket_lifecycle_configuration.this resource
aws_s3_bucket_ownership_controls.this resource
aws_s3_bucket_policy.this resource
aws_s3_bucket_public_access_block.this resource
aws_s3_bucket_server_side_encryption_configuration.this resource
aws_s3_bucket_versioning.this resource
aws_caller_identity.current data source
aws_iam_policy_document.bucket data source
aws_region.current data source

Inputs

Name Description Type Default Required
base_tags Base tags to apply to all resources map(string) {} no
bucket_name Name of the S3 bucket that receives the flow logs (one per region) string n/a yes
lifecycle_rule_id ID of the expiration lifecycle rule. Overridable so an imported bucket keeps its existing rule name. string "DeleteLogsAfter180Days" no
name_prefix Prefix for the flow log Name tags string n/a yes
retention_days Days after which current and noncurrent flow log objects expire number 180 no
vpc_ids VPCs to log, keyed by a short stable name used in the resource address and Name tag map(string) n/a yes

Outputs

Name Description
bucket_arn ARN of the flow log destination bucket
bucket_name Name of the flow log destination bucket
flow_log_ids Flow log IDs keyed by the vpc_ids key