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

[bug] Incorrect change detection for email form fields

Open elliotdickison opened this issue 4 months ago • 0 comments

Description

If you define a fusionauth_form_field resource with key = "user.email" then Terrform will report that a mysterious type field (not in the docs) has changed on every apply.

Reproduce

resource "fusionauth_form_field" "email" {
  description = "User email"
  key         = "user.email"
  control     = "text"
  name        = "Email"
  required    = true
}

Workaround

Ignore changes on the hidden type field:

resource "fusionauth_form_field" "email" {
  description = "User email"
  key         = "user.email"
  control     = "text"
  name        = "Email"
  required    = true

  lifecycle {
    ignore_changes = [
      type
    ]
  }
}

elliotdickison avatar Feb 09 '24 21:02 elliotdickison