Configures VPC flow logs for the given VPC.
Creates the following resources:
- CloudWatch log group.
- IAM role.
- VPC Flow Log.
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
}| Name | Version |
|---|---|
| terraform | >= 0.13.0 |
| aws | >= 3.0 |
| Name | Version |
|---|---|
| aws | >= 3.0 |
No modules.
| 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 |
| 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 |
No outputs.