1. Packages
  2. Fastly Provider
  3. API Docs
  4. NgwafWorkspaceList
Fastly v11.0.0 published on Thursday, Sep 4, 2025 by Pulumi

fastly.NgwafWorkspaceList

Explore with Pulumi AI

fastly logo
Fastly v11.0.0 published on Thursday, Sep 4, 2025 by Pulumi

    Provides a Fastly Next-Gen WAF List resource scoped to a specific workspace.

    Workspace-scoped lists are local to a workspace and typically used within workspace-specific rules.

    Example Usage

    Basic usage:

    import * as pulumi from "@pulumi/pulumi";
    import * as fastly from "@pulumi/fastly";
    
    const example = new fastly.NgwafWorkspace("example", {
        name: "example",
        description: "Workspace with custom list",
        mode: "block",
        ipAnonymization: "hashed",
        clientIpHeaders: [
            "X-Forwarded-For",
            "X-Real-IP",
        ],
        defaultBlockingResponseCode: 403,
        attackSignalThresholds: {
            oneMinute: 100,
            tenMinutes: 500,
            oneHour: 1000,
            immediate: true,
        },
    });
    const exampleNgwafWorkspaceList = new fastly.NgwafWorkspaceList("example", {
        workspaceId: example.id,
        name: "local-allowlist",
        description: "IP allowlist for this workspace",
        type: "ip",
        entries: [
            "192.168.0.1",
            "10.0.0.1",
        ],
    });
    
    import pulumi
    import pulumi_fastly as fastly
    
    example = fastly.NgwafWorkspace("example",
        name="example",
        description="Workspace with custom list",
        mode="block",
        ip_anonymization="hashed",
        client_ip_headers=[
            "X-Forwarded-For",
            "X-Real-IP",
        ],
        default_blocking_response_code=403,
        attack_signal_thresholds={
            "one_minute": 100,
            "ten_minutes": 500,
            "one_hour": 1000,
            "immediate": True,
        })
    example_ngwaf_workspace_list = fastly.NgwafWorkspaceList("example",
        workspace_id=example.id,
        name="local-allowlist",
        description="IP allowlist for this workspace",
        type="ip",
        entries=[
            "192.168.0.1",
            "10.0.0.1",
        ])
    
    package main
    
    import (
    	"github.com/pulumi/pulumi-fastly/sdk/v11/go/fastly"
    	"github.com/pulumi/pulumi/sdk/v3/go/pulumi"
    )
    
    func main() {
    	pulumi.Run(func(ctx *pulumi.Context) error {
    		example, err := fastly.NewNgwafWorkspace(ctx, "example", &fastly.NgwafWorkspaceArgs{
    			Name:            pulumi.String("example"),
    			Description:     pulumi.String("Workspace with custom list"),
    			Mode:            pulumi.String("block"),
    			IpAnonymization: pulumi.String("hashed"),
    			ClientIpHeaders: pulumi.StringArray{
    				pulumi.String("X-Forwarded-For"),
    				pulumi.String("X-Real-IP"),
    			},
    			DefaultBlockingResponseCode: pulumi.Int(403),
    			AttackSignalThresholds: &fastly.NgwafWorkspaceAttackSignalThresholdsArgs{
    				OneMinute:  pulumi.Int(100),
    				TenMinutes: pulumi.Int(500),
    				OneHour:    pulumi.Int(1000),
    				Immediate:  pulumi.Bool(true),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		_, err = fastly.NewNgwafWorkspaceList(ctx, "example", &fastly.NgwafWorkspaceListArgs{
    			WorkspaceId: example.ID(),
    			Name:        pulumi.String("local-allowlist"),
    			Description: pulumi.String("IP allowlist for this workspace"),
    			Type:        pulumi.String("ip"),
    			Entries: pulumi.StringArray{
    				pulumi.String("192.168.0.1"),
    				pulumi.String("10.0.0.1"),
    			},
    		})
    		if err != nil {
    			return err
    		}
    		return nil
    	})
    }
    
    using System.Collections.Generic;
    using System.Linq;
    using Pulumi;
    using Fastly = Pulumi.Fastly;
    
    return await Deployment.RunAsync(() => 
    {
        var example = new Fastly.NgwafWorkspace("example", new()
        {
            Name = "example",
            Description = "Workspace with custom list",
            Mode = "block",
            IpAnonymization = "hashed",
            ClientIpHeaders = new[]
            {
                "X-Forwarded-For",
                "X-Real-IP",
            },
            DefaultBlockingResponseCode = 403,
            AttackSignalThresholds = new Fastly.Inputs.NgwafWorkspaceAttackSignalThresholdsArgs
            {
                OneMinute = 100,
                TenMinutes = 500,
                OneHour = 1000,
                Immediate = true,
            },
        });
    
        var exampleNgwafWorkspaceList = new Fastly.NgwafWorkspaceList("example", new()
        {
            WorkspaceId = example.Id,
            Name = "local-allowlist",
            Description = "IP allowlist for this workspace",
            Type = "ip",
            Entries = new[]
            {
                "192.168.0.1",
                "10.0.0.1",
            },
        });
    
    });
    
    package generated_program;
    
    import com.pulumi.Context;
    import com.pulumi.Pulumi;
    import com.pulumi.core.Output;
    import com.pulumi.fastly.NgwafWorkspace;
    import com.pulumi.fastly.NgwafWorkspaceArgs;
    import com.pulumi.fastly.inputs.NgwafWorkspaceAttackSignalThresholdsArgs;
    import com.pulumi.fastly.NgwafWorkspaceList;
    import com.pulumi.fastly.NgwafWorkspaceListArgs;
    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 example = new NgwafWorkspace("example", NgwafWorkspaceArgs.builder()
                .name("example")
                .description("Workspace with custom list")
                .mode("block")
                .ipAnonymization("hashed")
                .clientIpHeaders(            
                    "X-Forwarded-For",
                    "X-Real-IP")
                .defaultBlockingResponseCode(403)
                .attackSignalThresholds(NgwafWorkspaceAttackSignalThresholdsArgs.builder()
                    .oneMinute(100)
                    .tenMinutes(500)
                    .oneHour(1000)
                    .immediate(true)
                    .build())
                .build());
    
            var exampleNgwafWorkspaceList = new NgwafWorkspaceList("exampleNgwafWorkspaceList", NgwafWorkspaceListArgs.builder()
                .workspaceId(example.id())
                .name("local-allowlist")
                .description("IP allowlist for this workspace")
                .type("ip")
                .entries(            
                    "192.168.0.1",
                    "10.0.0.1")
                .build());
    
        }
    }
    
    resources:
      example:
        type: fastly:NgwafWorkspace
        properties:
          name: example
          description: Workspace with custom list
          mode: block
          ipAnonymization: hashed
          clientIpHeaders:
            - X-Forwarded-For
            - X-Real-IP
          defaultBlockingResponseCode: 403
          attackSignalThresholds:
            oneMinute: 100
            tenMinutes: 500
            oneHour: 1000
            immediate: true
      exampleNgwafWorkspaceList:
        type: fastly:NgwafWorkspaceList
        name: example
        properties:
          workspaceId: ${example.id}
          name: local-allowlist
          description: IP allowlist for this workspace
          type: ip
          entries:
            - 192.168.0.1
            - 10.0.0.1
    

    Create NgwafWorkspaceList Resource

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

    Constructor syntax

    new NgwafWorkspaceList(name: string, args: NgwafWorkspaceListArgs, opts?: CustomResourceOptions);
    @overload
    def NgwafWorkspaceList(resource_name: str,
                           args: NgwafWorkspaceListArgs,
                           opts: Optional[ResourceOptions] = None)
    
    @overload
    def NgwafWorkspaceList(resource_name: str,
                           opts: Optional[ResourceOptions] = None,
                           entries: Optional[Sequence[str]] = None,
                           type: Optional[str] = None,
                           workspace_id: Optional[str] = None,
                           description: Optional[str] = None,
                           name: Optional[str] = None)
    func NewNgwafWorkspaceList(ctx *Context, name string, args NgwafWorkspaceListArgs, opts ...ResourceOption) (*NgwafWorkspaceList, error)
    public NgwafWorkspaceList(string name, NgwafWorkspaceListArgs args, CustomResourceOptions? opts = null)
    public NgwafWorkspaceList(String name, NgwafWorkspaceListArgs args)
    public NgwafWorkspaceList(String name, NgwafWorkspaceListArgs args, CustomResourceOptions options)
    
    type: fastly:NgwafWorkspaceList
    properties: # The arguments to resource properties.
    options: # Bag of options to control resource's behavior.
    
    

    Parameters

    name string
    The unique name of the resource.
    args NgwafWorkspaceListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    resource_name str
    The unique name of the resource.
    args NgwafWorkspaceListArgs
    The arguments to resource properties.
    opts ResourceOptions
    Bag of options to control resource's behavior.
    ctx Context
    Context object for the current deployment.
    name string
    The unique name of the resource.
    args NgwafWorkspaceListArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args NgwafWorkspaceListArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args NgwafWorkspaceListArgs
    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 ngwafWorkspaceListResource = new Fastly.NgwafWorkspaceList("ngwafWorkspaceListResource", new()
    {
        Entries = new[]
        {
            "string",
        },
        Type = "string",
        WorkspaceId = "string",
        Description = "string",
        Name = "string",
    });
    
    example, err := fastly.NewNgwafWorkspaceList(ctx, "ngwafWorkspaceListResource", &fastly.NgwafWorkspaceListArgs{
    	Entries: pulumi.StringArray{
    		pulumi.String("string"),
    	},
    	Type:        pulumi.String("string"),
    	WorkspaceId: pulumi.String("string"),
    	Description: pulumi.String("string"),
    	Name:        pulumi.String("string"),
    })
    
    var ngwafWorkspaceListResource = new NgwafWorkspaceList("ngwafWorkspaceListResource", NgwafWorkspaceListArgs.builder()
        .entries("string")
        .type("string")
        .workspaceId("string")
        .description("string")
        .name("string")
        .build());
    
    ngwaf_workspace_list_resource = fastly.NgwafWorkspaceList("ngwafWorkspaceListResource",
        entries=["string"],
        type="string",
        workspace_id="string",
        description="string",
        name="string")
    
    const ngwafWorkspaceListResource = new fastly.NgwafWorkspaceList("ngwafWorkspaceListResource", {
        entries: ["string"],
        type: "string",
        workspaceId: "string",
        description: "string",
        name: "string",
    });
    
    type: fastly:NgwafWorkspaceList
    properties:
        description: string
        entries:
            - string
        name: string
        type: string
        workspaceId: string
    

    NgwafWorkspaceList 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 NgwafWorkspaceList resource accepts the following input properties:

    Entries List<string>
    The values in the list.
    Type string
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    WorkspaceId string
    Description string
    The description of the list.
    Name string
    The name of the list.
    Entries []string
    The values in the list.
    Type string
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    WorkspaceId string
    Description string
    The description of the list.
    Name string
    The name of the list.
    entries List<String>
    The values in the list.
    type String
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    workspaceId String
    description String
    The description of the list.
    name String
    The name of the list.
    entries string[]
    The values in the list.
    type string
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    workspaceId string
    description string
    The description of the list.
    name string
    The name of the list.
    entries Sequence[str]
    The values in the list.
    type str
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    workspace_id str
    description str
    The description of the list.
    name str
    The name of the list.
    entries List<String>
    The values in the list.
    type String
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    workspaceId String
    description String
    The description of the list.
    name String
    The name of the list.

    Outputs

    All input properties are implicitly available as output properties. Additionally, the NgwafWorkspaceList 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 NgwafWorkspaceList Resource

    Get an existing NgwafWorkspaceList 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?: NgwafWorkspaceListState, opts?: CustomResourceOptions): NgwafWorkspaceList
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            description: Optional[str] = None,
            entries: Optional[Sequence[str]] = None,
            name: Optional[str] = None,
            type: Optional[str] = None,
            workspace_id: Optional[str] = None) -> NgwafWorkspaceList
    func GetNgwafWorkspaceList(ctx *Context, name string, id IDInput, state *NgwafWorkspaceListState, opts ...ResourceOption) (*NgwafWorkspaceList, error)
    public static NgwafWorkspaceList Get(string name, Input<string> id, NgwafWorkspaceListState? state, CustomResourceOptions? opts = null)
    public static NgwafWorkspaceList get(String name, Output<String> id, NgwafWorkspaceListState state, CustomResourceOptions options)
    resources:  _:    type: fastly:NgwafWorkspaceList    get:      id: ${id}
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    The unique provider ID of the resource to lookup.
    name
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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
    The unique name of the resulting resource.
    id
    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:
    Description string
    The description of the list.
    Entries List<string>
    The values in the list.
    Name string
    The name of the list.
    Type string
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    WorkspaceId string
    Description string
    The description of the list.
    Entries []string
    The values in the list.
    Name string
    The name of the list.
    Type string
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    WorkspaceId string
    description String
    The description of the list.
    entries List<String>
    The values in the list.
    name String
    The name of the list.
    type String
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    workspaceId String
    description string
    The description of the list.
    entries string[]
    The values in the list.
    name string
    The name of the list.
    type string
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    workspaceId string
    description str
    The description of the list.
    entries Sequence[str]
    The values in the list.
    name str
    The name of the list.
    type str
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    workspace_id str
    description String
    The description of the list.
    entries List<String>
    The values in the list.
    name String
    The name of the list.
    type String
    The type of list. Accepted values are string, wildcard, ip, country, and signal.
    workspaceId String

    Import

    Fastly Next-Gen WAF workspace-scoped lists can be imported using the format <workspaceID>/<listID>, e.g.:

    $ pulumi import fastly:index/ngwafWorkspaceList:NgwafWorkspaceList demo <workspaceID>/<listID>
    

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

    Package Details

    Repository
    Fastly pulumi/pulumi-fastly
    License
    Apache-2.0
    Notes
    This Pulumi package is based on the fastly Terraform Provider.
    fastly logo
    Fastly v11.0.0 published on Thursday, Sep 4, 2025 by Pulumi