Open RavinderReddyF5 opened 4 years ago
Comment by scshitole Thursday Jul 18, 2019 at 20:55 GMT
@spirrello can you please try with rule
instead
Comment by RavinderReddyF5 Friday Jul 19, 2019 at 09:28 GMT
@spirrello
you should use irules
instead rule
Terraform show
# bigip_ltm_irule.test-rule:
resource "bigip_ltm_irule" "test-rule" {
id = "/Common/test-irule"
irule = "when CLIENT_ACCEPTED {\r\n log local0. \"test\"\r\n}\r"
name = "/Common/test-irule"
}
# bigip_ltm_virtual_server.test-vs:
resource "bigip_ltm_virtual_server" "test-vs" {
client_profiles = []
description = "VirtualServer-test"
destination = "192.168.20.1"
id = "/Common/test-vs"
ip_protocol = "any"
irules = [
"/Common/test-irule",
]
mask = "255.255.255.255"
name = "/Common/test-vs"
persistence_profiles = []
port = 0
profiles = [
"/Common/fastL4",
]
server_profiles = []
source = "0.0.0.0/0"
source_address_translation = "none"
translate_address = "enabled"
translate_port = "enabled"
vlans_enabled = false
}
Comment by spirrello Friday Jul 19, 2019 at 14:27 GMT
I'll try that thanks. So is this documentation incorrect where it states to use rules
?
https://www.terraform.io/docs/providers/bigip/r/bigip_ltm_virtual_server.html
Comment by RavinderReddyF5 Tuesday Jul 23, 2019 at 06:16 GMT
@spirrello Sure will Update Document accordingly.
Comment by spirrello Friday Aug 16, 2019 at 20:38 GMT
@papineni87 haven't had a chance to test but go ahead and close this...thanks for your help.
Issue by spirrello Tuesday Jul 16, 2019 at 20:43 GMT Originally opened as https://github.com/terraform-providers/terraform-provider-bigip/issues/127
Hi,
I'm trying to add an irule to my virtual server but I'm getting an error. Am I doing something wrong?
ERROR MESSAGE: terraform plan -var-file=f5.secrets.tfvars -input=false
Error: module.vpmytest.module.vpmytest.bigip_ltm_virtual_server.https: : invalid or unknown key: rules
Version and resource snippet:
resource "bigip_ltm_virtual_server" "https" {
name = "${var.partition}${var.vip_name}" destination = "${var.virtual_ip}" port = "${var.vip_port}" pool = "${var.partition}${var.pool}" profiles = "${var.profiles}" source_address_translation = "${var.source_address_translation}" translate_port = "${var.translate_port}" vlans_enabled = "${var.vlans_enabled}" vlans = ["${var.vlan}"] rules = ["${var.rules}"] depends_on = ["bigip_ltm_pool.pool"] }