-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #87 from DopplerHQ/km/webhooks
Add webhook resource
- Loading branch information
Showing
7 changed files
with
529 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
--- | ||
page_title: "doppler_webhook Resource - terraform-provider-doppler" | ||
subcategory: "" | ||
description: |- | ||
Manage a Doppler Webhook. | ||
--- | ||
|
||
# doppler_webhook (Resource) | ||
|
||
Manage a Doppler Webhook. | ||
|
||
## Example Usage | ||
|
||
```terraform | ||
resource "doppler_webhook" "ci" { | ||
project = doppler_project.test_proj.name | ||
url = "https://localhost/webhook" | ||
secret = "my signing secret-2" | ||
enabled = true | ||
enabled_configs = [doppler_config.ci_github.name] | ||
authentication { | ||
type = "Bearer" | ||
token = "my bearer token" | ||
} | ||
payload = jsonencode({ | ||
myKey = "my value" | ||
}) | ||
} | ||
``` | ||
|
||
<!-- schema generated by tfplugindocs --> | ||
## Schema | ||
|
||
### Required | ||
|
||
- `project` (String) The name of the Doppler project where the webhook is located | ||
- `url` (String) The URL of the webhook endpoint | ||
|
||
### Optional | ||
|
||
- `authentication` (Block List, Max: 1) Authentication method used by the webhook (see [below for nested schema](#nestedblock--authentication)) | ||
- `enabled` (Boolean) Whether the webhook is enabled or disabled. Default to true. | ||
- `enabled_configs` (Set of String) Configs this webhook will trigger for | ||
- `payload` (String, Sensitive) The webhook's payload as a JSON string. Leave empty to use the default webhook payload | ||
- `secret` (String, Sensitive) Secret used for request signing | ||
|
||
### Read-Only | ||
|
||
- `id` (String) The ID of this resource. | ||
- `slug` (String) The slug of the Webhook | ||
|
||
<a id="nestedblock--authentication"></a> | ||
### Nested Schema for `authentication` | ||
|
||
Required: | ||
|
||
- `type` (String) | ||
|
||
Optional: | ||
|
||
- `password` (String, Sensitive) | ||
- `token` (String, Sensitive) | ||
- `username` (String) | ||
|
||
## State Management | ||
|
||
For security reasons, the Doppler API does not return the fields listed below, which prevents the Terraform provider from checking this external state. | ||
In other words, the Terraform provider can be used to update these webhook fields but it will be unaware of external changes. | ||
|
||
- `secret` | ||
- `authentication` | ||
- `payload` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.