Skip to content

Commit 74789df

Browse files
author
Nishu Goel
committed
feat: apparently custom_theme can be an object
1 parent 647f692 commit 74789df

File tree

37 files changed

+1778
-832
lines changed

37 files changed

+1778
-832
lines changed

.speakeasy/gen.lock

Lines changed: 88 additions & 271 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 39 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
<a href="https://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge" /></a>
99
</div>
1010

11-
<!-- Start SDK Installation [installation] -->
12-
## SDK Installation
11+
<!-- Start Installation [installation] -->
12+
## Installation
1313

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

@@ -18,7 +18,7 @@ terraform {
1818
required_providers {
1919
epilot-designbuilder = {
2020
source = "epilot-dev/epilot-designbuilder"
21-
version = "0.13.2"
21+
version = "0.14.2"
2222
}
2323
}
2424
}
@@ -27,19 +27,17 @@ provider "epilot-designbuilder" {
2727
# Configuration options
2828
}
2929
```
30-
<!-- End SDK Installation [installation] -->
30+
<!-- End Installation [installation] -->
3131

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

35-
### Testing the provider locally
35+
#### Local Provider
3636

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

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

41-
### Example
42-
4341
```sh
4442
go run main.go --debug
4543
# Copy the TF_REATTACH_PROVIDERS env var
@@ -48,13 +46,41 @@ cd examples/your-example
4846
TF_REATTACH_PROVIDERS=... terraform init
4947
TF_REATTACH_PROVIDERS=... terraform apply
5048
```
51-
<!-- End SDK Example Usage [usage] -->
5249

53-
<!-- Start Available Resources and Operations [operations] -->
54-
## Available Resources and Operations
50+
#### Compiled Provider
51+
52+
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.
53+
54+
1. Execute `go build` to construct a binary called `terraform-provider-epilot-designbuilder`
55+
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
56+
57+
Terraform searches for the `.terraformrc` file in your home directory and applies any configuration settings you set.
58+
59+
```
60+
provider_installation {
61+
62+
dev_overrides {
63+
"registry.terraform.io/epilot-dev/epilot-designbuilder" = "<PATH>"
64+
}
65+
66+
# For all other providers, install them directly from their origin provider
67+
# registries as normal. If you omit this, Terraform will _only_ use
68+
# the dev_overrides block, and so no other providers will be available.
69+
direct {}
70+
}
71+
```
72+
<!-- End Testing the provider locally [usage] -->
73+
74+
<!-- Start Available Resources and Data Sources [operations] -->
75+
## Available Resources and Data Sources
76+
77+
### Resources
5578

79+
* [epilot-designbuilder_design](docs/resources/design.md)
80+
### Data Sources
5681

57-
<!-- End Available Resources and Operations [operations] -->
82+
* [epilot-designbuilder_design](docs/data-sources/design.md)
83+
<!-- End Available Resources and Data Sources [operations] -->
5884

5985
<!-- Start Summary [summary] -->
6086
## Summary

docs/data-sources/design.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ Design DataSource
1414

1515
```terraform
1616
data "epilot-designbuilder_design" "my_design" {
17-
design_id = "4a062990-a6a3-11eb-9828-4f3da7d4935a"
1817
}
1918
```
2019

@@ -25,12 +24,10 @@ data "epilot-designbuilder_design" "my_design" {
2524

2625
- `brand_id` (String) Parsed as JSON.
2726
- `brand_name` (String)
28-
- `cashback` (String)
29-
- `coupon` (String)
30-
- `created_at` (String) Creation date and time using ISO 8601 full-time format
27+
- `created_at` (String) Creation date and time
3128
- `created_by` (String)
32-
- `custom_css` (String)
33-
- `custom_theme` (String)
29+
- `custom_theme` (String) Parsed as JSON.
30+
- `design_tokens` (Attributes) (see [below for nested schema](#nestedatt--design_tokens))
3431
- `edited` (Boolean)
3532
- `id` (String) The ID of this resource.
3633
- `is_default` (Boolean)
@@ -40,6 +37,16 @@ data "epilot-designbuilder_design" "my_design" {
4037
- `use_custom_theme` (Boolean)
4138
- `user` (Attributes) (see [below for nested schema](#nestedatt--user))
4239

40+
<a id="nestedatt--design_tokens"></a>
41+
### Nested Schema for `design_tokens`
42+
43+
Read-Only:
44+
45+
- `cashback` (String)
46+
- `coupon` (String)
47+
- `custom_css` (String)
48+
49+
4350
<a id="nestedatt--user"></a>
4451
### Nested Schema for `user`
4552

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ terraform {
1717
required_providers {
1818
epilot-designbuilder = {
1919
source = "epilot-dev/epilot-designbuilder"
20-
version = "0.13.2"
20+
version = "0.14.2"
2121
}
2222
}
2323
}

docs/resources/design.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,17 +14,24 @@ Design Resource
1414

1515
```terraform
1616
resource "epilot-designbuilder_design" "my_design" {
17-
brand_id = "{ \"see\": \"documentation\" }"
18-
brand_name = "...my_brand_name..."
19-
cashback = "...my_cashback..."
20-
coupon = "...my_coupon..."
21-
custom_css = "...my_custom_css..."
22-
custom_theme = "...my_custom_theme..."
23-
design_id = "4a062990-a6a3-11eb-9828-4f3da7d4935a"
17+
brand_id = "{ \"see\": \"documentation\" }"
18+
brand_name = "...my_brand_name..."
19+
custom_theme = "{ \"see\": \"documentation\" }"
20+
design_tokens = {
21+
cashback = "...my_cashback..."
22+
coupon = "...my_coupon..."
23+
custom_css = "...my_custom_css..."
24+
}
2425
is_default = true
2526
style = "{ \"see\": \"documentation\" }"
2627
style_name = "...my_style_name..."
27-
use_custom_theme = true
28+
use_custom_theme = false
29+
user = {
30+
emailaddress = "...my_emailaddress..."
31+
fullname = "...my_fullname..."
32+
name = "...my_name..."
33+
userid = "...my_userid..."
34+
}
2835
}
2936
```
3037

@@ -40,22 +47,30 @@ resource "epilot-designbuilder_design" "my_design" {
4047

4148
- `brand_id` (String) Parsed as JSON.
4249
- `brand_name` (String)
43-
- `cashback` (String)
44-
- `coupon` (String)
45-
- `custom_css` (String)
46-
- `custom_theme` (String)
50+
- `custom_theme` (String) Parsed as JSON.
51+
- `design_tokens` (Attributes) (see [below for nested schema](#nestedatt--design_tokens))
4752
- `is_default` (Boolean)
4853
- `use_custom_theme` (Boolean)
4954
- `user` (Attributes) (see [below for nested schema](#nestedatt--user))
5055

5156
### Read-Only
5257

53-
- `created_at` (String) Creation date and time using ISO 8601 full-time format
58+
- `created_at` (String) Creation date and time
5459
- `created_by` (String)
5560
- `edited` (Boolean)
5661
- `id` (String) The ID of this resource.
5762
- `last_modified_at` (String)
5863

64+
<a id="nestedatt--design_tokens"></a>
65+
### Nested Schema for `design_tokens`
66+
67+
Optional:
68+
69+
- `cashback` (String)
70+
- `coupon` (String)
71+
- `custom_css` (String)
72+
73+
5974
<a id="nestedatt--user"></a>
6075
### Nested Schema for `user`
6176

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,2 @@
11
data "epilot-designbuilder_design" "my_design" {
2-
design_id = "4a062990-a6a3-11eb-9828-4f3da7d4935a"
32
}

examples/provider/provider.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ terraform {
22
required_providers {
33
epilot-designbuilder = {
44
source = "epilot-dev/epilot-designbuilder"
5-
version = "0.13.2"
5+
version = "0.14.2"
66
}
77
}
88
}
Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11
resource "epilot-designbuilder_design" "my_design" {
2-
brand_id = "{ \"see\": \"documentation\" }"
3-
brand_name = "...my_brand_name..."
4-
cashback = "...my_cashback..."
5-
coupon = "...my_coupon..."
6-
custom_css = "...my_custom_css..."
7-
custom_theme = "...my_custom_theme..."
8-
design_id = "4a062990-a6a3-11eb-9828-4f3da7d4935a"
2+
brand_id = "{ \"see\": \"documentation\" }"
3+
brand_name = "...my_brand_name..."
4+
custom_theme = "{ \"see\": \"documentation\" }"
5+
design_tokens = {
6+
cashback = "...my_cashback..."
7+
coupon = "...my_coupon..."
8+
custom_css = "...my_custom_css..."
9+
}
910
is_default = true
1011
style = "{ \"see\": \"documentation\" }"
1112
style_name = "...my_style_name..."
12-
use_custom_theme = true
13+
use_custom_theme = false
14+
user = {
15+
emailaddress = "...my_emailaddress..."
16+
fullname = "...my_fullname..."
17+
name = "...my_name..."
18+
userid = "...my_userid..."
19+
}
1320
}

gen.yaml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,10 @@ generation:
99
requestResponseComponentNamesFeb2024: false
1010
auth:
1111
oAuth2ClientCredentialsEnabled: false
12+
oAuth2PasswordEnabled: false
1213
telemetryEnabled: false
1314
terraform:
14-
version: 0.13.2
15+
version: 0.14.2
1516
additionalDataSources: []
1617
additionalDependencies: {}
1718
additionalResources: []

go.mod

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,15 @@
11
module github.com/epilot-dev/terraform-provider-epilot-designbuilder
22

3-
go 1.21
3+
go 1.22.0
44

55
require (
6-
github.com/cenkalti/backoff/v4 v4.2.0
76
github.com/ericlagergren/decimal v0.0.0-20221120152707-495c53812d05
7+
github.com/hashicorp/go-uuid v1.0.3
88
github.com/hashicorp/terraform-plugin-docs v0.19.4
9-
github.com/hashicorp/terraform-plugin-framework v1.10.0
9+
github.com/hashicorp/terraform-plugin-framework v1.12.0
1010
github.com/hashicorp/terraform-plugin-framework-validators v0.13.0
11-
github.com/hashicorp/terraform-plugin-go v0.23.0
11+
github.com/hashicorp/terraform-plugin-go v0.24.0
12+
github.com/hashicorp/terraform-plugin-log v0.9.0
1213
)
1314

1415
require (
@@ -32,13 +33,11 @@ require (
3233
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
3334
github.com/hashicorp/go-hclog v1.5.0 // indirect
3435
github.com/hashicorp/go-multierror v1.1.1 // indirect
35-
github.com/hashicorp/go-plugin v1.6.0 // indirect
36-
github.com/hashicorp/go-uuid v1.0.3 // indirect
36+
github.com/hashicorp/go-plugin v1.6.1 // indirect
3737
github.com/hashicorp/go-version v1.7.0 // indirect
3838
github.com/hashicorp/hc-install v0.7.0 // indirect
3939
github.com/hashicorp/terraform-exec v0.21.0 // indirect
4040
github.com/hashicorp/terraform-json v0.22.1 // indirect
41-
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
4241
github.com/hashicorp/terraform-registry-address v0.2.3 // indirect
4342
github.com/hashicorp/terraform-svchost v0.1.1 // indirect
4443
github.com/hashicorp/yamux v0.1.1 // indirect
@@ -60,15 +59,15 @@ require (
6059
github.com/yuin/goldmark-meta v1.1.0 // indirect
6160
github.com/zclconf/go-cty v1.14.4 // indirect
6261
go.abhg.dev/goldmark/frontmatter v0.2.0 // indirect
63-
golang.org/x/crypto v0.21.0 // indirect
62+
golang.org/x/crypto v0.24.0 // indirect
6463
golang.org/x/exp v0.0.0-20230626212559-97b1e661b5df // indirect
6564
golang.org/x/mod v0.17.0 // indirect
66-
golang.org/x/net v0.23.0 // indirect
67-
golang.org/x/sys v0.18.0 // indirect
68-
golang.org/x/text v0.15.0 // indirect
69-
google.golang.org/genproto/googleapis/rpc v0.0.0-20240227224415-6ceb2ff114de // indirect
70-
google.golang.org/grpc v1.63.2 // indirect
71-
google.golang.org/protobuf v1.34.0 // indirect
65+
golang.org/x/net v0.26.0 // indirect
66+
golang.org/x/sys v0.21.0 // indirect
67+
golang.org/x/text v0.16.0 // indirect
68+
google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117 // indirect
69+
google.golang.org/grpc v1.66.2 // indirect
70+
google.golang.org/protobuf v1.34.2 // indirect
7271
gopkg.in/yaml.v2 v2.3.0 // indirect
7372
gopkg.in/yaml.v3 v3.0.1 // indirect
7473
)

0 commit comments

Comments
 (0)