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

terraform support for forms #1039

Draft
wants to merge 18 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 32 additions & 0 deletions docs/data-sources/flow.md
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.


37 changes: 37 additions & 0 deletions docs/data-sources/flow_vault_connection.md
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)


55 changes: 55 additions & 0 deletions docs/data-sources/form.md
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)


61 changes: 61 additions & 0 deletions docs/resources/flow.md
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"
```
56 changes: 56 additions & 0 deletions docs/resources/flow_vault_connection.md
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"
```
144 changes: 144 additions & 0 deletions docs/resources/form.md
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"
```
4 changes: 4 additions & 0 deletions examples/data-sources/auth0_flow/data-source.tf
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"
}
Loading
Loading