1. Packages
  2. Vercel
  3. API Docs
  4. FirewallConfig
Vercel v1.14.3 published on Monday, Oct 7, 2024 by Pulumiverse

vercel.FirewallConfig

Explore with Pulumi AI

Define Custom Rules to shape the way your traffic is handled by the Vercel Edge Network.

Example Usage

Coming soon!
Coming soon!
Coming soon!
Coming soon!
package generated_program;

import com.pulumi.Context;
import com.pulumi.Pulumi;
import com.pulumi.core.Output;
import com.pulumi.vercel.Project;
import com.pulumi.vercel.FirewallConfig;
import com.pulumi.vercel.FirewallConfigArgs;
import java.util.List;
import java.util.ArrayList;
import java.util.Map;
import java.io.File;
import java.nio.file.Files;
import java.nio.file.Paths;

public class App {
    public static void main(String[] args) {
        Pulumi.run(App::stack);
    }

    public static void stack(Context ctx) {
        var exampleProject = new Project("exampleProject");

        var exampleFirewallConfig = new FirewallConfig("exampleFirewallConfig", FirewallConfigArgs.builder()
            .projectId(exampleProject.id())
            .rules(FirewallConfigRulesArgs.builder()
                .rules(                
                    FirewallConfigRulesRuleArgs.builder()
                        .name("Bypass Known request")
                        .description("Bypass requests using internal bearer tokens")
                        .conditionGroups(                        
                            FirewallConfigRulesRuleConditionGroupArgs.builder()
                                .conditions(FirewallConfigRulesRuleConditionGroupConditionArgs.builder()
                                    .type("header")
                                    .key("Authorization")
                                    .op("eq")
                                    .value("Bearer internaltoken")
                                    .build())
                                .build(),
                            FirewallConfigRulesRuleConditionGroupArgs.builder()
                                .conditions(FirewallConfigRulesRuleConditionGroupConditionArgs.builder()
                                    .type("header")
                                    .key("Authorization")
                                    .op("eq")
                                    .value("Bearer internaltoken2")
                                    .build())
                                .build())
                        .action(FirewallConfigRulesRuleActionArgs.builder()
                            .action("bypass")
                            .build())
                        .build(),
                    FirewallConfigRulesRuleArgs.builder()
                        .name("Challenge curl")
                        .description("Challenge user agents containing 'curl'")
                        .conditionGroups(FirewallConfigRulesRuleConditionGroupArgs.builder()
                            .conditions(FirewallConfigRulesRuleConditionGroupConditionArgs.builder()
                                .type("user_agent")
                                .op("sub")
                                .value("curl")
                                .build())
                            .build())
                        .action(FirewallConfigRulesRuleActionArgs.builder()
                            .action("challenge")
                            .build())
                        .build(),
                    FirewallConfigRulesRuleArgs.builder()
                        .name("Deny cookieless requests")
                        .description("requests to /api that are missing a session cookie")
                        .conditionGroups(FirewallConfigRulesRuleConditionGroupArgs.builder()
                            .conditions(                            
                                FirewallConfigRulesRuleConditionGroupConditionArgs.builder()
                                    .type("path")
                                    .op("eq")
                                    .value("/api")
                                    .build(),
                                FirewallConfigRulesRuleConditionGroupConditionArgs.builder()
                                    .type("cookie")
                                    .key("_session")
                                    .neg(true)
                                    .op("ex")
                                    .build())
                            .build())
                        .action(FirewallConfigRulesRuleActionArgs.builder()
                            .action("challenge")
                            .build())
                        .build(),
                    FirewallConfigRulesRuleArgs.builder()
                        .name("Rate limit API")
                        .description("apply ratelimit to requests under /api")
                        .conditionGroups(FirewallConfigRulesRuleConditionGroupArgs.builder()
                            .conditions(FirewallConfigRulesRuleConditionGroupConditionArgs.builder()
                                .type("path")
                                .op("pre")
                                .value("/api")
                                .build())
                            .build())
                        .action(FirewallConfigRulesRuleActionArgs.builder()
                            .action("rate_limit")
                            .rate_limit(%!v(PANIC=Format method: runtime error: invalid memory address or nil pointer dereference))
                            .actionDuration("5m")
                            .build())
                        .build())
                .build())
            .build());

        var managedExample = new Project("managedExample");

        var managed = new FirewallConfig("managed", FirewallConfigArgs.builder()
            .projectId(vercel_project.managed().id())
            .managedRulesets(FirewallConfigManagedRulesetsArgs.builder()
                .owasp(FirewallConfigManagedRulesetsOwaspArgs.builder()
                    .xss(FirewallConfigManagedRulesetsOwaspXssArgs.builder()
                        .action("deny")
                        .build())
                    .sqli(FirewallConfigManagedRulesetsOwaspSqliArgs.builder()
                        .action("deny")
                        .build())
                    .rce(FirewallConfigManagedRulesetsOwaspRceArgs.builder()
                        .action("deny")
                        .build())
                    .php(FirewallConfigManagedRulesetsOwaspPhpArgs.builder()
                        .action("deny")
                        .build())
                    .java(FirewallConfigManagedRulesetsOwaspJavaArgs.builder()
                        .action("deny")
                        .build())
                    .lfi(FirewallConfigManagedRulesetsOwaspLfiArgs.builder()
                        .action("deny")
                        .build())
                    .rfi(FirewallConfigManagedRulesetsOwaspRfiArgs.builder()
                        .action("deny")
                        .build())
                    .gen(FirewallConfigManagedRulesetsOwaspGenArgs.builder()
                        .action("deny")
                        .build())
                    .build())
                .build())
            .build());

        var ipExample = new Project("ipExample");

        var ip_blocking = new FirewallConfig("ip-blocking", FirewallConfigArgs.builder()
            .projectId(ipExample.id())
            .ipRules(FirewallConfigIpRulesArgs.builder()
                .rules(                
                    FirewallConfigIpRulesRuleArgs.builder()
                        .action("deny")
                        .ip("51.85.0.0/16")
                        .hostname("*")
                        .build(),
                    FirewallConfigIpRulesRuleArgs.builder()
                        .action("challenge")
                        .ip("1.2.3.4")
                        .hostname("example.com")
                        .build())
                .build())
            .build());

    }
}
Copy
resources:
  exampleProject:
    type: vercel:Project
  exampleFirewallConfig:
    type: vercel:FirewallConfig
    properties:
      projectId: ${exampleProject.id}
      rules:
        - rules:
            - name: Bypass Known request
              description: Bypass requests using internal bearer tokens
              conditionGroups:
                - conditions:
                    - type: header
                      key: Authorization
                      op: eq
                      value: Bearer internaltoken
                - conditions:
                    - type: header
                      key: Authorization
                      op: eq
                      value: Bearer internaltoken2
              action:
                action: bypass
            - name: Challenge curl
              description: Challenge user agents containing 'curl'
              conditionGroups:
                - conditions:
                    - type: user_agent
                      op: sub
                      value: curl
              action:
                action: challenge
            - name: Deny cookieless requests
              description: requests to /api that are missing a session cookie
              conditionGroups:
                - conditions:
                    - type: path
                      op: eq
                      value: /api
                    - type: cookie
                      key: _session
                      neg: true
                      op: ex
              action:
                action: challenge
            - name: Rate limit API
              description: apply ratelimit to requests under /api
              conditionGroups:
                - conditions:
                    - type: path
                      op: pre
                      value: /api
              action:
                action: rate_limit
                rate_limit:
                  limit: 100
                  window: 300
                  keys:
                    - ip
                    - ja4
                  algo: fixed_window
                  action: deny
                actionDuration: 5m
  managedExample:
    type: vercel:Project
  managed:
    type: vercel:FirewallConfig
    properties:
      projectId: ${vercel_project.managed.id}
      managedRulesets:
        - owasp:
            - xss:
                action: deny
              sqli:
                action: deny
              rce:
                action: deny
              php:
                action: deny
              java:
                action: deny
              lfi:
                action: deny
              rfi:
                action: deny
              gen:
                action: deny
  ipExample:
    type: vercel:Project
  ip-blocking:
    type: vercel:FirewallConfig
    properties:
      projectId: ${ipExample.id}
      ipRules:
        - rules:
            - action: deny
              ip: 51.85.0.0/16
              hostname: '*'
            - action: challenge
              ip: 1.2.3.4
              hostname: example.com
Copy

Create FirewallConfig Resource

Resources are created with functions called constructors. To learn more about declaring and configuring resources, see Resources.

Constructor syntax

new FirewallConfig(name: string, args: FirewallConfigArgs, opts?: CustomResourceOptions);
@overload
def FirewallConfig(resource_name: str,
                   args: FirewallConfigArgs,
                   opts: Optional[ResourceOptions] = None)

@overload
def FirewallConfig(resource_name: str,
                   opts: Optional[ResourceOptions] = None,
                   project_id: Optional[str] = None,
                   enabled: Optional[bool] = None,
                   ip_rules: Optional[FirewallConfigIpRulesArgs] = None,
                   managed_rulesets: Optional[FirewallConfigManagedRulesetsArgs] = None,
                   rules: Optional[FirewallConfigRulesArgs] = None,
                   team_id: Optional[str] = None)
func NewFirewallConfig(ctx *Context, name string, args FirewallConfigArgs, opts ...ResourceOption) (*FirewallConfig, error)
public FirewallConfig(string name, FirewallConfigArgs args, CustomResourceOptions? opts = null)
public FirewallConfig(String name, FirewallConfigArgs args)
public FirewallConfig(String name, FirewallConfigArgs args, CustomResourceOptions options)
type: vercel:FirewallConfig
properties: # The arguments to resource properties.
options: # Bag of options to control resource's behavior.

Parameters

name This property is required. string
The unique name of the resource.
args This property is required. FirewallConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
resource_name This property is required. str
The unique name of the resource.
args This property is required. FirewallConfigArgs
The arguments to resource properties.
opts ResourceOptions
Bag of options to control resource's behavior.
ctx Context
Context object for the current deployment.
name This property is required. string
The unique name of the resource.
args This property is required. FirewallConfigArgs
The arguments to resource properties.
opts ResourceOption
Bag of options to control resource's behavior.
name This property is required. string
The unique name of the resource.
args This property is required. FirewallConfigArgs
The arguments to resource properties.
opts CustomResourceOptions
Bag of options to control resource's behavior.
name This property is required. String
The unique name of the resource.
args This property is required. FirewallConfigArgs
The arguments to resource properties.
options CustomResourceOptions
Bag of options to control resource's behavior.

Constructor example

The following reference example uses placeholder values for all input properties.

var firewallConfigResource = new Vercel.FirewallConfig("firewallConfigResource", new()
{
    ProjectId = "string",
    Enabled = false,
    IpRules = new Vercel.Inputs.FirewallConfigIpRulesArgs
    {
        Rules = new[]
        {
            new Vercel.Inputs.FirewallConfigIpRulesRuleArgs
            {
                Action = "string",
                Hostname = "string",
                Ip = "string",
                Id = "string",
                Notes = "string",
            },
        },
    },
    ManagedRulesets = new Vercel.Inputs.FirewallConfigManagedRulesetsArgs
    {
        Owasp = new Vercel.Inputs.FirewallConfigManagedRulesetsOwaspArgs
        {
            Gen = new Vercel.Inputs.FirewallConfigManagedRulesetsOwaspGenArgs
            {
                Action = "string",
                Active = false,
            },
            Java = new Vercel.Inputs.FirewallConfigManagedRulesetsOwaspJavaArgs
            {
                Action = "string",
                Active = false,
            },
            Lfi = new Vercel.Inputs.FirewallConfigManagedRulesetsOwaspLfiArgs
            {
                Action = "string",
                Active = false,
            },
            Ma = new Vercel.Inputs.FirewallConfigManagedRulesetsOwaspMaArgs
            {
                Action = "string",
                Active = false,
            },
            Php = new Vercel.Inputs.FirewallConfigManagedRulesetsOwaspPhpArgs
            {
                Action = "string",
                Active = false,
            },
            Rce = new Vercel.Inputs.FirewallConfigManagedRulesetsOwaspRceArgs
            {
                Action = "string",
                Active = false,
            },
            Rfi = new Vercel.Inputs.FirewallConfigManagedRulesetsOwaspRfiArgs
            {
                Action = "string",
                Active = false,
            },
            Sd = new Vercel.Inputs.FirewallConfigManagedRulesetsOwaspSdArgs
            {
                Action = "string",
                Active = false,
            },
            Sqli = new Vercel.Inputs.FirewallConfigManagedRulesetsOwaspSqliArgs
            {
                Action = "string",
                Active = false,
            },
            Xss = new Vercel.Inputs.FirewallConfigManagedRulesetsOwaspXssArgs
            {
                Action = "string",
                Active = false,
            },
        },
    },
    Rules = new Vercel.Inputs.FirewallConfigRulesArgs
    {
        Rules = new[]
        {
            new Vercel.Inputs.FirewallConfigRulesRuleArgs
            {
                Action = new Vercel.Inputs.FirewallConfigRulesRuleActionArgs
                {
                    Action = "string",
                    ActionDuration = "string",
                    RateLimit = new Vercel.Inputs.FirewallConfigRulesRuleActionRateLimitArgs
                    {
                        Action = "string",
                        Algo = "string",
                        Keys = new[]
                        {
                            "string",
                        },
                        Limit = 0,
                        Window = 0,
                    },
                    Redirect = new Vercel.Inputs.FirewallConfigRulesRuleActionRedirectArgs
                    {
                        Location = "string",
                        Permanent = false,
                    },
                },
                ConditionGroups = new[]
                {
                    new Vercel.Inputs.FirewallConfigRulesRuleConditionGroupArgs
                    {
                        Conditions = new[]
                        {
                            new Vercel.Inputs.FirewallConfigRulesRuleConditionGroupConditionArgs
                            {
                                Op = "string",
                                Type = "string",
                                Key = "string",
                                Neg = false,
                                Value = "string",
                            },
                        },
                    },
                },
                Name = "string",
                Active = false,
                Description = "string",
                Id = "string",
            },
        },
    },
    TeamId = "string",
});
Copy
example, err := vercel.NewFirewallConfig(ctx, "firewallConfigResource", &vercel.FirewallConfigArgs{
	ProjectId: pulumi.String("string"),
	Enabled:   pulumi.Bool(false),
	IpRules: &vercel.FirewallConfigIpRulesArgs{
		Rules: vercel.FirewallConfigIpRulesRuleArray{
			&vercel.FirewallConfigIpRulesRuleArgs{
				Action:   pulumi.String("string"),
				Hostname: pulumi.String("string"),
				Ip:       pulumi.String("string"),
				Id:       pulumi.String("string"),
				Notes:    pulumi.String("string"),
			},
		},
	},
	ManagedRulesets: &vercel.FirewallConfigManagedRulesetsArgs{
		Owasp: &vercel.FirewallConfigManagedRulesetsOwaspArgs{
			Gen: &vercel.FirewallConfigManagedRulesetsOwaspGenArgs{
				Action: pulumi.String("string"),
				Active: pulumi.Bool(false),
			},
			Java: &vercel.FirewallConfigManagedRulesetsOwaspJavaArgs{
				Action: pulumi.String("string"),
				Active: pulumi.Bool(false),
			},
			Lfi: &vercel.FirewallConfigManagedRulesetsOwaspLfiArgs{
				Action: pulumi.String("string"),
				Active: pulumi.Bool(false),
			},
			Ma: &vercel.FirewallConfigManagedRulesetsOwaspMaArgs{
				Action: pulumi.String("string"),
				Active: pulumi.Bool(false),
			},
			Php: &vercel.FirewallConfigManagedRulesetsOwaspPhpArgs{
				Action: pulumi.String("string"),
				Active: pulumi.Bool(false),
			},
			Rce: &vercel.FirewallConfigManagedRulesetsOwaspRceArgs{
				Action: pulumi.String("string"),
				Active: pulumi.Bool(false),
			},
			Rfi: &vercel.FirewallConfigManagedRulesetsOwaspRfiArgs{
				Action: pulumi.String("string"),
				Active: pulumi.Bool(false),
			},
			Sd: &vercel.FirewallConfigManagedRulesetsOwaspSdArgs{
				Action: pulumi.String("string"),
				Active: pulumi.Bool(false),
			},
			Sqli: &vercel.FirewallConfigManagedRulesetsOwaspSqliArgs{
				Action: pulumi.String("string"),
				Active: pulumi.Bool(false),
			},
			Xss: &vercel.FirewallConfigManagedRulesetsOwaspXssArgs{
				Action: pulumi.String("string"),
				Active: pulumi.Bool(false),
			},
		},
	},
	Rules: &vercel.FirewallConfigRulesArgs{
		Rules: vercel.FirewallConfigRulesRuleArray{
			&vercel.FirewallConfigRulesRuleArgs{
				Action: &vercel.FirewallConfigRulesRuleActionArgs{
					Action:         pulumi.String("string"),
					ActionDuration: pulumi.String("string"),
					RateLimit: &vercel.FirewallConfigRulesRuleActionRateLimitArgs{
						Action: pulumi.String("string"),
						Algo:   pulumi.String("string"),
						Keys: pulumi.StringArray{
							pulumi.String("string"),
						},
						Limit:  pulumi.Int(0),
						Window: pulumi.Int(0),
					},
					Redirect: &vercel.FirewallConfigRulesRuleActionRedirectArgs{
						Location:  pulumi.String("string"),
						Permanent: pulumi.Bool(false),
					},
				},
				ConditionGroups: vercel.FirewallConfigRulesRuleConditionGroupArray{
					&vercel.FirewallConfigRulesRuleConditionGroupArgs{
						Conditions: vercel.FirewallConfigRulesRuleConditionGroupConditionArray{
							&vercel.FirewallConfigRulesRuleConditionGroupConditionArgs{
								Op:    pulumi.String("string"),
								Type:  pulumi.String("string"),
								Key:   pulumi.String("string"),
								Neg:   pulumi.Bool(false),
								Value: pulumi.String("string"),
							},
						},
					},
				},
				Name:        pulumi.String("string"),
				Active:      pulumi.Bool(false),
				Description: pulumi.String("string"),
				Id:          pulumi.String("string"),
			},
		},
	},
	TeamId: pulumi.String("string"),
})
Copy
var firewallConfigResource = new FirewallConfig("firewallConfigResource", FirewallConfigArgs.builder()
    .projectId("string")
    .enabled(false)
    .ipRules(FirewallConfigIpRulesArgs.builder()
        .rules(FirewallConfigIpRulesRuleArgs.builder()
            .action("string")
            .hostname("string")
            .ip("string")
            .id("string")
            .notes("string")
            .build())
        .build())
    .managedRulesets(FirewallConfigManagedRulesetsArgs.builder()
        .owasp(FirewallConfigManagedRulesetsOwaspArgs.builder()
            .gen(FirewallConfigManagedRulesetsOwaspGenArgs.builder()
                .action("string")
                .active(false)
                .build())
            .java(FirewallConfigManagedRulesetsOwaspJavaArgs.builder()
                .action("string")
                .active(false)
                .build())
            .lfi(FirewallConfigManagedRulesetsOwaspLfiArgs.builder()
                .action("string")
                .active(false)
                .build())
            .ma(FirewallConfigManagedRulesetsOwaspMaArgs.builder()
                .action("string")
                .active(false)
                .build())
            .php(FirewallConfigManagedRulesetsOwaspPhpArgs.builder()
                .action("string")
                .active(false)
                .build())
            .rce(FirewallConfigManagedRulesetsOwaspRceArgs.builder()
                .action("string")
                .active(false)
                .build())
            .rfi(FirewallConfigManagedRulesetsOwaspRfiArgs.builder()
                .action("string")
                .active(false)
                .build())
            .sd(FirewallConfigManagedRulesetsOwaspSdArgs.builder()
                .action("string")
                .active(false)
                .build())
            .sqli(FirewallConfigManagedRulesetsOwaspSqliArgs.builder()
                .action("string")
                .active(false)
                .build())
            .xss(FirewallConfigManagedRulesetsOwaspXssArgs.builder()
                .action("string")
                .active(false)
                .build())
            .build())
        .build())
    .rules(FirewallConfigRulesArgs.builder()
        .rules(FirewallConfigRulesRuleArgs.builder()
            .action(FirewallConfigRulesRuleActionArgs.builder()
                .action("string")
                .actionDuration("string")
                .rateLimit(FirewallConfigRulesRuleActionRateLimitArgs.builder()
                    .action("string")
                    .algo("string")
                    .keys("string")
                    .limit(0)
                    .window(0)
                    .build())
                .redirect(FirewallConfigRulesRuleActionRedirectArgs.builder()
                    .location("string")
                    .permanent(false)
                    .build())
                .build())
            .conditionGroups(FirewallConfigRulesRuleConditionGroupArgs.builder()
                .conditions(FirewallConfigRulesRuleConditionGroupConditionArgs.builder()
                    .op("string")
                    .type("string")
                    .key("string")
                    .neg(false)
                    .value("string")
                    .build())
                .build())
            .name("string")
            .active(false)
            .description("string")
            .id("string")
            .build())
        .build())
    .teamId("string")
    .build());
Copy
firewall_config_resource = vercel.FirewallConfig("firewallConfigResource",
    project_id="string",
    enabled=False,
    ip_rules={
        "rules": [{
            "action": "string",
            "hostname": "string",
            "ip": "string",
            "id": "string",
            "notes": "string",
        }],
    },
    managed_rulesets={
        "owasp": {
            "gen": {
                "action": "string",
                "active": False,
            },
            "java": {
                "action": "string",
                "active": False,
            },
            "lfi": {
                "action": "string",
                "active": False,
            },
            "ma": {
                "action": "string",
                "active": False,
            },
            "php": {
                "action": "string",
                "active": False,
            },
            "rce": {
                "action": "string",
                "active": False,
            },
            "rfi": {
                "action": "string",
                "active": False,
            },
            "sd": {
                "action": "string",
                "active": False,
            },
            "sqli": {
                "action": "string",
                "active": False,
            },
            "xss": {
                "action": "string",
                "active": False,
            },
        },
    },
    rules={
        "rules": [{
            "action": {
                "action": "string",
                "action_duration": "string",
                "rate_limit": {
                    "action": "string",
                    "algo": "string",
                    "keys": ["string"],
                    "limit": 0,
                    "window": 0,
                },
                "redirect": {
                    "location": "string",
                    "permanent": False,
                },
            },
            "condition_groups": [{
                "conditions": [{
                    "op": "string",
                    "type": "string",
                    "key": "string",
                    "neg": False,
                    "value": "string",
                }],
            }],
            "name": "string",
            "active": False,
            "description": "string",
            "id": "string",
        }],
    },
    team_id="string")
Copy
const firewallConfigResource = new vercel.FirewallConfig("firewallConfigResource", {
    projectId: "string",
    enabled: false,
    ipRules: {
        rules: [{
            action: "string",
            hostname: "string",
            ip: "string",
            id: "string",
            notes: "string",
        }],
    },
    managedRulesets: {
        owasp: {
            gen: {
                action: "string",
                active: false,
            },
            java: {
                action: "string",
                active: false,
            },
            lfi: {
                action: "string",
                active: false,
            },
            ma: {
                action: "string",
                active: false,
            },
            php: {
                action: "string",
                active: false,
            },
            rce: {
                action: "string",
                active: false,
            },
            rfi: {
                action: "string",
                active: false,
            },
            sd: {
                action: "string",
                active: false,
            },
            sqli: {
                action: "string",
                active: false,
            },
            xss: {
                action: "string",
                active: false,
            },
        },
    },
    rules: {
        rules: [{
            action: {
                action: "string",
                actionDuration: "string",
                rateLimit: {
                    action: "string",
                    algo: "string",
                    keys: ["string"],
                    limit: 0,
                    window: 0,
                },
                redirect: {
                    location: "string",
                    permanent: false,
                },
            },
            conditionGroups: [{
                conditions: [{
                    op: "string",
                    type: "string",
                    key: "string",
                    neg: false,
                    value: "string",
                }],
            }],
            name: "string",
            active: false,
            description: "string",
            id: "string",
        }],
    },
    teamId: "string",
});
Copy
type: vercel:FirewallConfig
properties:
    enabled: false
    ipRules:
        rules:
            - action: string
              hostname: string
              id: string
              ip: string
              notes: string
    managedRulesets:
        owasp:
            gen:
                action: string
                active: false
            java:
                action: string
                active: false
            lfi:
                action: string
                active: false
            ma:
                action: string
                active: false
            php:
                action: string
                active: false
            rce:
                action: string
                active: false
            rfi:
                action: string
                active: false
            sd:
                action: string
                active: false
            sqli:
                action: string
                active: false
            xss:
                action: string
                active: false
    projectId: string
    rules:
        rules:
            - action:
                action: string
                actionDuration: string
                rateLimit:
                    action: string
                    algo: string
                    keys:
                        - string
                    limit: 0
                    window: 0
                redirect:
                    location: string
                    permanent: false
              active: false
              conditionGroups:
                - conditions:
                    - key: string
                      neg: false
                      op: string
                      type: string
                      value: string
              description: string
              id: string
              name: string
    teamId: string
Copy

FirewallConfig Resource Properties

To learn more about resource properties and how to use them, see Inputs and Outputs in the Architecture and Concepts docs.

Inputs

In Python, inputs that are objects can be passed either as argument classes or as dictionary literals.

The FirewallConfig resource accepts the following input properties:

ProjectId This property is required. string
The ID of the project this configuration belongs to.
Enabled bool
Whether firewall is enabled or not.
IpRules Pulumiverse.Vercel.Inputs.FirewallConfigIpRules
IP rules to apply to the project.
ManagedRulesets Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesets
The managed rulesets that are enabled.
Rules Pulumiverse.Vercel.Inputs.FirewallConfigRules
Custom rules to apply to the project
TeamId string
The ID of the team this project belongs to.
ProjectId This property is required. string
The ID of the project this configuration belongs to.
Enabled bool
Whether firewall is enabled or not.
IpRules FirewallConfigIpRulesArgs
IP rules to apply to the project.
ManagedRulesets FirewallConfigManagedRulesetsArgs
The managed rulesets that are enabled.
Rules FirewallConfigRulesArgs
Custom rules to apply to the project
TeamId string
The ID of the team this project belongs to.
projectId This property is required. String
The ID of the project this configuration belongs to.
enabled Boolean
Whether firewall is enabled or not.
ipRules FirewallConfigIpRules
IP rules to apply to the project.
managedRulesets FirewallConfigManagedRulesets
The managed rulesets that are enabled.
rules FirewallConfigRules
Custom rules to apply to the project
teamId String
The ID of the team this project belongs to.
projectId This property is required. string
The ID of the project this configuration belongs to.
enabled boolean
Whether firewall is enabled or not.
ipRules FirewallConfigIpRules
IP rules to apply to the project.
managedRulesets FirewallConfigManagedRulesets
The managed rulesets that are enabled.
rules FirewallConfigRules
Custom rules to apply to the project
teamId string
The ID of the team this project belongs to.
project_id This property is required. str
The ID of the project this configuration belongs to.
enabled bool
Whether firewall is enabled or not.
ip_rules FirewallConfigIpRulesArgs
IP rules to apply to the project.
managed_rulesets FirewallConfigManagedRulesetsArgs
The managed rulesets that are enabled.
rules FirewallConfigRulesArgs
Custom rules to apply to the project
team_id str
The ID of the team this project belongs to.
projectId This property is required. String
The ID of the project this configuration belongs to.
enabled Boolean
Whether firewall is enabled or not.
ipRules Property Map
IP rules to apply to the project.
managedRulesets Property Map
The managed rulesets that are enabled.
rules Property Map
Custom rules to apply to the project
teamId String
The ID of the team this project belongs to.

Outputs

All input properties are implicitly available as output properties. Additionally, the FirewallConfig resource produces the following output properties:

Id string
The provider-assigned unique ID for this managed resource.
Id string
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.
id string
The provider-assigned unique ID for this managed resource.
id str
The provider-assigned unique ID for this managed resource.
id String
The provider-assigned unique ID for this managed resource.

Look up Existing FirewallConfig Resource

Get an existing FirewallConfig resource’s state with the given name, ID, and optional extra properties used to qualify the lookup.

public static get(name: string, id: Input<ID>, state?: FirewallConfigState, opts?: CustomResourceOptions): FirewallConfig
@staticmethod
def get(resource_name: str,
        id: str,
        opts: Optional[ResourceOptions] = None,
        enabled: Optional[bool] = None,
        ip_rules: Optional[FirewallConfigIpRulesArgs] = None,
        managed_rulesets: Optional[FirewallConfigManagedRulesetsArgs] = None,
        project_id: Optional[str] = None,
        rules: Optional[FirewallConfigRulesArgs] = None,
        team_id: Optional[str] = None) -> FirewallConfig
func GetFirewallConfig(ctx *Context, name string, id IDInput, state *FirewallConfigState, opts ...ResourceOption) (*FirewallConfig, error)
public static FirewallConfig Get(string name, Input<string> id, FirewallConfigState? state, CustomResourceOptions? opts = null)
public static FirewallConfig get(String name, Output<String> id, FirewallConfigState state, CustomResourceOptions options)
resources:  _:    type: vercel:FirewallConfig    get:      id: ${id}
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
resource_name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
name This property is required.
The unique name of the resulting resource.
id This property is required.
The unique provider ID of the resource to lookup.
state
Any extra arguments used during the lookup.
opts
A bag of options that control this resource's behavior.
The following state arguments are supported:
Enabled bool
Whether firewall is enabled or not.
IpRules Pulumiverse.Vercel.Inputs.FirewallConfigIpRules
IP rules to apply to the project.
ManagedRulesets Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesets
The managed rulesets that are enabled.
ProjectId string
The ID of the project this configuration belongs to.
Rules Pulumiverse.Vercel.Inputs.FirewallConfigRules
Custom rules to apply to the project
TeamId string
The ID of the team this project belongs to.
Enabled bool
Whether firewall is enabled or not.
IpRules FirewallConfigIpRulesArgs
IP rules to apply to the project.
ManagedRulesets FirewallConfigManagedRulesetsArgs
The managed rulesets that are enabled.
ProjectId string
The ID of the project this configuration belongs to.
Rules FirewallConfigRulesArgs
Custom rules to apply to the project
TeamId string
The ID of the team this project belongs to.
enabled Boolean
Whether firewall is enabled or not.
ipRules FirewallConfigIpRules
IP rules to apply to the project.
managedRulesets FirewallConfigManagedRulesets
The managed rulesets that are enabled.
projectId String
The ID of the project this configuration belongs to.
rules FirewallConfigRules
Custom rules to apply to the project
teamId String
The ID of the team this project belongs to.
enabled boolean
Whether firewall is enabled or not.
ipRules FirewallConfigIpRules
IP rules to apply to the project.
managedRulesets FirewallConfigManagedRulesets
The managed rulesets that are enabled.
projectId string
The ID of the project this configuration belongs to.
rules FirewallConfigRules
Custom rules to apply to the project
teamId string
The ID of the team this project belongs to.
enabled bool
Whether firewall is enabled or not.
ip_rules FirewallConfigIpRulesArgs
IP rules to apply to the project.
managed_rulesets FirewallConfigManagedRulesetsArgs
The managed rulesets that are enabled.
project_id str
The ID of the project this configuration belongs to.
rules FirewallConfigRulesArgs
Custom rules to apply to the project
team_id str
The ID of the team this project belongs to.
enabled Boolean
Whether firewall is enabled or not.
ipRules Property Map
IP rules to apply to the project.
managedRulesets Property Map
The managed rulesets that are enabled.
projectId String
The ID of the project this configuration belongs to.
rules Property Map
Custom rules to apply to the project
teamId String
The ID of the team this project belongs to.

Supporting Types

FirewallConfigIpRules
, FirewallConfigIpRulesArgs

FirewallConfigIpRulesRule
, FirewallConfigIpRulesRuleArgs

Action This property is required. string
Hostname This property is required. string
Hosts to apply these rules to
Ip This property is required. string
IP or CIDR to block
Id string
The ID of this resource.
Notes string
Action This property is required. string
Hostname This property is required. string
Hosts to apply these rules to
Ip This property is required. string
IP or CIDR to block
Id string
The ID of this resource.
Notes string
action This property is required. String
hostname This property is required. String
Hosts to apply these rules to
ip This property is required. String
IP or CIDR to block
id String
The ID of this resource.
notes String
action This property is required. string
hostname This property is required. string
Hosts to apply these rules to
ip This property is required. string
IP or CIDR to block
id string
The ID of this resource.
notes string
action This property is required. str
hostname This property is required. str
Hosts to apply these rules to
ip This property is required. str
IP or CIDR to block
id str
The ID of this resource.
notes str
action This property is required. String
hostname This property is required. String
Hosts to apply these rules to
ip This property is required. String
IP or CIDR to block
id String
The ID of this resource.
notes String

FirewallConfigManagedRulesets
, FirewallConfigManagedRulesetsArgs

Owasp Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesetsOwasp
Enable the owasp managed rulesets and select ruleset behaviors
Owasp FirewallConfigManagedRulesetsOwasp
Enable the owasp managed rulesets and select ruleset behaviors
owasp FirewallConfigManagedRulesetsOwasp
Enable the owasp managed rulesets and select ruleset behaviors
owasp FirewallConfigManagedRulesetsOwasp
Enable the owasp managed rulesets and select ruleset behaviors
owasp FirewallConfigManagedRulesetsOwasp
Enable the owasp managed rulesets and select ruleset behaviors
owasp Property Map
Enable the owasp managed rulesets and select ruleset behaviors

FirewallConfigManagedRulesetsOwasp
, FirewallConfigManagedRulesetsOwaspArgs

Gen Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesetsOwaspGen
Generic Attack Detection
Java Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesetsOwaspJava
Java Attack Detection
Lfi Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesetsOwaspLfi
Local File Inclusion Rules
Ma Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesetsOwaspMa
Multipart Rules
Php Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesetsOwaspPhp
PHP Attack Detection
Rce Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesetsOwaspRce
Remote Code Execution Rules
Rfi Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesetsOwaspRfi
Remote File Inclusion Rules
Sd Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesetsOwaspSd
Scanner Detection Rules
Sqli Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesetsOwaspSqli
SQL Injection Rules
Xss Pulumiverse.Vercel.Inputs.FirewallConfigManagedRulesetsOwaspXss
Cross Site Scripting Rules
gen Property Map
Generic Attack Detection
java Property Map
Java Attack Detection
lfi Property Map
Local File Inclusion Rules
ma Property Map
Multipart Rules
php Property Map
PHP Attack Detection
rce Property Map
Remote Code Execution Rules
rfi Property Map
Remote File Inclusion Rules
sd Property Map
Scanner Detection Rules
sqli Property Map
SQL Injection Rules
xss Property Map
Cross Site Scripting Rules

FirewallConfigManagedRulesetsOwaspGen
, FirewallConfigManagedRulesetsOwaspGenArgs

Action This property is required. string
Active bool
Action This property is required. string
Active bool
action This property is required. String
active Boolean
action This property is required. string
active boolean
action This property is required. str
active bool
action This property is required. String
active Boolean

FirewallConfigManagedRulesetsOwaspJava
, FirewallConfigManagedRulesetsOwaspJavaArgs

Action This property is required. string
Active bool
Action This property is required. string
Active bool
action This property is required. String
active Boolean
action This property is required. string
active boolean
action This property is required. str
active bool
action This property is required. String
active Boolean

FirewallConfigManagedRulesetsOwaspLfi
, FirewallConfigManagedRulesetsOwaspLfiArgs

Action This property is required. string
Active bool
Action This property is required. string
Active bool
action This property is required. String
active Boolean
action This property is required. string
active boolean
action This property is required. str
active bool
action This property is required. String
active Boolean

FirewallConfigManagedRulesetsOwaspMa
, FirewallConfigManagedRulesetsOwaspMaArgs

Action This property is required. string
Active bool
Action This property is required. string
Active bool
action This property is required. String
active Boolean
action This property is required. string
active boolean
action This property is required. str
active bool
action This property is required. String
active Boolean

FirewallConfigManagedRulesetsOwaspPhp
, FirewallConfigManagedRulesetsOwaspPhpArgs

Action This property is required. string
Active bool
Action This property is required. string
Active bool
action This property is required. String
active Boolean
action This property is required. string
active boolean
action This property is required. str
active bool
action This property is required. String
active Boolean

FirewallConfigManagedRulesetsOwaspRce
, FirewallConfigManagedRulesetsOwaspRceArgs

Action This property is required. string
Active bool
Action This property is required. string
Active bool
action This property is required. String
active Boolean
action This property is required. string
active boolean
action This property is required. str
active bool
action This property is required. String
active Boolean

FirewallConfigManagedRulesetsOwaspRfi
, FirewallConfigManagedRulesetsOwaspRfiArgs

Action This property is required. string
Active bool
Action This property is required. string
Active bool
action This property is required. String
active Boolean
action This property is required. string
active boolean
action This property is required. str
active bool
action This property is required. String
active Boolean

FirewallConfigManagedRulesetsOwaspSd
, FirewallConfigManagedRulesetsOwaspSdArgs

Action This property is required. string
Active bool
Action This property is required. string
Active bool
action This property is required. String
active Boolean
action This property is required. string
active boolean
action This property is required. str
active bool
action This property is required. String
active Boolean

FirewallConfigManagedRulesetsOwaspSqli
, FirewallConfigManagedRulesetsOwaspSqliArgs

Action This property is required. string
Active bool
Action This property is required. string
Active bool
action This property is required. String
active Boolean
action This property is required. string
active boolean
action This property is required. str
active bool
action This property is required. String
active Boolean

FirewallConfigManagedRulesetsOwaspXss
, FirewallConfigManagedRulesetsOwaspXssArgs

Action This property is required. string
Active bool
Action This property is required. string
Active bool
action This property is required. String
active Boolean
action This property is required. string
active boolean
action This property is required. str
active bool
action This property is required. String
active Boolean

FirewallConfigRules
, FirewallConfigRulesArgs

FirewallConfigRulesRule
, FirewallConfigRulesRuleArgs

Action This property is required. Pulumiverse.Vercel.Inputs.FirewallConfigRulesRuleAction
Actions to take when the condition groups match a request
ConditionGroups This property is required. List<Pulumiverse.Vercel.Inputs.FirewallConfigRulesRuleConditionGroup>
Sets of conditions that may match a request
Name This property is required. string
Name to identify the rule
Active bool
Rule is active or disabled
Description string
Id string
The ID of this resource.
Action This property is required. FirewallConfigRulesRuleAction
Actions to take when the condition groups match a request
ConditionGroups This property is required. []FirewallConfigRulesRuleConditionGroup
Sets of conditions that may match a request
Name This property is required. string
Name to identify the rule
Active bool
Rule is active or disabled
Description string
Id string
The ID of this resource.
action This property is required. FirewallConfigRulesRuleAction
Actions to take when the condition groups match a request
conditionGroups This property is required. List<FirewallConfigRulesRuleConditionGroup>
Sets of conditions that may match a request
name This property is required. String
Name to identify the rule
active Boolean
Rule is active or disabled
description String
id String
The ID of this resource.
action This property is required. FirewallConfigRulesRuleAction
Actions to take when the condition groups match a request
conditionGroups This property is required. FirewallConfigRulesRuleConditionGroup[]
Sets of conditions that may match a request
name This property is required. string
Name to identify the rule
active boolean
Rule is active or disabled
description string
id string
The ID of this resource.
action This property is required. FirewallConfigRulesRuleAction
Actions to take when the condition groups match a request
condition_groups This property is required. Sequence[FirewallConfigRulesRuleConditionGroup]
Sets of conditions that may match a request
name This property is required. str
Name to identify the rule
active bool
Rule is active or disabled
description str
id str
The ID of this resource.
action This property is required. Property Map
Actions to take when the condition groups match a request
conditionGroups This property is required. List<Property Map>
Sets of conditions that may match a request
name This property is required. String
Name to identify the rule
active Boolean
Rule is active or disabled
description String
id String
The ID of this resource.

FirewallConfigRulesRuleAction
, FirewallConfigRulesRuleActionArgs

Action This property is required. string
Base action
ActionDuration string
Forward persistence of a rule aciton
RateLimit Pulumiverse.Vercel.Inputs.FirewallConfigRulesRuleActionRateLimit
Behavior or a rate limiting action. Required if action is rate*limit
Redirect Pulumiverse.Vercel.Inputs.FirewallConfigRulesRuleActionRedirect
How to redirect a request. Required if action is redirect
Action This property is required. string
Base action
ActionDuration string
Forward persistence of a rule aciton
RateLimit FirewallConfigRulesRuleActionRateLimit
Behavior or a rate limiting action. Required if action is rate*limit
Redirect FirewallConfigRulesRuleActionRedirect
How to redirect a request. Required if action is redirect
action This property is required. String
Base action
actionDuration String
Forward persistence of a rule aciton
rateLimit FirewallConfigRulesRuleActionRateLimit
Behavior or a rate limiting action. Required if action is rate*limit
redirect FirewallConfigRulesRuleActionRedirect
How to redirect a request. Required if action is redirect
action This property is required. string
Base action
actionDuration string
Forward persistence of a rule aciton
rateLimit FirewallConfigRulesRuleActionRateLimit
Behavior or a rate limiting action. Required if action is rate*limit
redirect FirewallConfigRulesRuleActionRedirect
How to redirect a request. Required if action is redirect
action This property is required. str
Base action
action_duration str
Forward persistence of a rule aciton
rate_limit FirewallConfigRulesRuleActionRateLimit
Behavior or a rate limiting action. Required if action is rate*limit
redirect FirewallConfigRulesRuleActionRedirect
How to redirect a request. Required if action is redirect
action This property is required. String
Base action
actionDuration String
Forward persistence of a rule aciton
rateLimit Property Map
Behavior or a rate limiting action. Required if action is rate*limit
redirect Property Map
How to redirect a request. Required if action is redirect

FirewallConfigRulesRuleActionRateLimit
, FirewallConfigRulesRuleActionRateLimitArgs

Action This property is required. string
Action to take when rate limit is exceeded
Algo This property is required. string
Rate limiting algorithm
Keys This property is required. List<string>
Keys used to bucket an individual client
Limit This property is required. int
number of requests allowed in the window
Window This property is required. int
Time window in seconds
Action This property is required. string
Action to take when rate limit is exceeded
Algo This property is required. string
Rate limiting algorithm
Keys This property is required. []string
Keys used to bucket an individual client
Limit This property is required. int
number of requests allowed in the window
Window This property is required. int
Time window in seconds
action This property is required. String
Action to take when rate limit is exceeded
algo This property is required. String
Rate limiting algorithm
keys This property is required. List<String>
Keys used to bucket an individual client
limit This property is required. Integer
number of requests allowed in the window
window This property is required. Integer
Time window in seconds
action This property is required. string
Action to take when rate limit is exceeded
algo This property is required. string
Rate limiting algorithm
keys This property is required. string[]
Keys used to bucket an individual client
limit This property is required. number
number of requests allowed in the window
window This property is required. number
Time window in seconds
action This property is required. str
Action to take when rate limit is exceeded
algo This property is required. str
Rate limiting algorithm
keys This property is required. Sequence[str]
Keys used to bucket an individual client
limit This property is required. int
number of requests allowed in the window
window This property is required. int
Time window in seconds
action This property is required. String
Action to take when rate limit is exceeded
algo This property is required. String
Rate limiting algorithm
keys This property is required. List<String>
Keys used to bucket an individual client
limit This property is required. Number
number of requests allowed in the window
window This property is required. Number
Time window in seconds

FirewallConfigRulesRuleActionRedirect
, FirewallConfigRulesRuleActionRedirectArgs

Location This property is required. string
Permanent This property is required. bool
Location This property is required. string
Permanent This property is required. bool
location This property is required. String
permanent This property is required. Boolean
location This property is required. string
permanent This property is required. boolean
location This property is required. str
permanent This property is required. bool
location This property is required. String
permanent This property is required. Boolean

FirewallConfigRulesRuleConditionGroup
, FirewallConfigRulesRuleConditionGroupArgs

Conditions This property is required. List<Pulumiverse.Vercel.Inputs.FirewallConfigRulesRuleConditionGroupCondition>
Conditions that must all match within a group
Conditions This property is required. []FirewallConfigRulesRuleConditionGroupCondition
Conditions that must all match within a group
conditions This property is required. List<FirewallConfigRulesRuleConditionGroupCondition>
Conditions that must all match within a group
conditions This property is required. FirewallConfigRulesRuleConditionGroupCondition[]
Conditions that must all match within a group
conditions This property is required. Sequence[FirewallConfigRulesRuleConditionGroupCondition]
Conditions that must all match within a group
conditions This property is required. List<Property Map>
Conditions that must all match within a group

FirewallConfigRulesRuleConditionGroupCondition
, FirewallConfigRulesRuleConditionGroupConditionArgs

Op This property is required. string
How to comparse type to value
Type This property is required. string
Request key type to match against
Key string
Key within type to match against
Neg bool
Value string
Op This property is required. string
How to comparse type to value
Type This property is required. string
Request key type to match against
Key string
Key within type to match against
Neg bool
Value string
op This property is required. String
How to comparse type to value
type This property is required. String
Request key type to match against
key String
Key within type to match against
neg Boolean
value String
op This property is required. string
How to comparse type to value
type This property is required. string
Request key type to match against
key string
Key within type to match against
neg boolean
value string
op This property is required. str
How to comparse type to value
type This property is required. str
Request key type to match against
key str
Key within type to match against
neg bool
value str
op This property is required. String
How to comparse type to value
type This property is required. String
Request key type to match against
key String
Key within type to match against
neg Boolean
value String

Import

$ pulumi import vercel:index/firewallConfig:FirewallConfig example team_xxxxxxxxxxxxxxxxxxxxxxxx/prj_xxxxxxxxxxxxxxxxxxxxxxxxxxxx
Copy

To learn more about importing existing cloud resources, see Importing resources.

Package Details

Repository
vercel pulumiverse/pulumi-vercel
License
Apache-2.0
Notes
This Pulumi package is based on the vercel Terraform Provider.