Skip to content

Commit

Permalink
Update provider to not return internal fields except id
Browse files Browse the repository at this point in the history
  • Loading branch information
Nishu Goel committed Mar 2, 2024
1 parent 1881322 commit 3d8c6dc
Show file tree
Hide file tree
Showing 35 changed files with 209 additions and 1,250 deletions.
11 changes: 3 additions & 8 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: 996704943fed939b0f554e9a1ff48fd6
docChecksum: 49ed280caef5eeece793d407c91311b9
docVersion: 1.0.0
speakeasyVersion: internal
generationVersion: 2.230.1
releaseVersion: 0.5.5
configChecksum: 85cc1dec9461e8a74c3880ab671532cf
releaseVersion: 0.6.0
configChecksum: 7343b8d7750f297d93a3e264e8b3bccf
repoURL: https://github.com/epilot-dev/terraform-provider-epilot-product.git
repoSubDirectory: .
published: true
Expand All @@ -20,7 +20,6 @@ features:
globalServerURLs: 2.82.0
unions: 2.85.0
terraform:
additionalProperties: 0.1.2
constsAndDefaults: 0.1.2
core: 3.8.1
globalSecurity: 2.81.2
Expand Down Expand Up @@ -110,8 +109,6 @@ generatedFiles:
- internal/sdk/pkg/models/shared/price.go
- internal/sdk/pkg/models/shared/pricetier.go
- internal/sdk/pkg/models/shared/pricetierdisplaymode.go
- internal/sdk/pkg/models/shared/baseentityowner.go
- internal/sdk/pkg/models/shared/baseentityacl.go
- internal/sdk/pkg/models/shared/clienterror.go
- internal/sdk/pkg/models/shared/pricecreate.go
- internal/sdk/pkg/models/shared/pricepatch.go
Expand All @@ -123,8 +120,6 @@ generatedFiles:
- internal/sdk/pkg/models/shared/taxcreate.go
- internal/sdk/pkg/models/shared/taxpatch.go
- internal/sdk/pkg/models/shared/security.go
- internal/provider/type_base_entity_acl.go
- internal/provider/type_base_entity_owner.go
- internal/provider/type_price_tier.go
- internal/provider/type_price_create_unit.go
- internal/provider/type_dollar_relation.go
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ terraform {
required_providers {
epilot-product = {
source = "epilot-dev/epilot-product"
version = "0.5.5"
version = "0.6.0"
}
}
}
Expand Down
19 changes: 1 addition & 18 deletions docs/data-sources/price.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ must be one of ["per_unit", "tiered_volume", "tiered_graduated", "tiered_flatfee
- `renewal_duration_unit` (String) The renewal period duration unit. must be one of ["weeks", "months", "years"]
- `schema` (String)
- `tags` (List of String)
- `tax` (Attributes) (see [below for nested schema](#nestedatt--tax))
- `tax` (String) Parsed as JSON.
- `termination_time_amount` (Number) The termination period duration
- `termination_time_unit` (String) The termination period duration unit. must be one of ["weeks", "months", "years"]
- `tiers` (Attributes List) Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee. (see [below for nested schema](#nestedatt--tiers))
Expand Down Expand Up @@ -90,23 +90,6 @@ Read-Only:
- `user_id` (String)


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

Read-Only:

- `dollar_relation` (Attributes List) (see [below for nested schema](#nestedatt--tax--dollar_relation))

<a id="nestedatt--tax--dollar_relation"></a>
### Nested Schema for `tax.dollar_relation`

Read-Only:

- `entity_id` (String)
- `tags` (List of String)



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

Expand Down
29 changes: 1 addition & 28 deletions docs/data-sources/product.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,21 +32,15 @@ data "epilot-product_product" "my_product" {

### Read-Only

- `acl` (Attributes) Access control list (ACL) for an entity. Defines sharing access to external orgs or users. (see [below for nested schema](#nestedatt--acl))
- `active` (Boolean)
- `code` (String) The product code
- `created_at` (String)
- `description` (String) A description of the product. Multi-line supported.
- `feature` (List of String)
- `internal_name` (String) Not visible to customers, only in internal tables
- `name` (String) The description for the product
- `org` (String) Organization Id the entity belongs to
- `owners` (Attributes List) (see [below for nested schema](#nestedatt--owners))
- `price_options` (Attributes) (see [below for nested schema](#nestedatt--price_options))
- `product_downloads` (String) Parsed as JSON.
- `product_images` (String) Parsed as JSON.
- `schema` (String)
- `tags` (List of String)
- `title` (String)
- `type` (String) The type of Product:

| type | description |
Expand All @@ -55,27 +49,6 @@ data "epilot-product_product" "my_product" {
| `service` | Represents a service or virtual product |

must be one of ["product", "service"]; Default: "product"
- `updated_at` (String)

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

Read-Only:

- `additional_properties` (String) Parsed as JSON.
- `delete` (List of String)
- `edit` (List of String)
- `view` (List of String)


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

Read-Only:

- `org_id` (String)
- `user_id` (String)


<a id="nestedatt--price_options"></a>
### Nested Schema for `price_options`
Expand Down
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-product = {
source = "epilot-dev/epilot-product"
version = "0.5.4"
version = "0.5.6"
}
}
}
Expand Down
20 changes: 2 additions & 18 deletions docs/resources/price.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ resource "epilot-product_price" "my_price" {
pricing_model = "per_unit"
renewal_duration_amount = 66.53
renewal_duration_unit = "months"
tax = "{ \"see\": \"documentation\" }"
termination_time_amount = 20
termination_time_unit = "weeks"
type = "recurring"
Expand Down Expand Up @@ -64,7 +65,7 @@ resource "epilot-product_price" "my_price" {
must be one of ["per_unit", "tiered_volume", "tiered_graduated", "tiered_flatfee"]; Default: "per_unit"
- `renewal_duration_amount` (Number) The renewal period duration
- `renewal_duration_unit` (String) The renewal period duration unit. must be one of ["weeks", "months", "years"]
- `tax` (Attributes) (see [below for nested schema](#nestedatt--tax))
- `tax` (String) Parsed as JSON.
- `termination_time_amount` (Number) The termination period duration
- `termination_time_unit` (String) The termination period duration unit. must be one of ["weeks", "months", "years"]
- `tiers` (Attributes List) Defines an array of tiers. Each tier has an upper bound, an unit amount and a flat fee. (see [below for nested schema](#nestedatt--tiers))
Expand All @@ -87,23 +88,6 @@ must be one of ["per_unit", "tiered_volume", "tiered_graduated", "tiered_flatfee
- `title` (String)
- `updated_at` (String)

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

Optional:

- `dollar_relation` (Attributes List) (see [below for nested schema](#nestedatt--tax--dollar_relation))

<a id="nestedatt--tax--dollar_relation"></a>
### Nested Schema for `tax.dollar_relation`

Optional:

- `entity_id` (String)
- `tags` (List of String)



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

Expand Down
45 changes: 9 additions & 36 deletions docs/resources/product.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,14 @@ Product Resource

```terraform
resource "epilot-product_product" "my_product" {
active = true
code = "...my_code..."
description = "...my_description..."
internal_name = "...my_internal_name..."
name = "Juan Morar Jr."
product_images = "{ \"see\": \"documentation\" }"
type = "product"
active = true
code = "...my_code..."
description = "...my_description..."
internal_name = "...my_internal_name..."
name = "Juan Morar Jr."
product_downloads = "{ \"see\": \"documentation\" }"
product_images = "{ \"see\": \"documentation\" }"
type = "product"
}
```

Expand All @@ -39,6 +40,7 @@ resource "epilot-product_product" "my_product" {
- `feature` (List of String)
- `internal_name` (String) Not visible to customers, only in internal tables
- `price_options` (Attributes) (see [below for nested schema](#nestedatt--price_options))
- `product_downloads` (String) Parsed as JSON.
- `product_images` (String) Parsed as JSON.
- `type` (String) The type of Product:

Expand All @@ -51,15 +53,7 @@ must be one of ["product", "service"]; Default: "product"

### Read-Only

- `acl` (Attributes) Access control list (ACL) for an entity. Defines sharing access to external orgs or users. (see [below for nested schema](#nestedatt--acl))
- `created_at` (String)
- `id` (String) The product id
- `org` (String) Organization Id the entity belongs to
- `owners` (Attributes List) (see [below for nested schema](#nestedatt--owners))
- `schema` (String)
- `tags` (List of String)
- `title` (String)
- `updated_at` (String)

<a id="nestedatt--price_options"></a>
### Nested Schema for `price_options`
Expand All @@ -77,24 +71,3 @@ Optional:
- `tags` (List of String)



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

Read-Only:

- `additional_properties` (String) Parsed as JSON.
- `delete` (List of String)
- `edit` (List of String)
- `view` (List of String)


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

Read-Only:

- `org_id` (String)
- `user_id` (String)


5 changes: 4 additions & 1 deletion docs/resources/tax.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,14 @@ resource "epilot-product_tax" "my_tax" {
### Required

- `active` (Boolean)
- `description` (String)
- `rate` (String)
- `region` (String) must be one of ["DE", "AT", "CH"]
- `type` (String) must be one of ["VAT", "Custom"]

### Optional

- `description` (String)

### Read-Only

- `acl` (Attributes) Access control list (ACL) for an entity. Defines sharing access to external orgs or users. (see [below for nested schema](#nestedatt--acl))
Expand Down
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-product = {
source = "epilot-dev/epilot-product"
version = "0.5.5"
version = "0.6.0"
}
}
}
Expand Down
25 changes: 10 additions & 15 deletions examples/resources/epilot-product_product/resource.tf
Original file line number Diff line number Diff line change
@@ -1,15 +1,10 @@
# resource "epilot-product_product" "my_product" {
# active = true
# code = "...my_code..."
# description = "...my_description..."
# internal_name = "...my_internal_name..."
# name = "Juan Morar Jr."
# product_downloads = "{ \"see\": \"documentation\" }"
# product_images = "{ \"see\": \"documentation\" }"
# type = "product"
# }


# resource "epilot-product_product" "new_product" {}

resource "epilot-product_price" "new_price" {}
resource "epilot-product_product" "my_product" {
active = true
code = "...my_code..."
description = "...my_description..."
internal_name = "...my_internal_name..."
name = "Juan Morar Jr."
product_downloads = "{ \"see\": \"documentation\" }"
product_images = "{ \"see\": \"documentation\" }"
type = "product"
}
22 changes: 14 additions & 8 deletions examples/test/bla.tf
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
terraform {
required_providers {
epilot-journey = {
source = "epilot-dev/epilot-journey"
version = "0.3.0"
}
# epilot-journey = {
# source = "epilot-dev/epilot-journey"
# version = "0.3.0"
# }
epilot-product = {
source = "epilot-dev/epilot-product"
version = "0.6.0"
Expand All @@ -25,11 +25,17 @@ provider "epilot-product" {
epilot_auth = var.epilot_auth
}

import {
to = epilot-product_product.s_product
id = "103f1186-7f7c-42d1-8891-00868a589cf3"
}
# import {
# to = epilot-product_product.s_product
# id = "103f1186-7f7c-42d1-8891-00868a589cf3"
# # }


# resource "epilot-product_product" "s_product" {
# }



# resource "epilot-product_tax" "s_tax" {
# # (resource arguments)
# }
Loading

0 comments on commit 3d8c6dc

Please sign in to comment.