vpc-flow-logs-s3-bucket

cloudposse/vpc-flow-logs-s3-bucket/aws

Terraform Module HCL AWS

Terraform module to provision s3-backed flow logs for VPC and subnets

Install
module "vpc-flow-logs-s3-bucket" {
source = "cloudposse/vpc-flow-logs-s3-bucket/aws"
version = "1.3.1"
}
⭐ Source on GitHub 📦 Registry page
README

Terraform module to create AWS VPC Flow logs backed by S3. > [!TIP] > #### 👽 Use Atmos with Terraform > Cloud Posse uses atmos to easily orchestrate multiple environments using Terraform. > Works with Github Actions, Atlantis, or Spacelift. > > > Watch demo of using Atmos with Terraform > > Example of running atmos to manage infrastructure from our Quick Start tutorial. > Introduction The module will create: S3 bucket with server side encryption KMS key to encrypt flow logs files in the bucket * Optional VPC Flow Log backed by the S3 bucket (this can be disabled, e.g. in multi-account environments if you want to create an S3 bucket in one account and VPC Flow Logs in different accounts) Usage For a complete example, see examples/complete. For automated tests of the complete example using b

Inputs (46)
NameTypeDescriptionDefault
environmentstringID element. Usually used for region e.g. 'uw2', 'us-west-2', OR role 'prod', 'stnull
label_orderlist(string)The order in which the labels (ID elements) appear in the `id`. Defaults to ["nanull
lifecycle_rule_enabledboolDEPRECATED: Use `lifecycle_configuration_rules` instead. When `true`, configuresnull
bucket_namestringBucket name. If not provided, the bucket will be created with a name generated f""
access_log_bucket_prefixstringPrefix to prepend to the current S3 bucket name, where S3 access logs will be se"logs/"
tagsmap(string)Additional tags (e.g. `{'BusinessUnit': 'XYZ'}`). Neither the tag keys nor the t{}
regex_replace_charsstringTerraform regular expression (regex) string. Characters matching the regex will null
tenantstringID element _(Rarely used, not included by default)_. A customer identifier, indinull
stagestringID element. Usually used to indicate role, e.g. 'prod', 'staging', 'source', 'bunull
traffic_typestringThe type of traffic to capture. Valid values: `ACCEPT`, `REJECT`, `ALL`"ALL"
bucket_notifications_typestringType of the notification configuration. Only SQS is supported."SQS"
object_lock_configurationobject({ mode = string # A configuration for [S3 object locking](https://docs.aws.amazon.com/AmazonS3/latnull
enabledboolSet to false to prevent the module from creating any resourcesnull
bucket_notifications_prefixstringPrefix filter. Used to manage object notifications""
vpc_idstringVPC ID to create flow logs fornull
labels_as_tagsset(string)Set of labels (ID elements) to include as tags in the `tags` output. Default is [ "default" ]
namestringID element. Usually the component or solution name, e.g. 'app' or 'jenkins'. Thinull
delimiterstringDelimiter to be used between ID elements. Defaults to `-` (hyphen). Set to `""` null
attributeslist(string)ID element. Additional attributes (e.g. `workers` or `cluster`) to add to `id`, []
force_destroyboolA boolean that indicates all objects should be deleted from the bucket so that tfalse
… and 6 more inputs
Outputs (11)
kms_alias_arn — KMS Alias ARN
kms_alias_name — KMS Alias name
bucket_domain_name — FQDN of bucket
bucket_id — Bucket Name (aka ID)
bucket_arn — Bucket ARN
flow_log_arn — Flow Log ARN
bucket_notifications_sqs_queue_arn — Notifications SQS queue ARN
kms_key_arn — KMS Key ARN
kms_key_id — KMS Key ID
bucket_prefix — Bucket prefix configured for lifecycle rules
flow_log_id — Flow Log ID
Resources (1)
aws_flow_log
Details
FrameworkTerraform Module
LanguageHCL
Version1.3.1
Cloud AWS
★ Stars27
Forks38
Total downloads411.2k
Inputs46
Outputs11
Resources1
Examples1
LicenseApache-2.0
Namespacecloudposse
Updated