-
Notifications
You must be signed in to change notification settings - Fork 89
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add support for Form, Flow and Flow Vault Connection (#1039)
* form resource * flow resource * flow resource, data source added * update forms * update flow * update go-auth0 v1.11.0 * added flow vault connection * Added flow expand/flatten + tests + recordings * update flow vault connection * form, flow vault connection added unit test, recordings * form, flow vault connection doc update * form, flow vault connection examples added * form, flow vault connection examples added example, data source * form, flow vault connection examples docs updated * lint fix * form, flow unit test added * form flatten unit test added * lint * Updated recordings --------- Co-authored-by: kushalshit27 <[email protected]>
- Loading branch information
1 parent
46fe82e
commit fdbe8b4
Showing
39 changed files
with
4,424 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
page_title: "Data Source: auth0_flow" | ||
description: |- | ||
Data source to retrieve a specific Auth0 Flow by id | ||
--- | ||
|
||
# Data Source: auth0_flow | ||
|
||
Data source to retrieve a specific Auth0 Flow by `id` | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# An Auth0 flow loaded using its ID. | ||
data "auth0_flow" "my_flow_data" { | ||
id = "af_5CTYdsXHLoLXD7ZVwvFHew" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The id of the Flow. | ||
|
||
### Read-Only | ||
|
||
- `actions` (String) Actions of the flow. | ||
- `name` (String) Name of the flow. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
page_title: "Data Source: auth0_flow_vault_connection" | ||
description: |- | ||
Data source to retrieve a specific Auth0 Flow Vault Connection by id | ||
--- | ||
|
||
# Data Source: auth0_flow_vault_connection | ||
|
||
Data source to retrieve a specific Auth0 Flow Vault Connection by `id` | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# An Auth0 flow vault connection loaded using its ID. | ||
data "auth0_flow_vault_connection" "data_connection" { | ||
id = "ac_9m2uqjHsqs19riN9N6sZQ7" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The id of the Flow Vault Connection. | ||
|
||
### Read-Only | ||
|
||
- `account_name` (String) Custom account name of the vault connection. | ||
- `app_id` (String) App identifier of the vault connection. | ||
- `environment` (String) Environment of the vault connection. | ||
- `fingerprint` (String) Fingerprint of the vault connection. | ||
- `name` (String) Name of the vault connection. | ||
- `ready` (Boolean) Indicates if the vault connection is configured. | ||
- `setup` (Map of String) Configuration of the vault connection. (Mapping information must be provided as key/value pairs) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
--- | ||
page_title: "Data Source: auth0_form" | ||
description: |- | ||
Data source to retrieve a specific Auth0 Form by id | ||
--- | ||
|
||
# Data Source: auth0_form | ||
|
||
Data source to retrieve a specific Auth0 Form by `id` | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# An Auth0 form loaded using its ID. | ||
data "auth0_flow" "my_form_data" { | ||
id = "ap_31LxRJphZF1Kqzf2zBgmgA" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `id` (String) The id of the Form. | ||
|
||
### Read-Only | ||
|
||
- `ending` (String) Submission configuration of the form. (JSON encoded) | ||
- `languages` (List of Object) Language specific configuration for the form. (see [below for nested schema](#nestedatt--languages)) | ||
- `messages` (List of Object) Message specific configuration for the form. (see [below for nested schema](#nestedatt--messages)) | ||
- `name` (String) Name of the form. | ||
- `nodes` (String) Nodes of the form. (JSON encoded) | ||
- `start` (String) Input setup of the form. (JSON encoded) | ||
- `style` (String) Style specific configuration for the form. (JSON encoded) | ||
- `translations` (String) Translations of the form. (JSON encoded) | ||
|
||
<a id="nestedatt--languages"></a> | ||
### Nested Schema for `languages` | ||
|
||
Read-Only: | ||
|
||
- `default` (String) | ||
- `primary` (String) | ||
|
||
|
||
<a id="nestedatt--messages"></a> | ||
### Nested Schema for `messages` | ||
|
||
Read-Only: | ||
|
||
- `custom` (String) | ||
- `errors` (String) | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
--- | ||
page_title: "Resource: auth0_flow" | ||
description: |- | ||
With this resource, you can create and manage Flows for a tenant. | ||
--- | ||
|
||
# Resource: auth0_flow | ||
|
||
With this resource, you can create and manage Flows for a tenant. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Example: | ||
resource "auth0_flow" "my_flow" { | ||
actions = jsonencode([{ | ||
action = "UPDATE_USER" | ||
alias = "user meta data" | ||
allow_failure = false | ||
id = "update_user_PmSa" | ||
mask_output = false | ||
params = { | ||
changes = { | ||
user_metadata = { | ||
full_name = "{{fields.full_name}}" | ||
} | ||
} | ||
connection_id = "<vault_connection_id>" # Altenative ways: (connection_id = auth0_flow_vault_connection.my_connection.id) or using terraform variables | ||
user_id = "{{context.user.user_id}}" | ||
} | ||
type = "AUTH0" | ||
}]) | ||
name = "Flow KYC update data" | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Name of the flow. | ||
|
||
### Optional | ||
|
||
- `actions` (String) Actions of the flow. | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# This resource can be imported using the flow ID. | ||
# | ||
# Example: | ||
terraform import auth0_form.my_flow "af_4JwsAjokf6DpK8xJCkTRjK" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
--- | ||
page_title: "Resource: auth0_flow_vault_connection" | ||
description: |- | ||
With this resource, you can create and manage flow vault connections for a tenant. | ||
--- | ||
|
||
# Resource: auth0_flow_vault_connection | ||
|
||
With this resource, you can create and manage flow vault connections for a tenant. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Example: | ||
resource "auth0_flow_vault_connection" "my_connection" { | ||
app_id = "AUTH0" | ||
name = "Auth0 M2M Connection" | ||
setup = { | ||
client_id = "******************" | ||
client_secret = "*********************************" | ||
domain = "*****************************" | ||
type = "OAUTH_APP" | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `app_id` (String) App identifier of the vault connection. | ||
- `name` (String) Name of the vault connection. | ||
|
||
### Optional | ||
|
||
- `account_name` (String) Custom account name of the vault connection. | ||
- `environment` (String) Environment of the vault connection. | ||
- `fingerprint` (String) Fingerprint of the vault connection. | ||
- `ready` (Boolean) Indicates if the vault connection is configured. | ||
- `setup` (Map of String, Sensitive) Configuration of the vault connection. (Mapping information must be provided as key/value pairs) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# This resource can be imported using the flow vault connection ID. | ||
# | ||
# Example: | ||
terraform import auth0_flow_vault_connection.my_connection "ac_42HT5oiobDyUs8ASwEEWK0" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
--- | ||
page_title: "Resource: auth0_form" | ||
description: |- | ||
With this resource, you can create and manage Forms for a tenant. | ||
--- | ||
|
||
# Resource: auth0_form | ||
|
||
With this resource, you can create and manage Forms for a tenant. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
# Example: | ||
resource "auth0_form" "my_form" { | ||
name = "My KYC Form" | ||
start = jsonencode({ | ||
coordinates = { | ||
x = 0 | ||
y = 0 | ||
} | ||
next_node = "step_ggeX" | ||
}) | ||
nodes = jsonencode([{ | ||
alias = "New step" | ||
config = { | ||
components = [{ | ||
category = "FIELD" | ||
config = { | ||
max_length = 50 | ||
min_length = 1 | ||
multiline = false | ||
} | ||
id = "full_name" | ||
label = "Your Name" | ||
required = true | ||
sensitive = false | ||
type = "TEXT" | ||
}, { | ||
category = "BLOCK" | ||
config = { | ||
text = "Continue" | ||
} | ||
id = "next_button_3FbA" | ||
type = "NEXT_BUTTON" | ||
}] | ||
next_node = "$ending" | ||
} | ||
coordinates = { | ||
x = 500 | ||
y = 0 | ||
} | ||
id = "step_ggeX" | ||
type = "STEP" | ||
}]) | ||
ending = jsonencode({ | ||
after_submit = { | ||
flow_id = "<my_flow_id>" # Altenative ways: (flow_id = auth0_flow.my_flow.id) or using terraform variables | ||
} | ||
coordinates = { | ||
x = 1250 | ||
y = 0 | ||
} | ||
resume_flow = true | ||
}) | ||
style = jsonencode({ | ||
css = "h1 {\n color: white;\n text-align: center;\n}" | ||
}) | ||
translations = jsonencode({ | ||
es = { | ||
components = { | ||
rich_text_uctu = { | ||
config = { | ||
content = "<h2>Help us verify your personal information</h2><p>We want to learn more about you so that we can validate and protect your account...</p>" | ||
} | ||
} | ||
} | ||
messages = { | ||
custom = {} | ||
errors = { | ||
ERR_ACCEPTANCE_REQUIRED = "Por favor, marca este campo para continuar." | ||
} | ||
} | ||
} | ||
}) | ||
languages { | ||
default = "en" | ||
primary = "en" | ||
} | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `name` (String) Name of the form. | ||
|
||
### Optional | ||
|
||
- `ending` (String) Submission configuration of the form. (JSON encoded) | ||
- `languages` (Block List) Language specific configuration for the form. (see [below for nested schema](#nestedblock--languages)) | ||
- `messages` (Block List) Message specific configuration for the form. (see [below for nested schema](#nestedblock--messages)) | ||
- `nodes` (String) Nodes of the form. (JSON encoded) | ||
- `start` (String) Input setup of the form. (JSON encoded) | ||
- `style` (String) Style specific configuration for the form. (JSON encoded) | ||
- `translations` (String) Translations of the form. (JSON encoded) | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
|
||
<a id="nestedblock--languages"></a> | ||
### Nested Schema for `languages` | ||
|
||
Optional: | ||
|
||
- `default` (String) Default language for the form. | ||
- `primary` (String) Primary language for the form. | ||
|
||
|
||
<a id="nestedblock--messages"></a> | ||
### Nested Schema for `messages` | ||
|
||
Optional: | ||
|
||
- `custom` (String) Custom message for the form. (JSON encoded) | ||
- `errors` (String) Error message for the form. (JSON encoded) | ||
|
||
## Import | ||
|
||
Import is supported using the following syntax: | ||
|
||
```shell | ||
# This resource can be imported using the form ID. | ||
# | ||
# Example: | ||
terraform import auth0_form.my_form "ap_ojkKbiPMG6J5E5VCKdeCzK" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# An Auth0 flow loaded using its ID. | ||
data "auth0_flow" "my_flow_data" { | ||
id = "af_5CTYdsXHLoLXD7ZVwvFHew" | ||
} |
Oops, something went wrong.