Vercel Terraform Provider now supports Vercel Firewall resources

Sage AbrahamSoftware Engineer

1 min read

Terraform changelog

The Vercel Terraform Provider now allows you to customize and control the Vercel Firewall through Infrastructure as Code (IaC).

Key resources and their capabilities include:

For example, to create a new rule that challenges requests where the user_agent contains curl:

resource "vercel_firewall_config" "example" {
project_id = vercel_project.example.id
rules {
rule {
name = "Challenge curl"
description = "Challenge user agents containing 'curl'"
condition_group = [{
conditions = [{
type = "user_agent"
op = "sub"
value = "curl"
}]
}]
action = {
action = "challenge"
}
}
}
}

Get started with the Terraform provider for Vercel today. If you already have Terraform installed, upgrade by running:

Bash
terraform init -upgrade