Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug] Incorrect change detection for application form configuration #261

Open
elliotdickison opened this issue Feb 9, 2024 · 0 comments

Comments

@elliotdickison
Copy link
Contributor

elliotdickison commented Feb 9, 2024

Description

If you include form_configuration on a fusionauth_application resource without specifying an admin registration form ID then Terrform will report that the admin registration form ID has changed on every apply.

Reproduce

# On every apply you'll see something like: - admin_registration_form_id = "8369bc8a-5be8-02b9-7f2d-cd869c09a57b"
resource "fusionauth_application" "this" {
  
  ...

  form_configuration {
    self_service_form_id = "f8f406ba-8810-47c8-a984-3ab4a43eaf59"
  }
}

Workaround

I can't figure out a way to ignore changes to the admin_registration_form_id field without also ignoring changes to the self_service_form_id field - there's something odd with the way form_configuration is handled in a lifecycle.ignore_changes block (adding form_configuration["admin_registration_form_id"] results in an error).

For now I'm just explicitly setting admin_registration_form_id to the default form any time I need to use the form_configuration block (fusionauth_form data source to the rescue):

data "fusionauth_form" "default_admin_registration" {
  name = "Default Admin Registration provided by FusionAuth"
}

resource "fusionauth_application" "this" {
  
  ...

  form_configuration {
    admin_registration_form_id = data.fusionauth_form.default_admin_registration.id
    self_service_form_id = "f8f406ba-8810-47c8-a984-3ab4a43eaf59"
  }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant