terraform-provider-bigip icon indicating copy to clipboard operation
terraform-provider-bigip copied to clipboard

Crash when running terraform apply.

Open HaloGithub opened this issue 6 years ago • 1 comments

Hi there, When I running terraform apply, it showed TERRAFORM CRASH.

Here is my terraform file content:

resource "bigip_ltm_policy" "policy_frontend-api_ip-limit" {
    name = "policy_frontend-api_ip-limit"
    strategy = "first-match"
    requires = [ "http" ]
    controls = [ "forwarding" ]
    rule = [
        {
            name = "deny-when-xff-header-missing"
            condition {
                all = true
                case_insensitive = true
                equals = true
                external = true
                http_header = true
                tm_name = "X-Forwared-For"
                present = true
                remote = true
                request = true
                values = [
                    ""
                ]
            }
            action {
                forward = true
                request = true
                reset = true
            }
        }
    ]
}

And this is crash.log:

crash.log

Please help to check, thanks!

HaloGithub avatar Nov 24 '18 17:11 HaloGithub

I know why crash, just because values = [ "" ], and I wonder how to check HTTP-Header X-Forwarded-For is empty. Currently I occur another error after change values to:

values = [
    "''"
]

And error message is:

* bigip_ltm_policy.policy_frontend-api_ip-limit: 01071706:3: Policy '/Common/Drafts/policy_frontend-api_ip-limit', rule 'deny-when-xff-header-missing'; missing operand.

HaloGithub avatar Nov 25 '18 09:11 HaloGithub

fixed in latest version, please open new issue if issue still present

RavinderReddyF5 avatar Sep 23 '22 10:09 RavinderReddyF5