1. Packages
  2. Gcore Provider
  3. API Docs
  4. WaapFirewallRule
gcore 0.24.1 published on Wednesday, Jun 4, 2025 by g-core

gcore.WaapFirewallRule

Explore with Pulumi AI

gcore logo
gcore 0.24.1 published on Wednesday, Jun 4, 2025 by g-core

    Represent WAAP Firewall Rule

    Create WaapFirewallRule Resource

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

    Constructor syntax

    new WaapFirewallRule(name: string, args: WaapFirewallRuleArgs, opts?: CustomResourceOptions);
    @overload
    def WaapFirewallRule(resource_name: str,
                         args: WaapFirewallRuleArgs,
                         opts: Optional[ResourceOptions] = None)
    
    @overload
    def WaapFirewallRule(resource_name: str,
                         opts: Optional[ResourceOptions] = None,
                         action: Optional[WaapFirewallRuleActionArgs] = None,
                         conditions: Optional[WaapFirewallRuleConditionsArgs] = None,
                         domain_id: Optional[float] = None,
                         enabled: Optional[bool] = None,
                         description: Optional[str] = None,
                         name: Optional[str] = None,
                         waap_firewall_rule_id: Optional[str] = None)
    func NewWaapFirewallRule(ctx *Context, name string, args WaapFirewallRuleArgs, opts ...ResourceOption) (*WaapFirewallRule, error)
    public WaapFirewallRule(string name, WaapFirewallRuleArgs args, CustomResourceOptions? opts = null)
    public WaapFirewallRule(String name, WaapFirewallRuleArgs args)
    public WaapFirewallRule(String name, WaapFirewallRuleArgs args, CustomResourceOptions options)
    
    type: gcore:WaapFirewallRule
    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 WaapFirewallRuleArgs
    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 WaapFirewallRuleArgs
    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 WaapFirewallRuleArgs
    The arguments to resource properties.
    opts ResourceOption
    Bag of options to control resource's behavior.
    name string
    The unique name of the resource.
    args WaapFirewallRuleArgs
    The arguments to resource properties.
    opts CustomResourceOptions
    Bag of options to control resource's behavior.
    name String
    The unique name of the resource.
    args WaapFirewallRuleArgs
    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 waapFirewallRuleResource = new Gcore.WaapFirewallRule("waapFirewallRuleResource", new()
    {
        Action = new Gcore.Inputs.WaapFirewallRuleActionArgs
        {
            Allow = false,
            Block = new Gcore.Inputs.WaapFirewallRuleActionBlockArgs
            {
                ActionDuration = "string",
                StatusCode = 0,
            },
        },
        Conditions = new Gcore.Inputs.WaapFirewallRuleConditionsArgs
        {
            Ip = new Gcore.Inputs.WaapFirewallRuleConditionsIpArgs
            {
                IpAddress = "string",
                Negation = false,
            },
            IpRange = new Gcore.Inputs.WaapFirewallRuleConditionsIpRangeArgs
            {
                LowerBound = "string",
                UpperBound = "string",
                Negation = false,
            },
        },
        DomainId = 0,
        Enabled = false,
        Description = "string",
        Name = "string",
        WaapFirewallRuleId = "string",
    });
    
    example, err := gcore.NewWaapFirewallRule(ctx, "waapFirewallRuleResource", &gcore.WaapFirewallRuleArgs{
    	Action: &gcore.WaapFirewallRuleActionArgs{
    		Allow: pulumi.Bool(false),
    		Block: &gcore.WaapFirewallRuleActionBlockArgs{
    			ActionDuration: pulumi.String("string"),
    			StatusCode:     pulumi.Float64(0),
    		},
    	},
    	Conditions: &gcore.WaapFirewallRuleConditionsArgs{
    		Ip: &gcore.WaapFirewallRuleConditionsIpArgs{
    			IpAddress: pulumi.String("string"),
    			Negation:  pulumi.Bool(false),
    		},
    		IpRange: &gcore.WaapFirewallRuleConditionsIpRangeArgs{
    			LowerBound: pulumi.String("string"),
    			UpperBound: pulumi.String("string"),
    			Negation:   pulumi.Bool(false),
    		},
    	},
    	DomainId:           pulumi.Float64(0),
    	Enabled:            pulumi.Bool(false),
    	Description:        pulumi.String("string"),
    	Name:               pulumi.String("string"),
    	WaapFirewallRuleId: pulumi.String("string"),
    })
    
    var waapFirewallRuleResource = new WaapFirewallRule("waapFirewallRuleResource", WaapFirewallRuleArgs.builder()
        .action(WaapFirewallRuleActionArgs.builder()
            .allow(false)
            .block(WaapFirewallRuleActionBlockArgs.builder()
                .actionDuration("string")
                .statusCode(0.0)
                .build())
            .build())
        .conditions(WaapFirewallRuleConditionsArgs.builder()
            .ip(WaapFirewallRuleConditionsIpArgs.builder()
                .ipAddress("string")
                .negation(false)
                .build())
            .ipRange(WaapFirewallRuleConditionsIpRangeArgs.builder()
                .lowerBound("string")
                .upperBound("string")
                .negation(false)
                .build())
            .build())
        .domainId(0.0)
        .enabled(false)
        .description("string")
        .name("string")
        .waapFirewallRuleId("string")
        .build());
    
    waap_firewall_rule_resource = gcore.WaapFirewallRule("waapFirewallRuleResource",
        action={
            "allow": False,
            "block": {
                "action_duration": "string",
                "status_code": 0,
            },
        },
        conditions={
            "ip": {
                "ip_address": "string",
                "negation": False,
            },
            "ip_range": {
                "lower_bound": "string",
                "upper_bound": "string",
                "negation": False,
            },
        },
        domain_id=0,
        enabled=False,
        description="string",
        name="string",
        waap_firewall_rule_id="string")
    
    const waapFirewallRuleResource = new gcore.WaapFirewallRule("waapFirewallRuleResource", {
        action: {
            allow: false,
            block: {
                actionDuration: "string",
                statusCode: 0,
            },
        },
        conditions: {
            ip: {
                ipAddress: "string",
                negation: false,
            },
            ipRange: {
                lowerBound: "string",
                upperBound: "string",
                negation: false,
            },
        },
        domainId: 0,
        enabled: false,
        description: "string",
        name: "string",
        waapFirewallRuleId: "string",
    });
    
    type: gcore:WaapFirewallRule
    properties:
        action:
            allow: false
            block:
                actionDuration: string
                statusCode: 0
        conditions:
            ip:
                ipAddress: string
                negation: false
            ipRange:
                lowerBound: string
                negation: false
                upperBound: string
        description: string
        domainId: 0
        enabled: false
        name: string
        waapFirewallRuleId: string
    

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

    Action WaapFirewallRuleAction
    The action that the rule takes when triggered.
    Conditions WaapFirewallRuleConditions
    The condition required for the WAAP engine to trigger the rule.
    DomainId double
    The WAAP domain ID for which the Firewall Rule is configured.
    Enabled bool
    Whether the rule is enabled.
    Description string
    Description of the firewall rule.
    Name string
    Name of the firewall rule.
    WaapFirewallRuleId string
    The ID of this resource.
    Action WaapFirewallRuleActionArgs
    The action that the rule takes when triggered.
    Conditions WaapFirewallRuleConditionsArgs
    The condition required for the WAAP engine to trigger the rule.
    DomainId float64
    The WAAP domain ID for which the Firewall Rule is configured.
    Enabled bool
    Whether the rule is enabled.
    Description string
    Description of the firewall rule.
    Name string
    Name of the firewall rule.
    WaapFirewallRuleId string
    The ID of this resource.
    action WaapFirewallRuleAction
    The action that the rule takes when triggered.
    conditions WaapFirewallRuleConditions
    The condition required for the WAAP engine to trigger the rule.
    domainId Double
    The WAAP domain ID for which the Firewall Rule is configured.
    enabled Boolean
    Whether the rule is enabled.
    description String
    Description of the firewall rule.
    name String
    Name of the firewall rule.
    waapFirewallRuleId String
    The ID of this resource.
    action WaapFirewallRuleAction
    The action that the rule takes when triggered.
    conditions WaapFirewallRuleConditions
    The condition required for the WAAP engine to trigger the rule.
    domainId number
    The WAAP domain ID for which the Firewall Rule is configured.
    enabled boolean
    Whether the rule is enabled.
    description string
    Description of the firewall rule.
    name string
    Name of the firewall rule.
    waapFirewallRuleId string
    The ID of this resource.
    action WaapFirewallRuleActionArgs
    The action that the rule takes when triggered.
    conditions WaapFirewallRuleConditionsArgs
    The condition required for the WAAP engine to trigger the rule.
    domain_id float
    The WAAP domain ID for which the Firewall Rule is configured.
    enabled bool
    Whether the rule is enabled.
    description str
    Description of the firewall rule.
    name str
    Name of the firewall rule.
    waap_firewall_rule_id str
    The ID of this resource.
    action Property Map
    The action that the rule takes when triggered.
    conditions Property Map
    The condition required for the WAAP engine to trigger the rule.
    domainId Number
    The WAAP domain ID for which the Firewall Rule is configured.
    enabled Boolean
    Whether the rule is enabled.
    description String
    Description of the firewall rule.
    name String
    Name of the firewall rule.
    waapFirewallRuleId String
    The ID of this resource.

    Outputs

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

    Get an existing WaapFirewallRule 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?: WaapFirewallRuleState, opts?: CustomResourceOptions): WaapFirewallRule
    @staticmethod
    def get(resource_name: str,
            id: str,
            opts: Optional[ResourceOptions] = None,
            action: Optional[WaapFirewallRuleActionArgs] = None,
            conditions: Optional[WaapFirewallRuleConditionsArgs] = None,
            description: Optional[str] = None,
            domain_id: Optional[float] = None,
            enabled: Optional[bool] = None,
            name: Optional[str] = None,
            waap_firewall_rule_id: Optional[str] = None) -> WaapFirewallRule
    func GetWaapFirewallRule(ctx *Context, name string, id IDInput, state *WaapFirewallRuleState, opts ...ResourceOption) (*WaapFirewallRule, error)
    public static WaapFirewallRule Get(string name, Input<string> id, WaapFirewallRuleState? state, CustomResourceOptions? opts = null)
    public static WaapFirewallRule get(String name, Output<String> id, WaapFirewallRuleState state, CustomResourceOptions options)
    resources:  _:    type: gcore:WaapFirewallRule    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:
    Action WaapFirewallRuleAction
    The action that the rule takes when triggered.
    Conditions WaapFirewallRuleConditions
    The condition required for the WAAP engine to trigger the rule.
    Description string
    Description of the firewall rule.
    DomainId double
    The WAAP domain ID for which the Firewall Rule is configured.
    Enabled bool
    Whether the rule is enabled.
    Name string
    Name of the firewall rule.
    WaapFirewallRuleId string
    The ID of this resource.
    Action WaapFirewallRuleActionArgs
    The action that the rule takes when triggered.
    Conditions WaapFirewallRuleConditionsArgs
    The condition required for the WAAP engine to trigger the rule.
    Description string
    Description of the firewall rule.
    DomainId float64
    The WAAP domain ID for which the Firewall Rule is configured.
    Enabled bool
    Whether the rule is enabled.
    Name string
    Name of the firewall rule.
    WaapFirewallRuleId string
    The ID of this resource.
    action WaapFirewallRuleAction
    The action that the rule takes when triggered.
    conditions WaapFirewallRuleConditions
    The condition required for the WAAP engine to trigger the rule.
    description String
    Description of the firewall rule.
    domainId Double
    The WAAP domain ID for which the Firewall Rule is configured.
    enabled Boolean
    Whether the rule is enabled.
    name String
    Name of the firewall rule.
    waapFirewallRuleId String
    The ID of this resource.
    action WaapFirewallRuleAction
    The action that the rule takes when triggered.
    conditions WaapFirewallRuleConditions
    The condition required for the WAAP engine to trigger the rule.
    description string
    Description of the firewall rule.
    domainId number
    The WAAP domain ID for which the Firewall Rule is configured.
    enabled boolean
    Whether the rule is enabled.
    name string
    Name of the firewall rule.
    waapFirewallRuleId string
    The ID of this resource.
    action WaapFirewallRuleActionArgs
    The action that the rule takes when triggered.
    conditions WaapFirewallRuleConditionsArgs
    The condition required for the WAAP engine to trigger the rule.
    description str
    Description of the firewall rule.
    domain_id float
    The WAAP domain ID for which the Firewall Rule is configured.
    enabled bool
    Whether the rule is enabled.
    name str
    Name of the firewall rule.
    waap_firewall_rule_id str
    The ID of this resource.
    action Property Map
    The action that the rule takes when triggered.
    conditions Property Map
    The condition required for the WAAP engine to trigger the rule.
    description String
    Description of the firewall rule.
    domainId Number
    The WAAP domain ID for which the Firewall Rule is configured.
    enabled Boolean
    Whether the rule is enabled.
    name String
    Name of the firewall rule.
    waapFirewallRuleId String
    The ID of this resource.

    Supporting Types

    WaapFirewallRuleAction, WaapFirewallRuleActionArgs

    Allow bool
    The WAAP allows the request.
    Block WaapFirewallRuleActionBlock
    The WAAP blocks the request.
    Allow bool
    The WAAP allows the request.
    Block WaapFirewallRuleActionBlock
    The WAAP blocks the request.
    allow Boolean
    The WAAP allows the request.
    block WaapFirewallRuleActionBlock
    The WAAP blocks the request.
    allow boolean
    The WAAP allows the request.
    block WaapFirewallRuleActionBlock
    The WAAP blocks the request.
    allow bool
    The WAAP allows the request.
    block WaapFirewallRuleActionBlock
    The WAAP blocks the request.
    allow Boolean
    The WAAP allows the request.
    block Property Map
    The WAAP blocks the request.

    WaapFirewallRuleActionBlock, WaapFirewallRuleActionBlockArgs

    ActionDuration string
    How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
    StatusCode double
    A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.
    ActionDuration string
    How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
    StatusCode float64
    A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.
    actionDuration String
    How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
    statusCode Double
    A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.
    actionDuration string
    How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
    statusCode number
    A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.
    action_duration str
    How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
    status_code float
    A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.
    actionDuration String
    How long a rule's block action will apply to subsequent requests. Can be specified in seconds or by using a numeral followed by 's', 'm', 'h', or 'd' to represent time format (seconds, minutes, hours, or days). Example: 12h. Must match the pattern ^[0-9]*[smhd]?$
    statusCode Number
    A custom HTTP status code that the WAAP returns if a rule blocks a request. It must be one of these values {403, 405, 418, 429}. Default is 403.

    WaapFirewallRuleConditions, WaapFirewallRuleConditionsArgs

    Ip WaapFirewallRuleConditionsIp
    IP address condition. This condition matches a single IP address.
    IpRange WaapFirewallRuleConditionsIpRange
    IP range condition. This condition matches a range of IP addresses.
    Ip WaapFirewallRuleConditionsIp
    IP address condition. This condition matches a single IP address.
    IpRange WaapFirewallRuleConditionsIpRange
    IP range condition. This condition matches a range of IP addresses.
    ip WaapFirewallRuleConditionsIp
    IP address condition. This condition matches a single IP address.
    ipRange WaapFirewallRuleConditionsIpRange
    IP range condition. This condition matches a range of IP addresses.
    ip WaapFirewallRuleConditionsIp
    IP address condition. This condition matches a single IP address.
    ipRange WaapFirewallRuleConditionsIpRange
    IP range condition. This condition matches a range of IP addresses.
    ip WaapFirewallRuleConditionsIp
    IP address condition. This condition matches a single IP address.
    ip_range WaapFirewallRuleConditionsIpRange
    IP range condition. This condition matches a range of IP addresses.
    ip Property Map
    IP address condition. This condition matches a single IP address.
    ipRange Property Map
    IP range condition. This condition matches a range of IP addresses.

    WaapFirewallRuleConditionsIp, WaapFirewallRuleConditionsIpArgs

    IpAddress string
    A single IPv4 or IPv6 address to match.
    Negation bool
    Whether or not to apply a boolean NOT operation to the rule's condition.
    IpAddress string
    A single IPv4 or IPv6 address to match.
    Negation bool
    Whether or not to apply a boolean NOT operation to the rule's condition.
    ipAddress String
    A single IPv4 or IPv6 address to match.
    negation Boolean
    Whether or not to apply a boolean NOT operation to the rule's condition.
    ipAddress string
    A single IPv4 or IPv6 address to match.
    negation boolean
    Whether or not to apply a boolean NOT operation to the rule's condition.
    ip_address str
    A single IPv4 or IPv6 address to match.
    negation bool
    Whether or not to apply a boolean NOT operation to the rule's condition.
    ipAddress String
    A single IPv4 or IPv6 address to match.
    negation Boolean
    Whether or not to apply a boolean NOT operation to the rule's condition.

    WaapFirewallRuleConditionsIpRange, WaapFirewallRuleConditionsIpRangeArgs

    LowerBound string
    The lower bound IPv4 or IPv6 address to match against.
    UpperBound string
    The upper bound IPv4 or IPv6 address to match against.
    Negation bool
    Whether or not to apply a boolean NOT operation to the rule's condition.
    LowerBound string
    The lower bound IPv4 or IPv6 address to match against.
    UpperBound string
    The upper bound IPv4 or IPv6 address to match against.
    Negation bool
    Whether or not to apply a boolean NOT operation to the rule's condition.
    lowerBound String
    The lower bound IPv4 or IPv6 address to match against.
    upperBound String
    The upper bound IPv4 or IPv6 address to match against.
    negation Boolean
    Whether or not to apply a boolean NOT operation to the rule's condition.
    lowerBound string
    The lower bound IPv4 or IPv6 address to match against.
    upperBound string
    The upper bound IPv4 or IPv6 address to match against.
    negation boolean
    Whether or not to apply a boolean NOT operation to the rule's condition.
    lower_bound str
    The lower bound IPv4 or IPv6 address to match against.
    upper_bound str
    The upper bound IPv4 or IPv6 address to match against.
    negation bool
    Whether or not to apply a boolean NOT operation to the rule's condition.
    lowerBound String
    The lower bound IPv4 or IPv6 address to match against.
    upperBound String
    The upper bound IPv4 or IPv6 address to match against.
    negation Boolean
    Whether or not to apply a boolean NOT operation to the rule's condition.

    Import

    import using <domain_id>:<rule_id>

    $ pulumi import gcore:index/waapFirewallRule:WaapFirewallRule firewall_rule 136578:912200
    

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

    Package Details

    Repository
    gcore g-core/terraform-provider-gcore
    License
    Notes
    This Pulumi package is based on the gcore Terraform Provider.
    gcore logo
    gcore 0.24.1 published on Wednesday, Jun 4, 2025 by g-core