-
-
Notifications
You must be signed in to change notification settings - Fork 20
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
prompt Fields no reachable #243
Comments
@DrummyFloyd if you open the network tab of your browser, when you edit a prompt stage you'll see a request to I'd love to have the data source too! |
Until this issue is closed you can recreate the fields you need with something like: resource "authentik_stage_prompt" "user_data" {
name = "enrollment-user-data-prompt"
fields = [
authentik_stage_prompt_field.username.id,
authentik_stage_prompt_field.name.id,
authentik_stage_prompt_field.email.id,
authentik_stage_prompt_field.password.id,
authentik_stage_prompt_field.password_repeat.id,
]
}
resource "authentik_stage_prompt_field" "username" {
field_key = "username"
label = "Username"
type = "text"
order = 200
placeholder = <<EOT
try:
return user.username
except:
return ''
EOT
placeholder_expression = true
required = true
# Until https://github.com/goauthentik/terraform-provider-authentik/issues/298 is fixed
lifecycle {
ignore_changes = [
placeholder,
]
}
}
resource "authentik_stage_prompt_field" "name" {
field_key = "name"
label = "Name"
type = "text"
order = 201
placeholder = <<EOT
try:
return user.name
except:
return ''
EOT
placeholder_expression = true
required = true
# Until https://github.com/goauthentik/terraform-provider-authentik/issues/298 is fixed
lifecycle {
ignore_changes = [
placeholder,
]
}
}
resource "authentik_stage_prompt_field" "email" {
field_key = "email"
label = "Email"
type = "email"
order = 202
placeholder = <<EOT
try:
return user.email
except:
return ''
EOT
placeholder_expression = true
required = true
# Until https://github.com/goauthentik/terraform-provider-authentik/issues/298 is fixed
lifecycle {
ignore_changes = [
placeholder,
]
}
}
resource "authentik_stage_prompt_field" "password" {
field_key = "password"
label = "Password"
type = "password"
order = 300
placeholder = "Password"
placeholder_expression = false
required = true
}
resource "authentik_stage_prompt_field" "password_repeat" {
field_key = "password_repeat"
label = "Password (repeat)"
type = "password"
order = 301
placeholder = "Password (repeat)"
placeholder_expression = false
required = true
} |
thank you for your help , 'ive managed to do something similar ^^ will try to contribute asap |
Hi ,
would be great to have a
data "authentik_prompt_fields"
at i don't know how to get
UUID
of existingprompt field
another suggestion would be great to modify existing stage with terraform, instead of creating quasi same stage , with only one difference.
john
The text was updated successfully, but these errors were encountered: