https://github.com/trussworks/terraform-aws-vpc-flow-logs
Configures VPC flow logs for the given VPC.
https://github.com/trussworks/terraform-aws-vpc-flow-logs
aws aws-vpc terraform terraform-modules
Last synced: 6 months ago
JSON representation
Configures VPC flow logs for the given VPC.
- Host: GitHub
- URL: https://github.com/trussworks/terraform-aws-vpc-flow-logs
- Owner: trussworks
- License: bsd-3-clause
- Created: 2019-09-11T20:11:07.000Z (about 6 years ago)
- Default Branch: main
- Last Pushed: 2023-06-08T20:44:37.000Z (over 2 years ago)
- Last Synced: 2025-03-30T01:11:16.429Z (6 months ago)
- Topics: aws, aws-vpc, terraform, terraform-modules
- Language: HCL
- Homepage: https://registry.terraform.io/modules/trussworks/vpc-flow-logs
- Size: 29.3 KB
- Stars: 2
- Watchers: 8
- Forks: 9
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Configures VPC flow logs for the given VPC.
Creates the following resources:
* CloudWatch log group.
* IAM role.
* VPC Flow Log.## Usage
```hcl
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](#requirement\_terraform) | >= 1.0 |
| [aws](#requirement\_aws) | >= 3.0 |## Providers
| Name | Version |
|------|---------|
| [aws](#provider\_aws) | >= 3.0 |## Modules
No modules.
## Resources
| Name | Type |
|------|------|
| [aws_cloudwatch_log_group.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/cloudwatch_log_group) | resource |
| [aws_flow_log.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/flow_log) | resource |
| [aws_iam_role.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
| [aws_iam_role_policy.main](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
| [aws_iam_policy_document.assume_role_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |
| [aws_iam_policy_document.role_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/iam_policy_document) | data source |## Inputs
| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| [logs\_retention](#input\_logs\_retention) | Number of days you want to retain log events in the log group. | `number` | `90` | no |
| [tags](#input\_tags) | A mapping of tags to assign to all resources | `map(string)` | `{}` | no |
| [vpc\_id](#input\_vpc\_id) | VPC ID to attach to. | `string` | n/a | yes |
| [vpc\_name](#input\_vpc\_name) | The VPC name is used to name the flow log resources. | `string` | n/a | yes |## Outputs
No outputs.