Skip to content

Terraform module to provision an AWS Cloudfront Web Application Firewall.

License

Notifications You must be signed in to change notification settings

geekcell/terraform-aws-cloudfront-waf

Repository files navigation

Geek Cell GmbH

Terraform AWS CloudFront Web Application Firewall

Terraform module to create a CloudFront Web Application Firewall. Please note, since this is a CloudFront WebACL, it is mandatory to run in the "us-east-1" region. Check the example.

Inputs

Name Description Type Default Required
name Friendly name of the ACL. string n/a yes
tags Tags to add to the Resources. map(any) {} no

Outputs

Name Description
arn The ARN of the ACL.

Providers

Name Version
aws >= 4.36

Resources

  • resource.aws_cloudwatch_log_resource_policy.main (cloudwatch.tf#13)
  • resource.aws_wafv2_web_acl.main (main.tf#7)
  • resource.aws_wafv2_web_acl_logging_configuration.main (cloudwatch.tf#8)
  • data source.aws_caller_identity.current (cloudwatch.tf#59)
  • data source.aws_iam_policy_document.main (cloudwatch.tf#18)
  • data source.aws_region.current (cloudwatch.tf#57)

Examples

Complete

module "example" {
  source = "../../"
  name   = "my-waf"

  providers = {
    aws = aws.us-east-1
  }
}

provider "aws" {
  allowed_account_ids = ["1234567890"]
  profile             = "AdministratorAccess-1234567890"
  region              = "us-east-1"
  alias               = "us-east-1"
}