terraform-provider-sumologic
terraform-provider-sumologic copied to clipboard
Idempotency bug - a sumologic_field without State forces replacement
Steps to reproduce
resource "sumologic_field" "fieldtest1" {
field_name = "fieldtest1"
data_type = "String"
}
- Run
terraform applytwice
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.