Skip to content

Commit 589d5a0

Browse files
authored
feat: Add data sources (#88)
* feat: Add source data source * feat: Convert data source schema attributes from resource schema attributes * feat: Destination & Connection data sources * refactor: Template for resource & data source & schema files * docs: Generate
1 parent c42bf7e commit 589d5a0

File tree

21 files changed

+1223
-487
lines changed

21 files changed

+1223
-487
lines changed

docs/data-sources/connection.md

Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "hookdeck_connection Data Source - terraform-provider-hookdeck"
4+
subcategory: ""
5+
description: |-
6+
Connection Data Source
7+
---
8+
9+
# hookdeck_connection (Data Source)
10+
11+
Connection Data Source
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `id` (String) ID of the connection
21+
22+
### Read-Only
23+
24+
- `created_at` (String) Date the connection was created
25+
- `description` (String) Description for the connection
26+
- `destination_id` (String) ID of a destination to bind to the connection
27+
- `disabled_at` (String) Date the connection was disabled
28+
- `name` (String) A unique, human-friendly name for the connection
29+
- `paused_at` (String) Date the connection was paused
30+
- `rules` (Attributes Set) (see [below for nested schema](#nestedatt--rules))
31+
- `source_id` (String) ID of a source to bind to the connection
32+
- `team_id` (String) ID of the workspace
33+
- `updated_at` (String) Date the connection was last updated
34+
35+
<a id="nestedatt--rules"></a>
36+
### Nested Schema for `rules`
37+
38+
Read-Only:
39+
40+
- `delay_rule` (Attributes) (see [below for nested schema](#nestedatt--rules--delay_rule))
41+
- `filter_rule` (Attributes) (see [below for nested schema](#nestedatt--rules--filter_rule))
42+
- `retry_rule` (Attributes) (see [below for nested schema](#nestedatt--rules--retry_rule))
43+
- `transform_rule` (Attributes) (see [below for nested schema](#nestedatt--rules--transform_rule))
44+
45+
<a id="nestedatt--rules--delay_rule"></a>
46+
### Nested Schema for `rules.delay_rule`
47+
48+
Read-Only:
49+
50+
- `delay` (Number) Delay to introduce in MS
51+
52+
53+
<a id="nestedatt--rules--filter_rule"></a>
54+
### Nested Schema for `rules.filter_rule`
55+
56+
Read-Only:
57+
58+
- `body` (Attributes) (see [below for nested schema](#nestedatt--rules--filter_rule--body))
59+
- `headers` (Attributes) (see [below for nested schema](#nestedatt--rules--filter_rule--headers))
60+
- `path` (Attributes) (see [below for nested schema](#nestedatt--rules--filter_rule--path))
61+
- `query` (Attributes) (see [below for nested schema](#nestedatt--rules--filter_rule--query))
62+
63+
<a id="nestedatt--rules--filter_rule--body"></a>
64+
### Nested Schema for `rules.filter_rule.body`
65+
66+
Read-Only:
67+
68+
- `boolean` (Boolean)
69+
- `json` (String) Stringied JSON using our filter syntax to filter on request headers
70+
- `number` (Number)
71+
- `string` (String)
72+
73+
74+
<a id="nestedatt--rules--filter_rule--headers"></a>
75+
### Nested Schema for `rules.filter_rule.headers`
76+
77+
Read-Only:
78+
79+
- `boolean` (Boolean)
80+
- `json` (String) Stringied JSON using our filter syntax to filter on request headers
81+
- `number` (Number)
82+
- `string` (String)
83+
84+
85+
<a id="nestedatt--rules--filter_rule--path"></a>
86+
### Nested Schema for `rules.filter_rule.path`
87+
88+
Read-Only:
89+
90+
- `boolean` (Boolean)
91+
- `json` (String) Stringied JSON using our filter syntax to filter on request headers
92+
- `number` (Number)
93+
- `string` (String)
94+
95+
96+
<a id="nestedatt--rules--filter_rule--query"></a>
97+
### Nested Schema for `rules.filter_rule.query`
98+
99+
Read-Only:
100+
101+
- `boolean` (Boolean)
102+
- `json` (String) Stringied JSON using our filter syntax to filter on request headers
103+
- `number` (Number)
104+
- `string` (String)
105+
106+
107+
108+
<a id="nestedatt--rules--retry_rule"></a>
109+
### Nested Schema for `rules.retry_rule`
110+
111+
Read-Only:
112+
113+
- `count` (Number) Maximum number of retries to attempt
114+
- `interval` (Number) Time in MS between each retry
115+
- `strategy` (String) must be one of ["linear", "exponential"]
116+
Algorithm to use when calculating delay between retries
117+
118+
119+
<a id="nestedatt--rules--transform_rule"></a>
120+
### Nested Schema for `rules.transform_rule`
121+
122+
Read-Only:
123+
124+
- `transformation_id` (String) ID of the attached transformation object.

docs/data-sources/destination.md

Lines changed: 136 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,136 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "hookdeck_destination Data Source - terraform-provider-hookdeck"
4+
subcategory: ""
5+
description: |-
6+
Destination Data Source
7+
---
8+
9+
# hookdeck_destination (Data Source)
10+
11+
Destination Data Source
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `id` (String) ID of the destination
21+
22+
### Read-Only
23+
24+
- `auth_method` (Attributes) Config for the destination's auth method (see [below for nested schema](#nestedatt--auth_method))
25+
- `cli_path` (String) Path for the CLI destination
26+
- `created_at` (String) Date the destination was created
27+
- `description` (String) Description for the destination
28+
- `disabled_at` (String) Date the destination was disabled
29+
- `http_method` (String) must be one of ["GET", "POST", "PUT", "PATCH", "DELETE"]
30+
HTTP method used on requests sent to the destination, overrides the method used on requests sent to the source.
31+
- `name` (String) A unique, human-friendly name for the destination
32+
- `path_forwarding_disabled` (Boolean)
33+
- `rate_limit` (Attributes) Rate limit (see [below for nested schema](#nestedatt--rate_limit))
34+
- `team_id` (String) ID of the workspace
35+
- `updated_at` (String) Date the destination was last updated
36+
- `url` (String) HTTP endpoint of the destination
37+
38+
<a id="nestedatt--auth_method"></a>
39+
### Nested Schema for `auth_method`
40+
41+
Read-Only:
42+
43+
- `api_key` (Attributes) API Key (see [below for nested schema](#nestedatt--auth_method--api_key))
44+
- `aws_signature` (Attributes) AWS Signature (see [below for nested schema](#nestedatt--auth_method--aws_signature))
45+
- `basic_auth` (Attributes) Basic Auth (see [below for nested schema](#nestedatt--auth_method--basic_auth))
46+
- `bearer_token` (Attributes) Bearer Token (see [below for nested schema](#nestedatt--auth_method--bearer_token))
47+
- `custom_signature` (Attributes) Custom Signature (see [below for nested schema](#nestedatt--auth_method--custom_signature))
48+
- `hookdeck_signature` (Attributes) Hookdeck Signature (see [below for nested schema](#nestedatt--auth_method--hookdeck_signature))
49+
- `json` (String, Sensitive) Stringified JSON value for destination payload, used when Terraform provider hasn't supported the destination method on Hookdeck yet
50+
- `oauth2_authorization_code` (Attributes) OAuth2 Client Credentials (see [below for nested schema](#nestedatt--auth_method--oauth2_authorization_code))
51+
- `oauth2_client_credentials` (Attributes) OAuth2 Client Credentials (see [below for nested schema](#nestedatt--auth_method--oauth2_client_credentials))
52+
53+
<a id="nestedatt--auth_method--api_key"></a>
54+
### Nested Schema for `auth_method.api_key`
55+
56+
Read-Only:
57+
58+
- `api_key` (String, Sensitive) API key for the API key auth
59+
- `key` (String) Key for the API key auth
60+
- `to` (String) must be one of ["header", "query"]
61+
Whether the API key should be sent as a header or a query parameter
62+
63+
64+
<a id="nestedatt--auth_method--aws_signature"></a>
65+
### Nested Schema for `auth_method.aws_signature`
66+
67+
Read-Only:
68+
69+
- `access_key_id` (String, Sensitive) AWS access key id
70+
- `secret_access_key` (String, Sensitive) AWS secret access key
71+
72+
73+
<a id="nestedatt--auth_method--basic_auth"></a>
74+
### Nested Schema for `auth_method.basic_auth`
75+
76+
Read-Only:
77+
78+
- `password` (String, Sensitive) Password for basic auth
79+
- `username` (String) Username for basic auth
80+
81+
82+
<a id="nestedatt--auth_method--bearer_token"></a>
83+
### Nested Schema for `auth_method.bearer_token`
84+
85+
Read-Only:
86+
87+
- `token` (String, Sensitive) Token for the bearer token auth
88+
89+
90+
<a id="nestedatt--auth_method--custom_signature"></a>
91+
### Nested Schema for `auth_method.custom_signature`
92+
93+
Read-Only:
94+
95+
- `key` (String) Key for the custom signature auth
96+
- `signing_secret` (String, Sensitive) Signing secret for the custom signature auth. If left empty a secret will be generated for you.
97+
98+
99+
<a id="nestedatt--auth_method--hookdeck_signature"></a>
100+
### Nested Schema for `auth_method.hookdeck_signature`
101+
102+
103+
<a id="nestedatt--auth_method--oauth2_authorization_code"></a>
104+
### Nested Schema for `auth_method.oauth2_authorization_code`
105+
106+
Read-Only:
107+
108+
- `auth_server` (String) URL of the auth server
109+
- `client_id` (String) Client id in the auth server
110+
- `client_secret` (String, Sensitive) Client secret in the auth server
111+
- `refresh_token` (String, Sensitive) Refresh token already returned by the auth server
112+
- `scope` (String) Scope to access
113+
114+
115+
<a id="nestedatt--auth_method--oauth2_client_credentials"></a>
116+
### Nested Schema for `auth_method.oauth2_client_credentials`
117+
118+
Read-Only:
119+
120+
- `auth_server` (String) URL of the auth server
121+
- `authentication_type` (String) must be one of [basic, bearer]
122+
Basic (default) or Bearer Authentication
123+
- `client_id` (String) Client id in the auth server
124+
- `client_secret` (String, Sensitive) Client secret in the auth server
125+
- `scope` (String) Scope to access
126+
127+
128+
129+
<a id="nestedatt--rate_limit"></a>
130+
### Nested Schema for `rate_limit`
131+
132+
Read-Only:
133+
134+
- `limit` (Number) Limit event attempts to receive per period. Max value is workspace plan's max attempts thoughput.
135+
- `period` (String) must be one of ["second", "minute", "hour"]
136+
Period to rate limit attempts

docs/data-sources/source.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
# generated by https://github.com/hashicorp/terraform-plugin-docs
3+
page_title: "hookdeck_source Data Source - terraform-provider-hookdeck"
4+
subcategory: ""
5+
description: |-
6+
Source Data Source
7+
---
8+
9+
# hookdeck_source (Data Source)
10+
11+
Source Data Source
12+
13+
14+
15+
<!-- schema generated by tfplugindocs -->
16+
## Schema
17+
18+
### Required
19+
20+
- `id` (String) ID of the source
21+
22+
### Read-Only
23+
24+
- `allowed_http_methods` (List of String) List of allowed HTTP methods. Defaults to PUT, POST, PATCH, DELETE.
25+
- `created_at` (String) Date the source was created
26+
- `custom_response` (Attributes) Custom response object (see [below for nested schema](#nestedatt--custom_response))
27+
- `description` (String) Description for the source
28+
- `disabled_at` (String) Date the source was disabled
29+
- `name` (String) A unique, human-friendly name for the source
30+
- `team_id` (String) ID of the workspace
31+
- `updated_at` (String) Date the source was last updated
32+
- `url` (String) A unique URL that must be supplied to your webhook's provider
33+
34+
<a id="nestedatt--custom_response"></a>
35+
### Nested Schema for `custom_response`
36+
37+
Read-Only:
38+
39+
- `body` (String) Body of the custom response
40+
- `content_type` (String) must be one of [json, text, xml]
41+
Content type of the custom response

docs/resources/webhook_registration.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@
33
page_title: "hookdeck_webhook_registration Resource - terraform-provider-hookdeck"
44
subcategory: ""
55
description: |-
6-
Webhook Resource
6+
Webhook Registration Resource
77
---
88

99
# hookdeck_webhook_registration (Resource)
1010

11-
Webhook Resource
11+
Webhook Registration Resource
1212

1313
## Example Usage
1414

0 commit comments

Comments
 (0)