Skip to content

Commit

Permalink
Correct error handling & delete response
Browse files Browse the repository at this point in the history
  • Loading branch information
anttiviljami committed Dec 17, 2024
1 parent f7f2d44 commit f9b3e27
Show file tree
Hide file tree
Showing 47 changed files with 2,334 additions and 1,222 deletions.
1,206 changes: 1,024 additions & 182 deletions .speakeasy/gen.lock

Large diffs are not rendered by default.

52 changes: 13 additions & 39 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" /></a>
</div>

<!-- Start Installation [installation] -->
## Installation
<!-- Start SDK Installation [installation] -->
## SDK Installation

To install this provider, copy and paste this code into your Terraform configuration. Then, run `terraform init`.

Expand All @@ -18,7 +18,7 @@ terraform {
required_providers {
epilot-automation = {
source = "epilot-dev/epilot-automation"
version = "0.6.0"
version = "0.6.1"
}
}
}
Expand All @@ -27,17 +27,19 @@ provider "epilot-automation" {
# Configuration options
}
```
<!-- End Installation [installation] -->
<!-- End SDK Installation [installation] -->

<!-- Start Testing the provider locally [usage] -->
## Testing the provider locally
<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage

#### Local Provider
### Testing the provider locally

Should you want to validate a change locally, the `--debug` flag allows you to execute the provider against a terraform instance locally.

This also allows for debuggers (e.g. delve) to be attached to the provider.

### Example

```sh
go run main.go --debug
# Copy the TF_REATTACH_PROVIDERS env var
Expand All @@ -46,41 +48,13 @@ cd examples/your-example
TF_REATTACH_PROVIDERS=... terraform init
TF_REATTACH_PROVIDERS=... terraform apply
```
<!-- End SDK Example Usage [usage] -->

#### Compiled Provider

Terraform allows you to use local provider builds by setting a `dev_overrides` block in a configuration file called `.terraformrc`. This block overrides all other configured installation methods.

1. Execute `go build` to construct a binary called `terraform-provider-epilot-automation`
2. Ensure that the `.terraformrc` file is configured with a `dev_overrides` section such that your local copy of terraform can see the provider binary

Terraform searches for the `.terraformrc` file in your home directory and applies any configuration settings you set.

```
provider_installation {
dev_overrides {
"registry.terraform.io/epilot-dev/epilot-automation" = "<PATH>"
}
# For all other providers, install them directly from their origin provider
# registries as normal. If you omit this, Terraform will _only_ use
# the dev_overrides block, and so no other providers will be available.
direct {}
}
```
<!-- End Testing the provider locally [usage] -->

<!-- Start Available Resources and Data Sources [operations] -->
## Available Resources and Data Sources

### Resources
<!-- Start Available Resources and Operations [operations] -->
## Available Resources and Operations

* [epilot-automation_flow](docs/resources/flow.md)
### Data Sources

* [epilot-automation_flow](docs/data-sources/flow.md)
<!-- End Available Resources and Data Sources [operations] -->
<!-- End Available Resources and Operations [operations] -->

<!-- Start Summary [summary] -->
## Summary
Expand Down
41 changes: 26 additions & 15 deletions docs/data-sources/flow.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ Flow DataSource

```terraform
data "epilot-automation_flow" "my_flow" {
flow_id = "7791b04a-16d2-44a2-9af9-2d59c25c512f"
}
```

Expand All @@ -24,6 +25,7 @@ data "epilot-automation_flow" "my_flow" {

- `actions` (List of String) The actions (nodes) of the automation flow
- `conditions` (Attributes List) (see [below for nested schema](#nestedatt--conditions))
- `disable_details` (Attributes) (see [below for nested schema](#nestedatt--disable_details))
- `enabled` (Boolean) Whether the automation is enabled or not
- `entity_schema` (String) The triggering entity schema
- `flow_name` (String) A descriptive name for the Automation
Expand Down Expand Up @@ -51,7 +53,7 @@ Read-Only:
Read-Only:

- `id` (String)
- `operation` (String)
- `operation` (String) must be one of ["equals", "not_equals", "any_of", "none_of", "contains", "not_contains", "starts_with", "ends_with", "greater_than", "less_than", "greater_than_or_equals", "less_than_or_equals", "is_empty", "is_not_empty"]
- `source` (Attributes) (see [below for nested schema](#nestedatt--conditions--statements--source))
- `values` (List of String)

Expand All @@ -61,17 +63,26 @@ Read-Only:
Read-Only:

- `attribute` (String)
- `attribute_operation` (String)
- `attribute_operation` (String) must be one of ["all", "updated", "added", "deleted"]
- `attribute_repeatable` (Boolean)
- `attribute_type` (String)
- `attribute_type` (String) must be one of ["string", "text", "number", "boolean", "date", "datetime", "tags", "country", "email", "phone", "product", "price", "status", "relation", "multiselect", "select", "radio", "relation_user", "purpose", "label"]
- `id` (String) The id of the action or trigger
- `origin` (String)
- `origin_type` (String)
- `origin` (String) must be one of ["trigger", "action"]
- `origin_type` (String) must be one of ["entity", "workflow", "journey_block"]
- `schema` (String)




<a id="nestedatt--disable_details"></a>
### Nested Schema for `disable_details`

Read-Only:

- `disabled_at` (String) When the flow was disabled
- `disabled_by` (String) Who disabled the flow (system or user). must be one of ["system", "user"]


<a id="nestedatt--schedules"></a>
### Nested Schema for `schedules`

Expand All @@ -81,8 +92,8 @@ Read-Only:
- `number_of_units` (Number)
- `schedule_api_id` (String) The id of the configured scheduler which will be added on automation triggered
- `source` (Attributes) The source of the schedule_at timestamp that will be used to schedule the action (see [below for nested schema](#nestedatt--schedules--source))
- `time_period` (String)
- `time_relation` (String)
- `time_period` (String) must be one of ["minutes", "hours", "days", "weeks", "months"]
- `time_relation` (String) must be one of ["after", "before"]

<a id="nestedatt--schedules--source"></a>
### Nested Schema for `schedules.source`
Expand All @@ -91,7 +102,7 @@ Read-Only:

- `attribute` (String)
- `id` (String) The id of the action or trigger
- `origin` (String)
- `origin` (String) must be one of ["trigger", "action", "action_task", "automation"]
- `schema` (String)


Expand Down Expand Up @@ -228,7 +239,7 @@ Read-Only:
- `configuration` (Attributes) (see [below for nested schema](#nestedatt--triggers--api_submission_trigger--configuration))
- `id` (String)
- `type` (String)
- `type` (String) must be one of ["api_submission"]
<a id="nestedatt--triggers--api_submission_trigger--configuration"></a>
### Nested Schema for `triggers.api_submission_trigger.configuration`
Expand All @@ -246,7 +257,7 @@ Read-Only:
- `configuration` (Attributes) (see [below for nested schema](#nestedatt--triggers--entity_manual_trigger--configuration))
- `id` (String)
- `type` (String)
- `type` (String) must be one of ["entity_manual"]
<a id="nestedatt--triggers--entity_manual_trigger--configuration"></a>
### Nested Schema for `triggers.entity_manual_trigger.configuration`
Expand All @@ -264,7 +275,7 @@ Read-Only:
- `configuration` (Attributes) (see [below for nested schema](#nestedatt--triggers--entity_operation_trigger--configuration))
- `id` (String)
- `type` (String)
- `type` (String) must be one of ["entity_operation"]
<a id="nestedatt--triggers--entity_operation_trigger--configuration"></a>
### Nested Schema for `triggers.entity_operation_trigger.configuration`
Expand Down Expand Up @@ -419,7 +430,7 @@ Read-Only:
- `configuration` (Attributes) (see [below for nested schema](#nestedatt--triggers--frontend_submit_trigger--configuration))
- `id` (String)
- `type` (String)
- `type` (String) must be one of ["frontend_submission"]
<a id="nestedatt--triggers--frontend_submit_trigger--configuration"></a>
### Nested Schema for `triggers.frontend_submit_trigger.configuration`
Expand All @@ -437,7 +448,7 @@ Read-Only:
- `configuration` (Attributes) (see [below for nested schema](#nestedatt--triggers--journey_submit_trigger--configuration))
- `id` (String)
- `type` (String)
- `type` (String) must be one of ["journey_submission"]
<a id="nestedatt--triggers--journey_submit_trigger--configuration"></a>
### Nested Schema for `triggers.journey_submit_trigger.configuration`
Expand All @@ -455,11 +466,11 @@ Read-Only:
- `configuration` (Attributes) (see [below for nested schema](#nestedatt--triggers--received_email_trigger--configuration))
- `id` (String)
- `type` (String)
- `type` (String) must be one of ["received_email"]
<a id="nestedatt--triggers--received_email_trigger--configuration"></a>
### Nested Schema for `triggers.received_email_trigger.configuration`
Read-Only:
- `message_type` (String)
- `message_type` (String) must be one of ["RECEIVED"]
2 changes: 1 addition & 1 deletion docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ terraform {
required_providers {
epilot-automation = {
source = "epilot-dev/epilot-automation"
version = "0.6.0"
version = "0.6.1"
}
}
}
Expand Down
Loading

0 comments on commit f9b3e27

Please sign in to comment.