AWS WAF Geo Match Set

This page shows how to write Terraform for AWS WAF Geo Match Set and write them securely.

aws_waf_geo_match_set (Terraform)

The Geo Match Set in AWS WAF can be configured in Terraform with the resource name aws_waf_geo_match_set. The following sections describe 2 examples of how to use the resource and its parameters.

Example Usage from GitHub
resource "aws_waf_geo_match_set" "geo_match_set" {
  name = "geo_match_set"
  dynamic "geo_match_constraint" {
    for_each = ["AB", "CD"]
    content {
      type  = "Country"
resource "aws_waf_geo_match_set" "this" {
  name =

  dynamic "geo_match_constraint" {
    for_each = var.geo_match_constraint
    content {

Review your Terraform file for AWS best practices

Shisho Cloud, our free checker to make sure your Terraform configuration follows best practices, is available (beta).


Explanation in Terraform Registry

Provides a WAF Geo Match Set Resource

CloudFormation Example

CloudFormation code does not have the related resource.

Frequently asked questions

What is AWS WAF Geo Match Set?

AWS WAF Geo Match Set is a resource for WAF of Amazon Web Service. Settings can be wrote in Terraform.

Where can I find the example code for the AWS WAF Geo Match Set?

For Terraform, the sam-andaluri/saas-multi-cloud-series-1 and niveklabs/aws source code examples are useful. See the Terraform Example section for further details.


Automate config file reviews on your commits

Fix issues in your infrastructure as code with auto-generated patches.