An open API service indexing awesome lists of open source software.

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.

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.