terraform-provider-bigip icon indicating copy to clipboard operation
terraform-provider-bigip copied to clipboard

bigip_command always shows command_result as a new field

Open braunsonm opened this issue 3 years ago • 2 comments

Summary

When you create a bigip_command, it will succeed but whenever you run terraform apply again it will always show + command_result = (known after apply) causing the command to be modified everytime.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Create a bigip_command resource
  2. Run tf apply again
  3. Notice the change always appearing

Expected Behavior

The resource should have no changes detected

Actual Behavior

The resource pollutes the terraform plan

braunsonm avatar Mar 30 '22 20:03 braunsonm

@braunsonm Please share the exact TF manifest to try at our end.

trinaths avatar Apr 12 '22 17:04 trinaths

@trinaths

resource "bigip_command" "create_partition" {
  commands = ["create auth partition ${var.partition_name} default-route-domain 0"]
  when = "apply"
}

This is a temporary workaround:

resource "bigip_command" "create_partition" {
  commands = ["create auth partition ${var.partition_name} default-route-domain 0"]
  when = "apply"

  lifecycle {
    ignore_changes = [command_result]
  }
}

braunsonm avatar Apr 12 '22 20:04 braunsonm