diff --git a/.speakeasy/gen.lock b/.speakeasy/gen.lock
index 1340402..f91e788 100755
--- a/.speakeasy/gen.lock
+++ b/.speakeasy/gen.lock
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 5a857039-7f4b-42d5-86fd-449767242ed2
management:
- docChecksum: 49e71e8528a2034de903094a70555fe5
+ docChecksum: 8ae07697a4f59d026a44a7d6b287f46b
docVersion: 1.0.0
speakeasyVersion: 1.303.4
generationVersion: 2.340.2
- releaseVersion: 0.8.3
- configChecksum: e7d1645bf627310ec7c8eeead96e97ea
+ releaseVersion: 0.8.4
+ configChecksum: 03142a0481bf8be5abbdacf2803b0832
repoURL: https://github.com/epilot-dev/terraform-provider-epilot-workflow.git
repoSubDirectory: .
published: true
diff --git a/README.md b/README.md
index 250ddb1..7104fe4 100644
--- a/README.md
+++ b/README.md
@@ -61,7 +61,7 @@ terraform {
required_providers {
epilot-workflow = {
source = "epilot-dev/epilot-workflow"
- version = "0.8.3"
+ version = "0.8.4"
}
}
}
diff --git a/docs/data-sources/workflow_definition.md b/docs/data-sources/workflow_definition.md
new file mode 100644
index 0000000..b365328
--- /dev/null
+++ b/docs/data-sources/workflow_definition.md
@@ -0,0 +1,323 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "epilot-workflow_workflow_definition Data Source - terraform-provider-epilot-workflow"
+subcategory: ""
+description: |-
+ WorkflowDefinition DataSource
+---
+
+# epilot-workflow_workflow_definition (Data Source)
+
+WorkflowDefinition DataSource
+
+## Example Usage
+
+```terraform
+data "epilot-workflow_workflow_definition" "my_workflowdefinition" {
+ id = "7hj28a"
+}
+```
+
+
+## Schema
+
+### Required
+
+- `id` (String) Short uuid (length 8) to identify the Workflow Definition.
+
+### Read-Only
+
+- `assigned_to` (List of String)
+- `closing_reasons` (Attributes List) (see [below for nested schema](#nestedatt--closing_reasons))
+- `creation_time` (String) ISO String Date & Time
+- `description` (String)
+- `due_date` (String)
+- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--dynamic_due_date))
+- `enable_ecp_workflow` (Boolean) Indicates whether this workflow is available for End Customer Portal or not. By default it's not.
+- `flow` (Attributes List) (see [below for nested schema](#nestedatt--flow))
+- `last_update_time` (String) ISO String Date & Time
+- `name` (String)
+- `update_entity_attributes` (Attributes List) (see [below for nested schema](#nestedatt--update_entity_attributes))
+- `user_ids` (List of Number) This field is deprecated. Please use assignedTo
+
+
+### Nested Schema for `closing_reasons`
+
+Read-Only:
+
+- `id` (String)
+
+
+
+### Nested Schema for `dynamic_due_date`
+
+Read-Only:
+
+- `action_type_condition` (String) must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
+- `number_of_units` (Number)
+- `step_id` (String)
+- `time_period` (String) must be one of ["days", "weeks", "months"]
+
+
+
+### Nested Schema for `flow`
+
+Read-Only:
+
+- `section` (Attributes) A group of Steps that define the progress of the Workflow (see [below for nested schema](#nestedatt--flow--section))
+- `step` (Attributes) Action that needs to be done in a Workflow (see [below for nested schema](#nestedatt--flow--step))
+
+
+### Nested Schema for `flow.section`
+
+Read-Only:
+
+- `id` (String)
+- `name` (String)
+- `order` (Number)
+- `steps` (Attributes List) (see [below for nested schema](#nestedatt--flow--section--steps))
+- `type` (String) must be one of ["STEP", "SECTION"]
+
+
+### Nested Schema for `flow.section.steps`
+
+Read-Only:
+
+- `assigned_to` (List of String)
+- `automation_config` (Attributes) (see [below for nested schema](#nestedatt--flow--section--steps--automation_config))
+- `description` (Attributes) Longer information regarding Task (see [below for nested schema](#nestedatt--flow--section--steps--description))
+- `due_date` (String)
+- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--flow--section--steps--dynamic_due_date))
+- `ecp` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--section--steps--ecp))
+- `execution_type` (String) must be one of ["MANUAL", "AUTOMATION"]
+- `id` (String)
+- `installer` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--section--steps--installer))
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--section--steps--journey))
+- `name` (String)
+- `order` (Number)
+- `requirements` (Attributes List) requirements that need to be fulfilled in order to enable the step execution (see [below for nested schema](#nestedatt--flow--section--steps--requirements))
+- `type` (String) must be one of ["STEP", "SECTION"]
+- `user_ids` (List of Number) This field is deprecated. Please use assignedTo
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Read-Only:
+
+- `flow_id` (String) Id of the configured automation to run
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Read-Only:
+
+- `enabled` (Boolean)
+- `value` (String)
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Read-Only:
+
+- `action_type_condition` (String) must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
+- `number_of_units` (Number)
+- `step_id` (String)
+- `time_period` (String) must be one of ["days", "weeks", "months"]
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Read-Only:
+
+- `description` (String)
+- `enabled` (Boolean)
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--section--steps--user_ids--journey))
+- `label` (String)
+
+
+### Nested Schema for `flow.section.steps.user_ids.journey`
+
+Read-Only:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Read-Only:
+
+- `description` (String)
+- `enabled` (Boolean)
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--section--steps--user_ids--journey))
+- `label` (String)
+
+
+### Nested Schema for `flow.section.steps.user_ids.journey`
+
+Read-Only:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Read-Only:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Read-Only:
+
+- `condition` (String) must be one of ["CLOSED"]
+- `definition_id` (String)
+- `type` (String) must be one of ["STEP", "SECTION"]
+
+
+
+
+
+### Nested Schema for `flow.step`
+
+Read-Only:
+
+- `assigned_to` (List of String)
+- `automation_config` (Attributes) (see [below for nested schema](#nestedatt--flow--step--automation_config))
+- `description` (Attributes) Longer information regarding Task (see [below for nested schema](#nestedatt--flow--step--description))
+- `due_date` (String)
+- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--flow--step--dynamic_due_date))
+- `ecp` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--step--ecp))
+- `execution_type` (String) must be one of ["MANUAL", "AUTOMATION"]
+- `id` (String)
+- `installer` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--step--installer))
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--step--journey))
+- `name` (String)
+- `order` (Number)
+- `requirements` (Attributes List) requirements that need to be fulfilled in order to enable the step execution (see [below for nested schema](#nestedatt--flow--step--requirements))
+- `type` (String) must be one of ["STEP", "SECTION"]
+- `user_ids` (List of Number) This field is deprecated. Please use assignedTo
+
+
+### Nested Schema for `flow.step.automation_config`
+
+Read-Only:
+
+- `flow_id` (String) Id of the configured automation to run
+
+
+
+### Nested Schema for `flow.step.description`
+
+Read-Only:
+
+- `enabled` (Boolean)
+- `value` (String)
+
+
+
+### Nested Schema for `flow.step.dynamic_due_date`
+
+Read-Only:
+
+- `action_type_condition` (String) must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
+- `number_of_units` (Number)
+- `step_id` (String)
+- `time_period` (String) must be one of ["days", "weeks", "months"]
+
+
+
+### Nested Schema for `flow.step.ecp`
+
+Read-Only:
+
+- `description` (String)
+- `enabled` (Boolean)
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--step--ecp--journey))
+- `label` (String)
+
+
+### Nested Schema for `flow.step.ecp.label`
+
+Read-Only:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+
+### Nested Schema for `flow.step.installer`
+
+Read-Only:
+
+- `description` (String)
+- `enabled` (Boolean)
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--step--installer--journey))
+- `label` (String)
+
+
+### Nested Schema for `flow.step.installer.label`
+
+Read-Only:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+
+### Nested Schema for `flow.step.journey`
+
+Read-Only:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+### Nested Schema for `flow.step.requirements`
+
+Read-Only:
+
+- `condition` (String) must be one of ["CLOSED"]
+- `definition_id` (String)
+- `type` (String) must be one of ["STEP", "SECTION"]
+
+
+
+
+
+### Nested Schema for `update_entity_attributes`
+
+Read-Only:
+
+- `source` (String) must be one of ["workflow_status", "current_section", "current_step"]
+- `target` (Attributes) (see [below for nested schema](#nestedatt--update_entity_attributes--target))
+
+
+### Nested Schema for `update_entity_attributes.target`
+
+Read-Only:
+
+- `entity_attribute` (String)
+- `entity_schema` (String)
+
+
diff --git a/docs/index.md b/docs/index.md
index 2e53d2d..5d83101 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -17,7 +17,7 @@ terraform {
required_providers {
epilot-workflow = {
source = "epilot-dev/epilot-workflow"
- version = "0.8.2"
+ version = "0.8.3"
}
}
}
diff --git a/docs/resources/workflow_definition.md b/docs/resources/workflow_definition.md
new file mode 100644
index 0000000..512169e
--- /dev/null
+++ b/docs/resources/workflow_definition.md
@@ -0,0 +1,755 @@
+---
+# generated by https://github.com/hashicorp/terraform-plugin-docs
+page_title: "epilot-workflow_workflow_definition Resource - terraform-provider-epilot-workflow"
+subcategory: ""
+description: |-
+ WorkflowDefinition Resource
+---
+
+# epilot-workflow_workflow_definition (Resource)
+
+WorkflowDefinition Resource
+
+## Example Usage
+
+```terraform
+# Provider definitions
+terraform {
+ required_providers {
+ epilot-workflow = {
+ source = "epilot-dev/epilot-workflow"
+ version = "0.2.2"
+ }
+ }
+}
+
+variable epilot_auth {
+ type = string
+}
+
+
+
+provider "epilot-workflow" {
+ bearer_auth = var.epilot_auth
+}
+
+
+# resource "epilot-workflow_workflow_definition" "my_workflowdefinition" {
+# description = "...my_description..."
+# due_date = "2021-04-27T12:00:00.000Z"
+# enable_ecp_workflow = false
+# flow = [
+# {
+# section = {
+# id = "2a31ed4e-b201-4187-9740-15a348b64814"
+# name = "Meredith Bruen"
+# order = 1.95
+# steps = [
+# {
+# assigned_to = [
+# "...",
+# ]
+# automation_config = {
+# flow_id = "...my_flow_id..."
+# }
+# description = {
+# enabled = true
+# value = "...my_value..."
+# }
+# due_date = "2021-04-27T12:00:00.000Z"
+# dynamic_due_date = {
+# action_type_condition = "STEP_CLOSED"
+# number_of_units = 73.8
+# step_id = "...my_step_id..."
+# time_period = "weeks"
+# }
+# ecp = {
+# description = "...my_description..."
+# enabled = false
+# journey = {
+# id = "64361b27-76d7-498c-b5f3-e120ea0dc9e1"
+# journey_id = "...my_journey_id..."
+# name = "Lorraine Witting"
+# }
+# label = "...my_label..."
+# }
+# execution_type = "AUTOMATION"
+# id = "3f96aa0e-3408-45f7-9b11-76521d792fea"
+# installer = {
+# description = "...my_description..."
+# enabled = true
+# journey = {
+# id = "830af35a-c0f0-4516-986c-6d56674fb26d"
+# journey_id = "...my_journey_id..."
+# name = "Paulette O'Hara"
+# }
+# label = "...my_label..."
+# }
+# journey = {
+# id = "9b2b84e8-8293-4d18-a93f-16fc9936c940"
+# journey_id = "...my_journey_id..."
+# name = "Dr. Joel Hermann"
+# }
+# name = "Lorene Denesik"
+# order = 4.83
+# requirements = [
+# {
+# condition = "CLOSED"
+# definition_id = "...my_definition_id..."
+# type = "STEP"
+# },
+# ]
+# type = "SECTION"
+# user_ids = [
+# 9.27,
+# ]
+# },
+# ]
+# type = "STEP"
+# }
+# },
+# ]
+# name = "Nishu workflowing"
+# }
+
+resource "epilot-workflow_workflow_definition" "new_workflow_definition" {
+ assigned_to = [
+ "56201",
+ ]
+ closing_reasons = [
+ {
+ id = "J-9JNspGlmqHadNMfJCkj"
+ },
+ {
+ id = "vH2hoSZwV9odnm6mHRpsf"
+ },
+ ]
+ description = "Fitsch test - blueprints"
+ enable_ecp_workflow = true
+ flow = [
+ {
+ step = {
+ assigned_to = []
+ automation_config = {
+ flow_id = "58c35c04-9663-492f-872f-196552197bcf"
+ }
+ ecp = {
+ enabled = true
+ label = "2.Schritt"
+ }
+ execution_type = "AUTOMATION"
+ id = "ulcZkL"
+ installer = {
+ enabled = true
+ label = "Installer label"
+ }
+ name = "test assignee variablen"
+ order = 1
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ }
+ },
+ {
+ step = {
+ assigned_to = [
+ "101408",
+ ]
+ ecp = {
+ description = "33"
+ enabled = true
+ label = "3.Schritt"
+ }
+ id = "vZJNxC"
+ installer = {
+ description = "abc"
+ enabled = true
+ label = "aaa"
+ }
+ name = "4. Aufgabe"
+ order = 2
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ }
+ },
+ {
+ section = {
+ id = "P9p_N8"
+ name = "5. Aufgabe"
+ order = 3
+ steps = [
+ {
+ assigned_to = []
+ automation_config = {
+ flow_id = "b282a5e4-40c6-487f-a85d-8053d194027d"
+ }
+ ecp = {
+ enabled = true
+ label = "4.Schritt"
+ }
+ execution_type = "AUTOMATION"
+ id = "-Rjb7y"
+ name = "Demo test 20"
+ order = 4
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ ]
+ type = "SECTION"
+ }
+ },
+ {
+ section = {
+ id = "J0fYIk"
+ name = "2 Aufgabe"
+ order = 5
+ steps = [
+ {
+ assigned_to = []
+ ecp = {
+ enabled = true
+ label = "1.Schritt"
+ }
+ id = "qA1wAj"
+ name = "2.2"
+ order = 6
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ ]
+ type = "SECTION"
+ }
+ },
+ {
+ section = {
+ id = "wdMc2C"
+ name = "6. Aufgabe"
+ order = 7
+ steps = [
+ {
+ assigned_to = []
+ ecp = {
+ enabled = true
+ label = "5.Schritt"
+ }
+ id = "_VzDmC"
+ name = "6.1"
+ order = 8
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ {
+ assigned_to = []
+ automation_config = {
+ flow_id = "e0cf0f34-ebd3-44af-896d-cee9dcf89986"
+ }
+ ecp = {}
+ execution_type = "AUTOMATION"
+ id = "ysfBl6Jx"
+ name = "ABC neuer NAME"
+ order = 9
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ ]
+ type = "SECTION"
+ }
+ },
+ {
+ section = {
+ id = "Kr0VHGpp"
+ name = "test"
+ order = 10
+ steps = [
+ {
+ assigned_to = []
+ automation_config = {
+ flow_id = "986befe7-42ae-4cf4-9db5-5d380c8b7e0b"
+ }
+ ecp = {}
+ execution_type = "AUTOMATION"
+ id = "PghwjBKl"
+ name = "Stadt7 Test"
+ order = 11
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ ]
+ type = "SECTION"
+ }
+ },
+ {
+ section = {
+ id = "w2sA7xeY"
+ name = "test2"
+ order = 12
+ steps = [
+ {
+ assigned_to = []
+ ecp = {}
+ id = "nQ1Nmmj0"
+ name = "test2"
+ order = 13
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ ]
+ type = "SECTION"
+ }
+ },
+ {
+ section = {
+ id = "2DZ5ypub"
+ name = "test3"
+ order = 14
+ steps = [
+ {
+ assigned_to = []
+ ecp = {}
+ id = "NQeLA5GC"
+ name = "test3"
+ order = 15
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ ]
+ type = "SECTION"
+ }
+ },
+ {
+ section = {
+ id = "v0d41u98"
+ name = "Gestern noch Schritt, heute schon Phase"
+ order = 16
+ steps = [
+ {
+ assigned_to = []
+ ecp = {}
+ id = "PqxLvCrb"
+ name = "phasenfroh"
+ order = 17
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ {
+ assigned_to = []
+ ecp = {}
+ id = "XZp0_yfi"
+ name = "Phas ohne Boden"
+ order = 18
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ ]
+ type = "SECTION"
+ }
+ },
+ {
+ step = {
+ assigned_to = []
+ ecp = {
+ enabled = true
+ label = "Tes 1"
+ }
+ id = "yKAubPJy"
+ name = "Unabhängiger Schritt"
+ order = 19
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ }
+ },
+ {
+ section = {
+ id = "J7cZEGEo"
+ name = "Gleich ne ganze Phase"
+ order = 20
+ steps = [
+ {
+ assigned_to = []
+ ecp = {}
+ id = "KcM5SesM"
+ name = "Teil 1 der Phase"
+ order = 21
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ {
+ assigned_to = []
+ ecp = {}
+ id = "Smu-9fTo"
+ name = "Teil 2 der Phase"
+ order = 22
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ {
+ assigned_to = []
+ ecp = {}
+ id = "PV4mCyCY"
+ name = "Teil 3 der Phase"
+ order = 23
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ {
+ assigned_to = []
+ ecp = {}
+ id = "xbODvcLf"
+ name = "4. Teil der Phase"
+ order = 24
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ {
+ assigned_to = []
+ ecp = {}
+ id = "M0TGW_yc"
+ name = "Phase Nummer 5"
+ order = 25
+ requirements = []
+ type = "STEP"
+ user_ids = []
+ },
+ ]
+ type = "SECTION"
+ }
+ },
+ ]
+ name = "Nishu test"
+ update_entity_attributes = [
+ {
+ source = "current_section"
+ target = {
+ entity_attribute = "mein_individueller_status"
+ entity_schema = "opportunity"
+ }
+ },
+ ]
+ user_ids = []
+}
+```
+
+
+## Schema
+
+### Required
+
+- `flow` (Attributes List) (see [below for nested schema](#nestedatt--flow))
+- `name` (String)
+
+### Optional
+
+- `assigned_to` (List of String)
+- `closing_reasons` (Attributes List) (see [below for nested schema](#nestedatt--closing_reasons))
+- `creation_time` (String) ISO String Date & Time
+- `description` (String)
+- `due_date` (String)
+- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--dynamic_due_date))
+- `enable_ecp_workflow` (Boolean) Indicates whether this workflow is available for End Customer Portal or not. By default it's not.
+- `id` (String) Id of the definition to de deleted.
+- `last_update_time` (String) ISO String Date & Time
+- `update_entity_attributes` (Attributes List) (see [below for nested schema](#nestedatt--update_entity_attributes))
+- `user_ids` (List of Number) This field is deprecated. Please use assignedTo
+
+
+### Nested Schema for `flow`
+
+Optional:
+
+- `section` (Attributes) A group of Steps that define the progress of the Workflow (see [below for nested schema](#nestedatt--flow--section))
+- `step` (Attributes) Action that needs to be done in a Workflow (see [below for nested schema](#nestedatt--flow--step))
+
+
+### Nested Schema for `flow.section`
+
+Optional:
+
+- `id` (String)
+- `name` (String) Not Null
+- `order` (Number) Not Null
+- `steps` (Attributes List) Not Null (see [below for nested schema](#nestedatt--flow--section--steps))
+- `type` (String) Not Null; must be one of ["STEP", "SECTION"]
+
+
+### Nested Schema for `flow.section.steps`
+
+Optional:
+
+- `assigned_to` (List of String)
+- `automation_config` (Attributes) (see [below for nested schema](#nestedatt--flow--section--steps--automation_config))
+- `description` (Attributes) Longer information regarding Task (see [below for nested schema](#nestedatt--flow--section--steps--description))
+- `due_date` (String)
+- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--flow--section--steps--dynamic_due_date))
+- `ecp` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--section--steps--ecp))
+- `execution_type` (String) must be one of ["MANUAL", "AUTOMATION"]
+- `id` (String)
+- `installer` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--section--steps--installer))
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--section--steps--journey))
+- `name` (String) Not Null
+- `order` (Number) Not Null
+- `requirements` (Attributes List) requirements that need to be fulfilled in order to enable the step execution (see [below for nested schema](#nestedatt--flow--section--steps--requirements))
+- `type` (String) Not Null; must be one of ["STEP", "SECTION"]
+- `user_ids` (List of Number) This field is deprecated. Please use assignedTo
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Optional:
+
+- `flow_id` (String) Id of the configured automation to run. Not Null
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Optional:
+
+- `enabled` (Boolean)
+- `value` (String)
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Optional:
+
+- `action_type_condition` (String) Not Null; must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
+- `number_of_units` (Number) Not Null
+- `step_id` (String)
+- `time_period` (String) Not Null; must be one of ["days", "weeks", "months"]
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Optional:
+
+- `description` (String)
+- `enabled` (Boolean)
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--section--steps--user_ids--journey))
+- `label` (String)
+
+
+### Nested Schema for `flow.section.steps.user_ids.journey`
+
+Optional:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Optional:
+
+- `description` (String)
+- `enabled` (Boolean)
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--section--steps--user_ids--journey))
+- `label` (String)
+
+
+### Nested Schema for `flow.section.steps.user_ids.journey`
+
+Optional:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Optional:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+### Nested Schema for `flow.section.steps.user_ids`
+
+Optional:
+
+- `condition` (String) Not Null; must be one of ["CLOSED"]
+- `definition_id` (String) Not Null
+- `type` (String) Not Null; must be one of ["STEP", "SECTION"]
+
+
+
+
+
+### Nested Schema for `flow.step`
+
+Optional:
+
+- `assigned_to` (List of String)
+- `automation_config` (Attributes) (see [below for nested schema](#nestedatt--flow--step--automation_config))
+- `description` (Attributes) Longer information regarding Task (see [below for nested schema](#nestedatt--flow--step--description))
+- `due_date` (String)
+- `dynamic_due_date` (Attributes) set a Duedate for a step then a specific (see [below for nested schema](#nestedatt--flow--step--dynamic_due_date))
+- `ecp` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--step--ecp))
+- `execution_type` (String) must be one of ["MANUAL", "AUTOMATION"]
+- `id` (String)
+- `installer` (Attributes) Details regarding ECP for the workflow step (see [below for nested schema](#nestedatt--flow--step--installer))
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--step--journey))
+- `name` (String) Not Null
+- `order` (Number) Not Null
+- `requirements` (Attributes List) requirements that need to be fulfilled in order to enable the step execution (see [below for nested schema](#nestedatt--flow--step--requirements))
+- `type` (String) Not Null; must be one of ["STEP", "SECTION"]
+- `user_ids` (List of Number) This field is deprecated. Please use assignedTo
+
+
+### Nested Schema for `flow.step.automation_config`
+
+Optional:
+
+- `flow_id` (String) Id of the configured automation to run. Not Null
+
+
+
+### Nested Schema for `flow.step.description`
+
+Optional:
+
+- `enabled` (Boolean)
+- `value` (String)
+
+
+
+### Nested Schema for `flow.step.dynamic_due_date`
+
+Optional:
+
+- `action_type_condition` (String) Not Null; must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
+- `number_of_units` (Number) Not Null
+- `step_id` (String)
+- `time_period` (String) Not Null; must be one of ["days", "weeks", "months"]
+
+
+
+### Nested Schema for `flow.step.ecp`
+
+Optional:
+
+- `description` (String)
+- `enabled` (Boolean)
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--step--ecp--journey))
+- `label` (String)
+
+
+### Nested Schema for `flow.step.ecp.label`
+
+Optional:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+
+### Nested Schema for `flow.step.installer`
+
+Optional:
+
+- `description` (String)
+- `enabled` (Boolean)
+- `journey` (Attributes) (see [below for nested schema](#nestedatt--flow--step--installer--journey))
+- `label` (String)
+
+
+### Nested Schema for `flow.step.installer.label`
+
+Optional:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+
+### Nested Schema for `flow.step.journey`
+
+Optional:
+
+- `id` (String)
+- `journey_id` (String)
+- `name` (String)
+
+
+
+### Nested Schema for `flow.step.requirements`
+
+Optional:
+
+- `condition` (String) Not Null; must be one of ["CLOSED"]
+- `definition_id` (String) Not Null
+- `type` (String) Not Null; must be one of ["STEP", "SECTION"]
+
+
+
+
+
+### Nested Schema for `closing_reasons`
+
+Optional:
+
+- `id` (String) Not Null
+
+
+
+### Nested Schema for `dynamic_due_date`
+
+Optional:
+
+- `action_type_condition` (String) Not Null; must be one of ["WORKFLOW_STARTED", "STEP_CLOSED"]
+- `number_of_units` (Number) Not Null
+- `step_id` (String)
+- `time_period` (String) Not Null; must be one of ["days", "weeks", "months"]
+
+
+
+### Nested Schema for `update_entity_attributes`
+
+Optional:
+
+- `source` (String) Not Null; must be one of ["workflow_status", "current_section", "current_step"]
+- `target` (Attributes) Not Null (see [below for nested schema](#nestedatt--update_entity_attributes--target))
+
+
+### Nested Schema for `update_entity_attributes.target`
+
+Optional:
+
+- `entity_attribute` (String) Not Null
+- `entity_schema` (String) Not Null
+
+## Import
+
+Import is supported using the following syntax:
+
+```shell
+terraform import epilot-workflow_workflow_definition.my_epilot-workflow_workflow_definition "7hj28a"
+```
diff --git a/examples/provider/provider.tf b/examples/provider/provider.tf
index 76725db..50dcefa 100644
--- a/examples/provider/provider.tf
+++ b/examples/provider/provider.tf
@@ -2,7 +2,7 @@ terraform {
required_providers {
epilot-workflow = {
source = "epilot-dev/epilot-workflow"
- version = "0.8.3"
+ version = "0.8.4"
}
}
}
diff --git a/gen.yaml b/gen.yaml
index e7da5b6..0397cfd 100644
--- a/gen.yaml
+++ b/gen.yaml
@@ -27,7 +27,7 @@ go:
outputModelSuffix: output
packageName: openapi
terraform:
- version: 0.8.3
+ version: 0.8.4
additionalDataSources: []
additionalDependencies: {}
additionalResources: []
diff --git a/internal/provider/workflowdefinition_resource.go b/internal/provider/workflowdefinition_resource.go
index f83992b..872a115 100644
--- a/internal/provider/workflowdefinition_resource.go
+++ b/internal/provider/workflowdefinition_resource.go
@@ -869,7 +869,7 @@ func (r *WorkflowDefinitionResource) Create(ctx context.Context, req resource.Cr
resp.Diagnostics.AddError("unexpected response from API", fmt.Sprintf("%v", res))
return
}
- if res.StatusCode != 200 {
+ if res.StatusCode != 201 {
resp.Diagnostics.AddError(fmt.Sprintf("unexpected response from API. Got an unexpected response code %v", res.StatusCode), debugResponse(res.RawResponse))
return
}
diff --git a/internal/sdk/workflows.go b/internal/sdk/workflows.go
index 4016d31..282f2ff 100644
--- a/internal/sdk/workflows.go
+++ b/internal/sdk/workflows.go
@@ -102,7 +102,7 @@ func (s *Workflows) CreateDefinition(ctx context.Context, request shared.Workflo
httpRes.Body = io.NopCloser(bytes.NewBuffer(rawBody))
switch {
- case httpRes.StatusCode == 200:
+ case httpRes.StatusCode == 201:
switch {
case utils.MatchContentType(httpRes.Header.Get("Content-Type"), `application/json`):
var out shared.WorkflowDefinition
diff --git a/workflow.yaml b/workflow.yaml
index 9d82c28..03a65f4 100644
--- a/workflow.yaml
+++ b/workflow.yaml
@@ -138,7 +138,7 @@ paths:
order: 2
assignedTo: ["123482"]
responses:
- 200:
+ 201:
description: Success - if the definition is created successfully
content:
application/json: