Skip to content

JamesWoolfenden/terraform-aws-waf-global

Repository files navigation

terraform-aws-waf-global

Build Status Latest Release GitHub tag (latest SemVer) Terraform Version Infrastructure Tests pre-commit checkov Infrastructure Tests

Terraform module - creates global WAF.


It's 100% Open Source and licensed under the APACHE2.

Usage

This here is just a basic illustration.

waf-global

Include this repository as a module in your existing Terraform code:

module "waf-global" {
  source          = "JamesWoolfenden/waf-global/aws"
  version         = "0.0.2"
  ip_set          = var.ip_set
  common_tags     = var.common_tags
}

Requirements

No requirements.

Providers

Name Version
aws n/a

Modules

No modules.

Resources

Name Type
aws_cloudwatch_log_group.wafexample resource
aws_waf_ipset.ips resource
aws_waf_rule.ip_match resource
aws_waf_web_acl.ip_whitelist resource

Inputs

Name Description Type Default Required
acl_name The name of the acl string "IPWhiteListWebACL" no
common_tags Define the common tags scheme for resources map(any) n/a yes
ipset Complex object to describe and populate aws_waf_ipset any n/a yes
kms_key_id n/a any n/a yes
metric_name n/a string "IPWhiteListWebACL" no

Outputs

Name Description
ip_match n/a
ip_whitelist n/a
ips n/a
web_acl_id n/a

Policy

This is the policy required to build this project:

The Terraform resource required is:

resource "aws_iam_policy" "terraformXVlBzgba" {
  name        = "terraformXVlBzgba"
  path        = "/"
  description = "Add Description"

  policy = jsonencode({
    "Version": "2012-10-17",
    "Statement": [
        {
            "Sid": "VisualEditor0",
            "Effect": "Allow",
            "Action": [
                "logs:AssociateKmsKey",
                "logs:CreateLogGroup",
                "logs:DeleteLogGroup",
                "logs:DeleteRetentionPolicy",
                "logs:DescribeLogGroups",
                "logs:DisassociateKmsKey",
                "logs:ListTagsLogGroup",
                "logs:PutRetentionPolicy"
            ],
            "Resource": "*"
        }
    ]
})
}

Related Projects

Check out these related projects.

Help

Got a question?

File a GitHub issue.

Contributing

Bug Reports & Feature Requests

Please use the issue tracker to report any bugs or file feature requests.

Copyrights

Copyright © 2019-2022 James Woolfenden

License

License

See LICENSE for full details.

Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

https://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Contributors

James Woolfenden
James Woolfenden