Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bigip_ltm_policy rule condition not working #119

Closed
myclau opened this issue Jun 19, 2019 · 5 comments
Closed

bigip_ltm_policy rule condition not working #119

myclau opened this issue Jun 19, 2019 · 5 comments

Comments

@myclau
Copy link

myclau commented Jun 19, 2019

I am trying to create a policy if the uri contain my domain will forward to some pool.
This is my current policy resource

resource "bigip_ltm_policy" "policy" {
  name = "${var.poolName}-policy"
  strategy = "first-match"
  requires = ["http"]
  published_copy = "Drafts/${var.poolName}-policy"
  controls = ["forwarding"]
  rule {
    name = "route-${var.poolName}"
    condition {
      http_uri = true
      host = true
      contains = true
      values = ["<mydomain>"]
    }
    action {
      forward = true
      pool = "${bigip_ltm_pool.pool.name}"
    }
 }
  depends_on = ["bigip_ltm_pool.pool"]
}

when I terraform apply
it will always show up this

Error: 01071706:3: Policy '/Common/Drafts/<poolname>-policy', rule 'route-<poolname>'; missing operand.

  on main.tf line 121, in resource "bigip_ltm_policy" "policy":
 121: resource "bigip_ltm_policy" "policy" {

I try if comment the condition is will create the policy successfully

resource "bigip_ltm_policy" "policy" {
  name = "${var.poolName}-policy"
  strategy = "first-match"
  requires = ["http"]
  published_copy = "Drafts/${var.poolName}-policy"
  controls = ["forwarding"]
  rule {
    name = "route-${var.poolName}"
    #condition {
    #  http_uri = true
    #  host = true
    #  contains = true
    #  values = ["<mydomain>"]
    #}
    action {
      forward = true
      pool = "${bigip_ltm_pool.pool.name}"
    }
 }
  depends_on = ["bigip_ltm_pool.pool"]
}

More info

my current provider settings

provider "bigip" {
  version = "=0.12.3"
  address = "${var.url}"
  username = "${var.username}"
  password = "${var.password}"
}
@mdditt2000
Copy link

mdditt2000 commented Jul 2, 2019

Jira TER-23

@Pacobart
Copy link

Pacobart commented Jul 3, 2019

I'm experiencing this same issue. Any update on a fix?

@davidroberts63
Copy link

Same here. Any updates?

@papineni87
Copy link
Collaborator

@davidroberts63 This might be fixed in last merge request. Can you clone the latest code and try it ?

@papineni87
Copy link
Collaborator

Issue is fixed in 1.4 release, closing the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants