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

Idempotency bug - a sumologic_field without State forces replacement

Open mccartney opened this issue 4 years ago • 0 comments

Steps to reproduce

resource "sumologic_field" "fieldtest1" {
  field_name = "fieldtest1"
  data_type = "String"
}
  1. Run terraform apply twice

Observed

At the second run, the provider insists on replacing the field:

  # sumologic_field.fieldtest1 must be replaced
-/+ resource "sumologic_field" "fieldtest1" {
      ~ field_id   = "0000000000820A09" -> (known after apply)
      ~ id         = "0000000000820A09" -> (known after apply)
      - state      = "Enabled" -> null # forces replacement
        # (2 unchanged attributes hidden)
    }

Workaround

Specify state = Enabled explicitly.

mccartney avatar Oct 15 '21 08:10 mccartney