Skip to content

Commit

Permalink
chore:regen
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishu Goel committed Jun 11, 2024
1 parent 662619e commit 111d633
Show file tree
Hide file tree
Showing 32 changed files with 1,509 additions and 639 deletions.
35 changes: 23 additions & 12 deletions .speakeasy/gen.lock
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
lockVersion: 2.0.0
id: 5a857039-7f4b-42d5-86fd-449767242ed2
management:
docChecksum: 8a2ff4be25db818a35891d602baa4a25
docChecksum: 49e71e8528a2034de903094a70555fe5
docVersion: 1.0.0
speakeasyVersion: 1.303.4
generationVersion: 2.340.2
releaseVersion: 0.8.2
configChecksum: 7ce13d26abba12900e05100bdca957a2
releaseVersion: 0.8.3
configChecksum: e7d1645bf627310ec7c8eeead96e97ea
repoURL: https://github.com/epilot-dev/terraform-provider-epilot-workflow.git
repoSubDirectory: .
published: true
Expand All @@ -27,7 +27,6 @@ features:
globalServerURLs: 2.82.1
unions: 2.81.14
generatedFiles:
- internal/sdk/closingreason.go
- internal/sdk/workflows.go
- internal/sdk/sdk.go
- internal/sdk/models/errors/sdkerror.go
Expand All @@ -46,9 +45,6 @@ generatedFiles:
- internal/sdk/internal/utils/retries.go
- internal/sdk/internal/utils/security.go
- internal/sdk/internal/utils/utils.go
- internal/sdk/models/operations/changereasonstatus.go
- internal/sdk/models/operations/createclosingreason.go
- internal/sdk/models/operations/getallclosingreasons.go
- internal/sdk/models/operations/createdefinition.go
- internal/sdk/models/operations/deletedefinition.go
- internal/sdk/models/operations/getdefinition.go
Expand All @@ -57,11 +53,6 @@ generatedFiles:
- internal/sdk/models/operations/getworkflowclosingreasons.go
- internal/sdk/models/operations/setworkflowclosingreasons.go
- internal/sdk/models/operations/updatedefinition.go
- internal/sdk/models/shared/errorresp.go
- internal/sdk/models/shared/changereasonstatusreq.go
- internal/sdk/models/shared/closingreasonsstatus.go
- internal/sdk/models/shared/closingreason.go
- internal/sdk/models/shared/closingreasons.go
- internal/sdk/models/shared/workflowdefinition.go
- internal/sdk/models/shared/updateentityattributes.go
- internal/sdk/models/shared/section.go
Expand All @@ -74,6 +65,7 @@ generatedFiles:
- internal/sdk/models/shared/dynamicduedate.go
- internal/sdk/models/shared/stepdescription.go
- internal/sdk/models/shared/closingreasonid.go
- internal/sdk/models/shared/errorresp.go
- internal/sdk/models/shared/definitionnotfoundresp.go
- internal/sdk/models/shared/maxallowedlimit.go
- internal/sdk/models/shared/closingreasonsids.go
Expand Down Expand Up @@ -126,7 +118,26 @@ generatedFiles:
- main.go
- terraform-registry-manifest.json
- tools/tools.go
- internal/provider/types/closing_reason_id.go
- internal/provider/types/dynamic_due_date.go
- internal/provider/types/automation_config.go
- internal/provider/types/step_description.go
- internal/provider/types/step_journey.go
- internal/provider/types/ecp_details.go
- internal/provider/types/step_requirement.go
- internal/provider/types/step.go
- internal/provider/types/section.go
- internal/provider/types/flow.go
- internal/provider/types/target.go
- internal/provider/types/update_entity_attributes.go
- USAGE.md
- internal/provider/provider.go
- examples/provider/provider.tf
- examples/resources/epilot-workflow_workflow_definition/import.sh
- internal/provider/workflowdefinition_resource.go
- internal/provider/workflowdefinition_resource_sdk.go
- examples/resources/epilot-workflow_workflow_definition/resource.tf
- internal/provider/workflowdefinition_data_source.go
- internal/provider/workflowdefinition_data_source_sdk.go
- examples/data-sources/epilot-workflow_workflow_definition/data-source.tf
- .gitattributes
48 changes: 48 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,54 @@ TF_REATTACH_PROVIDERS=... terraform apply

<!-- End SDK <no value> -->

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

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

```hcl
terraform {
required_providers {
epilot-workflow = {
source = "epilot-dev/epilot-workflow"
version = "0.8.3"
}
}
}
provider "epilot-workflow" {
# Configuration options
}
```
<!-- End SDK Installation [installation] -->

<!-- Start SDK Example Usage [usage] -->
## SDK Example Usage

### 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
# In a new terminal
cd examples/your-example
TF_REATTACH_PROVIDERS=... terraform init
TF_REATTACH_PROVIDERS=... terraform apply
```
<!-- End SDK Example Usage [usage] -->

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


<!-- End Available Resources and Operations [operations] -->

<!-- Placeholder for Future Speakeasy SDK Sections -->

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.
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
data "epilot-workflow_workflow_definition" "my_workflowdefinition" {
id = "7hj28a"
}
2 changes: 1 addition & 1 deletion examples/provider/provider.tf
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ terraform {
required_providers {
epilot-workflow = {
source = "epilot-dev/epilot-workflow"
version = "0.8.2"
version = "0.8.3"
}
}
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
terraform import epilot-workflow_workflow_definition.my_epilot-workflow_workflow_definition "7hj28a"
98 changes: 78 additions & 20 deletions examples/resources/epilot-workflow_workflow_definition/resource.tf
Original file line number Diff line number Diff line change
@@ -1,22 +1,80 @@
terraform {
required_providers {
epilot-workflow = {
source = "epilot-dev/epilot-workflow"
version = "1.0.1"
}

}
}

provider "epilot-workflow" {
# Configuration options
bearer_auth = var.bearer_auth
}

variable "bearer_auth" {
type = string
}

resource "epilot-workflow_workflow_definition" "my_workflowdefinition" {

creation_time = "2021-04-27T12:01:13.000Z"
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"
}
},
]
id = "70408a19-3e72-4165-b76b-6381b5dd263e"
last_update_time = "2021-04-27T12:01:13.000Z"
name = "Nina Bednar"
}
2 changes: 1 addition & 1 deletion gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ go:
outputModelSuffix: output
packageName: openapi
terraform:
version: 0.8.2
version: 0.8.3
additionalDataSources: []
additionalDependencies: {}
additionalResources: []
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ module github.com/epilot-dev/terraform-provider-epilot-workflow

go 1.21

toolchain go1.21.9
toolchain go1.21.6

require (
github.com/cenkalti/backoff/v4 v4.2.0
Expand Down
8 changes: 6 additions & 2 deletions internal/provider/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -84,11 +84,15 @@ func (p *EpilotWorkflowProvider) Configure(ctx context.Context, req provider.Con
}

func (p *EpilotWorkflowProvider) Resources(ctx context.Context) []func() resource.Resource {
return []func() resource.Resource{}
return []func() resource.Resource{
NewWorkflowDefinitionResource,
}
}

func (p *EpilotWorkflowProvider) DataSources(ctx context.Context) []func() datasource.DataSource {
return []func() datasource.DataSource{}
return []func() datasource.DataSource{
NewWorkflowDefinitionDataSource,
}
}

func New(version string) func() provider.Provider {
Expand Down
9 changes: 9 additions & 0 deletions internal/provider/types/automation_config.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

package types

import "github.com/hashicorp/terraform-plugin-framework/types"

type AutomationConfig struct {
FlowID types.String `tfsdk:"flow_id"`
}
9 changes: 9 additions & 0 deletions internal/provider/types/closing_reason_id.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

package types

import "github.com/hashicorp/terraform-plugin-framework/types"

type ClosingReasonID struct {
ID types.String `tfsdk:"id"`
}
12 changes: 12 additions & 0 deletions internal/provider/types/dynamic_due_date.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

package types

import "github.com/hashicorp/terraform-plugin-framework/types"

type DynamicDueDate struct {
ActionTypeCondition types.String `tfsdk:"action_type_condition"`
NumberOfUnits types.Number `tfsdk:"number_of_units"`
StepID types.String `tfsdk:"step_id"`
TimePeriod types.String `tfsdk:"time_period"`
}
12 changes: 12 additions & 0 deletions internal/provider/types/ecp_details.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

package types

import "github.com/hashicorp/terraform-plugin-framework/types"

type ECPDetails struct {
Description types.String `tfsdk:"description"`
Enabled types.Bool `tfsdk:"enabled"`
Journey *StepJourney `tfsdk:"journey"`
Label types.String `tfsdk:"label"`
}
8 changes: 8 additions & 0 deletions internal/provider/types/flow.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

package types

type Flow struct {
Section *Section `tfsdk:"section" tfPlanOnly:"true"`
Step *Step `tfsdk:"step" tfPlanOnly:"true"`
}
13 changes: 13 additions & 0 deletions internal/provider/types/section.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

package types

import "github.com/hashicorp/terraform-plugin-framework/types"

type Section struct {
ID types.String `tfsdk:"id"`
Name types.String `tfsdk:"name"`
Order types.Number `tfsdk:"order"`
Steps []Step `tfsdk:"steps"`
Type types.String `tfsdk:"type"`
}
23 changes: 23 additions & 0 deletions internal/provider/types/step.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

package types

import "github.com/hashicorp/terraform-plugin-framework/types"

type Step struct {
AssignedTo []types.String `tfsdk:"assigned_to"`
AutomationConfig *AutomationConfig `tfsdk:"automation_config"`
Description *StepDescription `tfsdk:"description"`
DueDate types.String `tfsdk:"due_date"`
DynamicDueDate *DynamicDueDate `tfsdk:"dynamic_due_date"`
Ecp *ECPDetails `tfsdk:"ecp"`
ExecutionType types.String `tfsdk:"execution_type"`
ID types.String `tfsdk:"id"`
Installer *ECPDetails `tfsdk:"installer"`
Journey *StepJourney `tfsdk:"journey"`
Name types.String `tfsdk:"name"`
Order types.Number `tfsdk:"order"`
Requirements []StepRequirement `tfsdk:"requirements"`
Type types.String `tfsdk:"type"`
UserIds []types.Number `tfsdk:"user_ids"`
}
10 changes: 10 additions & 0 deletions internal/provider/types/step_description.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
// Code generated by Speakeasy (https://speakeasyapi.dev). DO NOT EDIT.

package types

import "github.com/hashicorp/terraform-plugin-framework/types"

type StepDescription struct {
Enabled types.Bool `tfsdk:"enabled"`
Value types.String `tfsdk:"value"`
}
Loading

0 comments on commit 111d633

Please sign in to comment.