# terraform-gsirt-waf-ip-block-rule
terraform-gsirt-waf-ip-block-rule application_family: devops

The module creates rule groups for CLOUDFRONT (in the default region) and REGIONAL (in the given list of regions) scopes using IPv4 and IPv6 ip sets. It can create IP sets or reuse existing ones. Requires AWS provider of version 6 to allow iterating over the AWS regions.

## Requirements

| Name | Version |
|------|---------|
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 6.0 |

## Providers

| Name | Version |
|------|---------|
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 6.0 |

## Modules

No modules.

## Resources

| Name | Type |
|------|------|
| [aws_wafv2_ip_set.cloudfront_gsirt_ioc_ipv4_set](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_ip_set) | resource |
| [aws_wafv2_ip_set.cloudfront_gsirt_ioc_ipv6_set](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_ip_set) | resource |
| [aws_wafv2_ip_set.regional_gsirt_ioc_ipv4_set](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_ip_set) | resource |
| [aws_wafv2_ip_set.regional_gsirt_ioc_ipv6_set](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_ip_set) | resource |
| [aws_wafv2_rule_group.cloudfront_ip_block_rule_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_rule_group) | resource |
| [aws_wafv2_rule_group.regional_ip_block_rule_group](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/wafv2_rule_group) | resource |
| [aws_region.current](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/region) | data source |
| [aws_wafv2_ip_set.cloudfront_gsirt_ioc_ipv4_set](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/wafv2_ip_set) | data source |
| [aws_wafv2_ip_set.cloudfront_gsirt_ioc_ipv6_set](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/wafv2_ip_set) | data source |
| [aws_wafv2_ip_set.regional_gsirt_ioc_ipv4_set](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/wafv2_ip_set) | data source |
| [aws_wafv2_ip_set.regional_gsirt_ioc_ipv6_set](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/data-sources/wafv2_ip_set) | data source |

## Inputs

| Name | Description | Type | Default | Required |
|------|-------------|------|---------|:--------:|
| <a name="input_application_family"></a> [application\_family](#input\_application\_family) | n/a | `string` | `"devops"` | no |
| <a name="input_aws_regions"></a> [aws\_regions](#input\_aws\_regions) | List of regions in which REGIONAL rules will be created. Defaults to current region | `list(string)` | `[]` | no |
| <a name="input_environment"></a> [environment](#input\_environment) | n/a | `string` | n/a | yes |
| <a name="input_ip_set_prefix"></a> [ip\_set\_prefix](#input\_ip\_set\_prefix) | n/a | `string` | `"gsirt-ioc-ip-set"` | no |
| <a name="input_reuse_existing_ip_sets"></a> [reuse\_existing\_ip\_sets](#input\_reuse\_existing\_ip\_sets) | Use in case there are multiple environments in an account and IP sets were created in another environment first | `bool` | `false` | no |
| <a name="input_rule_group_capacity"></a> [rule\_group\_capacity](#input\_rule\_group\_capacity) | n/a | `number` | `50` | no |
| <a name="input_rule_group_name"></a> [rule\_group\_name](#input\_rule\_group\_name) | n/a | `string` | `"gsirt-ioc-rule-group"` | no |

## Outputs
