F5Networks / terraform-provider-bigip

Terraform resources that can configure F5 BIG-IP products
https://registry.terraform.io/providers/F5Networks/bigip/latest/docs
Mozilla Public License 2.0
103 stars 119 forks source link

bigip_as3 does not provide details about what resource will be changed when a modification was done outside of terraform #951

Closed Claudepustai closed 6 months ago

Claudepustai commented 6 months ago

Is your feature request related to a problem? Please describe.

I have noticed that the bigip_as3 resource does not display what changes will be made when you re-run "terraform apply" when change has been made outside of terraform code. It does not show changes as nicely as, bigip_ltm_policy,for example.

How to reproduce

  1. From the attached files , deploy the application
  2. Go to the GUI of BIG-IP and change one feature that is mentioned in the declaration , such as adding an extra pool member that is not written in the declaration.
  3. Rerun terraform apply and observe that terraform will detect that some changes will be done but it does not mention the exact resource that will be changed.

By default, the bigip_as3 does not update the terraform.tfvars with the info to be able to detect this changes so I have added this extra file , output.tf with the following lines in the directory from where I run the terraform apply

_output "configJSON" { value = bigipas3.as3-example sensitive = true }

This idea I took from https://clouddocs.f5.com/products/orchestration/terraform/latest/BIG-IP/fast-integration/create-http.html#fast-integration-http

I am aware that changes should not be done outside the terraform code but terraform has this nice feature that it will double check what's configured and what is in the declaration. This would serve as a guardrail.

Describe the solution you'd like

I would like that bigip_as3 would detect the changes done outside the terraform code and display the change that will be performed.

Describe alternatives you've considered

I haven't tried any other alternative. Terraform-AS3.zip

Additional context

I have attached my simple terraform application that I have used

How the output of the terraform looks like when an extra pool member is added in the GUI ( outside of the terraform code)

image

image