perfectsense / gyro

Gyro is a command-line tool for creating, updating, and maintaining cloud infrastructure. Gyro makes infrastructure-as-code possible.
https://gyro.dev
Apache License 2.0
134 stars 7 forks source link

add evaluation window to rate based statement #412

Open dremesa opened 2 months ago

dremesa commented 2 months ago

When creating waf rules with a rate-based-statement, I'd like for the ability to control the evaluation window, right now it defaults to the aws value of 300 seconds, and I'd like to be able to set the other values if needed. Right now I have to do so manually in the aws console.

    rule
        name: "RateLimit"
        priority: 7
        action: "BLOCK"

        visibility-config
            metric-name: "ratelimit"
            cloud-watch-metrics-enabled: true
            sampled-requests-enabled: true
        end

        statement
            rate-based-statement
                limit: 750
            end
        end
    end