All Projects → traveloka → terraform-aws-waf-webacl-supporting-resources

traveloka / terraform-aws-waf-webacl-supporting-resources

Licence: Apache-2.0 license
A module to create several resources needed by AWS WAF WebACL.

Programming Languages

HCL
1544 projects

Projects that are alternatives of or similar to terraform-aws-waf-webacl-supporting-resources

terraform-aws-resource-naming
Terraform module to generate resource name with random_id added as suffix.
Stars: ✭ 18 (-28%)
Mutual labels:  hcl, terraform-module
terraform-aws-autoscaling
A terraform module which provisions an auto scaling group along with its launch template
Stars: ✭ 32 (+28%)
Mutual labels:  hcl, terraform-module
terraform-aws-kms
This terraform module creates a KMS Customer Master Key (CMK) and its alias.
Stars: ✭ 14 (-44%)
Mutual labels:  hcl, terraform-module
terraform-linode-k8s
Kubernetes installer for Linode
Stars: ✭ 63 (+152%)
Mutual labels:  hcl, terraform-module
terraform-aws-eks-workers
Terraform module to provision an AWS AutoScaling Group, IAM Role, and Security Group for EKS Workers
Stars: ✭ 82 (+228%)
Mutual labels:  terraform-module
Converge
A powerful and easy-to-use configuration management system.
Stars: ✭ 254 (+916%)
Mutual labels:  hcl
Terraform validate
Assists in the enforcement of user-defined standards in Terraform
Stars: ✭ 245 (+880%)
Mutual labels:  hcl
Azure arc
Automated Azure Arc environments
Stars: ✭ 224 (+796%)
Mutual labels:  hcl
terraform-aws-chatbot-slack-configuration
Module to enable Chatbot Slack channel configuration in Terraform
Stars: ✭ 31 (+24%)
Mutual labels:  terraform-module
terraform-modules
Xenit Terraform modules
Stars: ✭ 23 (-8%)
Mutual labels:  terraform-module
terraform-aws-bastion-ssm-iam
AWS Bastion server which can reside in the private subnet utilizing Systems Manager Sessions
Stars: ✭ 26 (+4%)
Mutual labels:  terraform-module
terraform-aws-cloudwatch-logs
Terraform Module to Provide a CloudWatch Logs Endpoint
Stars: ✭ 59 (+136%)
Mutual labels:  terraform-module
terraform-kubernetes-alb-ingress-controller
Terraform module to ease deployment of the AWS ALB Ingress Controller
Stars: ✭ 55 (+120%)
Mutual labels:  terraform-module
Terraform Aws Atlantis
Terraform configurations for running Atlantis on AWS Fargate. Github, Gitlab and BitBucket are supported
Stars: ✭ 246 (+884%)
Mutual labels:  hcl
terraform-aws-ecr
This terraform module is used to create ECR on AWS.
Stars: ✭ 20 (-20%)
Mutual labels:  hcl
Terraform Aws Tfstate Backend
Terraform module that provision an S3 bucket to store the `terraform.tfstate` file and a DynamoDB table to lock the state file to prevent concurrent modifications and state corruption.
Stars: ✭ 229 (+816%)
Mutual labels:  hcl
terraform-oci-compute-instance
Terraform Module for creating Oracle Cloud Infrastructure compute instances
Stars: ✭ 29 (+16%)
Mutual labels:  terraform-module
terraform-openstack-rke2
Deploy Kubernetes on OpenStack with RKE2
Stars: ✭ 38 (+52%)
Mutual labels:  terraform-module
terraform-aws-labels
This terraform module is designed to generate consistent label names and tags for resources. You can use terraform-labels to implement a strict naming convention.
Stars: ✭ 32 (+28%)
Mutual labels:  hcl
terraform-aws-vpn-gateway
Terraform module which creates VPN gateway resources on AWS 🇺🇦
Stars: ✭ 101 (+304%)
Mutual labels:  terraform-module

terraform-aws-waf-webacl-supporting-resources

Terraform Version Release Last Commit Issues Pull Requests License Open Source Love

Deprecation Notice

Hi everyone, this module is now deprecated and will no longer be supported or updated.

For Travelokans, please contact the Cloud Infra Team on slack to discuss WAFv2 implementation

Description

Terraform module to create resources needed by AWS WAF WebACL to:

  • Enable logging of traffic information[1].
  • Store logs in Parquet format[2] for more optimized query using Athena[3].
  • Provision query-ready Athena Database and Table which based on AWS Glue Data Catalog [4].

Based on the diagram above, the resources going to be created are:

  • S3 Bucket to store all traffic logs.
  • Kinesis Data Firehose[5] to deliver traffic logs from WAF WebACL to the S3.
  • Cloudwatch Log Group and Stream to store the Firehose delivery error information.
  • AWS Glue Catalog Database and Table which store metadata/schema of the log data.
    • One function of those resources is to make it possible the conversion from JSON to Parquet.
    • The other function is to provision Amazon Athena Database and Table which is ready to use to perform queries.
  • IAM Role and Permissions for the Firehose to do all those actions above.

This module WILL NOT CREATE AWS WAF Rules and WebACL.

To get a full picture on how to make use of this module together with AWS WAF WebACL and Rules, check examples:

References

Table of Content

Prerequisites

In order to provision this module, it is require some information from an existing resources as input parameter, those resources are:

  • S3 Bucket, input variable that require the information from this resource are, s3_logging_bucket
  • AWS KMS, input variable that require the information from this resource are, s3_kms_key_arn

Dependencies

Doesn't have any dependencies to any other Terraform module

Terraform Versions

Created and tested using Terraform version 0.12.31 The latest stable version of Terraform which this module tested working is Terraform 0.13.7 on 2021/10/11

Getting Started

Requirements

Name Version
terraform >= 0.13

Providers

Name Version
aws n/a
random n/a

Modules

No modules.

Resources

Name Type
aws_cloudwatch_log_group.firehose_error_logs resource
aws_cloudwatch_log_stream.firehose_error_logs resource
aws_glue_catalog_database.database resource
aws_glue_catalog_table.table resource
aws_iam_role.firehose resource
aws_iam_role_policy.allow_glue_get_table_versions resource
aws_iam_role_policy.allow_put_log_events resource
aws_kinesis_firehose_delivery_stream.waf resource
aws_s3_bucket.webacl_traffic_information resource
aws_s3_bucket_policy.webacl_traffic_information resource
aws_s3_bucket_public_access_block.this resource
random_id.this resource
aws_caller_identity.this data source
aws_iam_policy_document.allow_glue_get_table_versions data source
aws_iam_policy_document.allow_put_log_events data source
aws_iam_policy_document.allow_s3_actions data source
aws_iam_policy_document.firehose_assume_role_policy data source
aws_region.this data source

Inputs

Name Description Type Default Required
description The description of these resources. string n/a yes
environment The environment of these resources belong to. string n/a yes
firehose_buffer_interval Buffer incoming data for the specified period of time, in seconds, before delivering it to the destination. Valid value is between 60-900. Smaller value makes the logs delivered faster. Bigger value increase the chance to make the file size bigger, which are more efficient to query. string "900" no
firehose_buffer_size Buffer incoming data to the specified size, in MBs, before delivering it to the destination. Valid value is between 64-128. Recommended is 128, specifying a smaller buffer size can result in the delivery of very small S3 objects, which are less efficient to query. string "128" no
product_domain The name of the product domain these resources belong to. string n/a yes
s3_kms_key_arn KMS key ARN for S3 encryption string n/a yes
s3_logging_bucket The name of the target S3 Bucket which store Access Logs for WebACL Bucket created by this module string n/a yes
service_name The name of the service these resources belong to. string n/a yes

Outputs

Name Description
firehose_delivery_stream_arn The ARN of Kinesis Firehose which are going to be used for delivering all traffic information from WAF WebACL to S3 bucket.
webacl_traffic_logging_bucket_name The name of the bucket which store WebACL traffic information.

Contributing

This module accepting or open for any contributions from anyone, please see the CONTRIBUTING.md for more detail about how to contribute to this module.

License

This module is under Apache License 2.0 - see the LICENSE file for details.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].