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

Support Changing Execution Requirement from DISABLED to REQUIRED for Built-in Flows #1078

Open
netalkGB opened this issue Jan 20, 2025 · 0 comments

Comments

@netalkGB
Copy link

Description

I would like to request support for modifying the execution requirement of built-in flows, specifically changing the setting from DISABLED to REQUIRED. This is something that can already be done through the UI, but there is currently no straightforward way to achieve this with Terraform.

I attempted to modify the requirement of an execution in a built-in flow, but encountered the following issues:

  1. Instead of changing the execution's requirement, it tries to add a new execution to the built-in flow, resulting in an error. (when not using the import block)
  2. Even when attempting to use an import block, it is not possible to retrieve the execution ID because the execution is automatically created when the realm is created, and the ID is unknown.
    Here is the configuration I tried:
import {
  id = "realm1/registration form/${var.executionId}" # ${var.executionId} cannot be imported as it is generated during realm creation
  to = keycloak_authentication_execution.registration_form_flow_execution
}
resource "keycloak_authentication_execution" "registration_form_flow_execution" {
  realm_id          = keycloak_realm.realm.id
  parent_flow_alias = "registration form"
  authenticator     = "registration-terms-and-conditions"
  requirement       = "REQUIRED"
  depends_on        = [keycloak_realm.realm]
}

Discussion

No response

Motivation

I would like to request support for modifying the execution requirement of built-in flows, specifically changing the setting from DISABLED to REQUIRED. Since this is a setting that can be modified through the GUI, it should also be possible to achieve this with Terraform.
In environments where deployments have already occurred, the execution requirements of built-in flows may have been modified through the GUI. In such cases, creating new flows with Terraform would introduce unnecessary differences, which we want to avoid.

Image

Details

No response

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