Forum Discussion

klevak's avatar
klevak
Icon for Nimbostratus rankNimbostratus
May 15, 2024

Using Terraform to update / modify an existing iRule

I could be missing something obvious here.  I am attempting to use terraform to update an existing iRule (code below).  Every time I run 'apply' I get an error saying: "

The requested iRule (/Common/Load_MWservices) already exists in partition Common"

 

I am wondering what the option would be to update an existing rule?  It seems I can only create new ones?  Thanks in advance

 

 

 

variable f5_hostname {}
variable f5_username {}
variable f5_password {}

terraform {
  required_providers {
    bigip = {
      source = "F5Networks/bigip"
    }
  }
}

provider "bigip" {
  address  = var.f5_hostname
  username = var.f5_username
  password = var.f5_password
}

# Loading from a file is the preferred method
resource "bigip_ltm_irule" "rule" {
  name  = "/Common/Load_MWservices"
  irule = file("Load_MWservices")
}

1 Reply

  • You can't modify existing iRule. Delete and recreate iRule is only options. 

    irule = file("Load_MWservices")