Skip to content

Latest commit

 

History

History
97 lines (65 loc) · 3.17 KB

README.md

File metadata and controls

97 lines (65 loc) · 3.17 KB

GitHub release (latest SemVer)

terraform-aws-vpc-flow-logs

Terraform module for enabling AWS VPC flow logs with CloudWatch sink.

Terraform versions

Terraform 0.12. Pin module version to ~> v1.1.0. Submit pull-requests to master branch.

Usage

module "vpc-flow-logs" {
  source = "umotif-public/vpc-flow-logs/aws"
  version = "~> 1.1.0"

  name_prefix = "test-example"
  vpc_id      = "vpc-1sadasdasd123"

  traffic_type = "ALL"

  tags = {
    Project = "Test"
  }
}

Assumptions

Module is to be used with Terraform > 0.12.

Examples

Authors

Module managed by Marcin Cuber LinkedIn.

Requirements

Name Version
terraform >= 0.12.6
aws >= 2.55

Providers

Name Version
aws >= 2.55

Inputs

Name Description Type Default Required
kms_key_id The ARN of the KMS Key to use when encrypting log data. Please note, after the AWS KMS CMK is disassociated from the log group, AWS CloudWatch Logs stops encrypting newly ingested data for the log group. All previously ingested data remains encrypted, and AWS CloudWatch Logs requires permissions for the CMK whenever the encrypted data is requested. string "" no
max_aggregation_interval The maximum interval of time during which a flow of packets is captured and aggregated into a flow log record. Valid Values: 60 seconds (1 minute) or 600 seconds (10 minutes) string "600" no
name_prefix A prefix used for naming resources. string n/a yes
retention_in_days Specifies the number of days you want to retain log events in the specified log group. string "" no
tags Default tags attached to all resources. map(string) {} no
traffic_type The type of traffic to capture. Valid values: ACCEPT, REJECT, ALL. string "ALL" no
vpc_id VPC ID where resources will be created and flow logs enabled. string n/a yes

Outputs

Name Description
vpc_flow_logs_cloudwatch_group_arn The ARN specifying the log group used by Flow Logs.
vpc_flow_logs_id The Flow Log ID.
vpc_flow_logs_role_arn The ARN specifying the role used by Flow Logs.
vpc_flow_logs_role_id The ID specifying the role used by Flow Logs.

License

See LICENSE for full details.

Pre-commit hooks

Install dependencies

MacOS

brew install pre-commit terraform-docs tflint

brew tap git-chglog/git-chglog
brew install git-chglog