rafaljanicki / terraform-aws-vpc-flow-logs

Configures VPC flow logs for the given VPC.

Home Page:https://registry.terraform.io/modules/trussworks/vpc-flow-logs

Repository from Github https://github.comrafaljanicki/terraform-aws-vpc-flow-logsRepository from Github https://github.comrafaljanicki/terraform-aws-vpc-flow-logs

Configures VPC flow logs for the given VPC.

Creates the following resources:

  • CloudWatch log group.
  • IAM role.
  • VPC Flow Log.

Usage

module "vpc_flow_logs" {
  source = "trussworks/vpc-flow-logs/aws"

  vpc_name       = local.vpc_name
  vpc_id         = module.vpc.vpc_id
  logs_retention = local.cloudwatch_logs_retention
}

Requirements

Name Version
terraform >= 0.13.0
aws >= 3.0

Providers

Name Version
aws >= 3.0

Modules

No modules.

Resources

Name Type
aws_cloudwatch_log_group.main resource
aws_flow_log.main resource
aws_iam_role.main resource
aws_iam_role_policy.main resource
aws_iam_policy_document.assume_role_policy data source
aws_iam_policy_document.role_policy data source

Inputs

Name Description Type Default Required
logs_retention Number of days you want to retain log events in the log group. number 90 no
tags A mapping of tags to assign to all resources map(string) {} no
vpc_id VPC ID to attach to. string n/a yes
vpc_name The VPC name is used to name the flow log resources. string n/a yes

Outputs

No outputs.

About

Configures VPC flow logs for the given VPC.

https://registry.terraform.io/modules/trussworks/vpc-flow-logs

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:HCL 100.0%