RavinderReddyF5 / terraform-provider-bigip-version0.12

Terraform resources that can configure F5 BIGIP products
Mozilla Public License 2.0
0 stars 0 forks source link

Issue with irule resource preferred method - Loading from a file. #192

Open RavinderReddyF5 opened 4 years ago

RavinderReddyF5 commented 4 years ago

Issue by soumik612 Monday Sep 23, 2019 at 09:01 GMT Originally opened as https://github.com/terraform-providers/terraform-provider-bigip/issues/161


When I try to add a new irule using files, it works fine. However while pushing changes for other resources, TF tries to re-apply the irule entries, although there's nothing changed in the file. this does not seem efficient, since we have more than 20odd irules and the changes for these irules will pop up during every TF plan. Is there a way, TF can check make a diff of the contents of the file with the state file and apply changes only if there is any ?

RavinderReddyF5 commented 4 years ago

Comment by dannyk81 Wednesday Sep 25, 2019 at 15:39 GMT


@soumik612 interesting, we load up irules from files as well, specifically we use something like below in the bigip_ltm_irule resource configuration:

irule = file("path/to/irule-file.tcl")

with above we never hit an issue that you are describing, as long as the tcl files are not modified we never have these false-positive diffs you describe.

Terraform does make a diff between the irule attribute content in the state and the content being loaded using the file() function and as long as they are the same a diff situation shouldn't be triggered.

can you share your configuration example? and steps to reproduce?