Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions docs/resources/dynamic_content_item.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,21 @@ Provides a dynamic content item resource.
# https://developer.zendesk.com/api-reference/ticketing/ticket-management/dynamic_content/

resource "zendesk_dynamic_content_item" "loc-lang" {
name = "language"
default_locale = "en-us"
name = "language"
default_locale = "en-US"

variant {
locale = "en-us"
locale = "en-US"
content = "English (US)"
}

variant {
locale = "ja"
content = "日本語"
default = true
}

variant {
active = false
locale = "zh-tw"
content = "繁體中文"
}
Expand All @@ -45,11 +45,11 @@ resource "zendesk_dynamic_content_item" "loc-lang" {

- `default_locale` (String) The default locale for the item. Must be one of the [locales the account has active](https://developer.zendesk.com/api-reference/ticketing/account-configuration/locales/#list-locales).
- `name` (String) The unique name of the item.
- `variant` (Block Set, Min: 1) Variant within this item. (see [below for nested schema](#nestedblock--variant))

### Optional

- `id` (String) The ID of this resource.
- `variant` (Block Set) Variant within this item. (see [below for nested schema](#nestedblock--variant))

<a id="nestedblock--variant"></a>
### Nested Schema for `variant`
Expand All @@ -61,6 +61,6 @@ Required:

Optional:

- `active` (Boolean) If the variant is active and useable.
- `default` (Boolean) If the variant is the default for the item it belongs to.


4 changes: 2 additions & 2 deletions docs/resources/organization.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "zendesk_organization Resource - terraform-provider-zendesk"
subcategory: ""
description: |-
Provides an organization resource.
[Beta] Provides an organization resource.
---

# zendesk_organization (Resource)

Provides an organization resource.
[Beta] Provides an organization resource.



Expand Down
4 changes: 2 additions & 2 deletions docs/resources/sla_policy.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "zendesk_sla_policy Resource - terraform-provider-zendesk"
subcategory: ""
description: |-
Provides a SLA policy resource.
[Experimental] Provides a SLA policy resource. This feature is still experimental and has not been fully tested. Do not use in production environments.
---

# zendesk_sla_policy (Resource)

Provides a SLA policy resource.
[Experimental] Provides a SLA policy resource. This feature is still experimental and has not been fully tested. Do not use in production environments.

## Example Usage

Expand Down
4 changes: 2 additions & 2 deletions docs/resources/target.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,12 @@
page_title: "zendesk_target Resource - terraform-provider-zendesk"
subcategory: ""
description: |-
Provides a target resource. (HTTP target is deprecated. See https://support.zendesk.com/hc/en-us/articles/4408826284698 for details.)
[Beta] Provides a target resource. (HTTP target is deprecated. See https://support.zendesk.com/hc/en-us/articles/4408826284698 for details.)
---

# zendesk_target (Resource)

Provides a target resource. (HTTP target is deprecated. See https://support.zendesk.com/hc/en-us/articles/4408826284698 for details.)
[Beta] Provides a target resource. (HTTP target is deprecated. See https://support.zendesk.com/hc/en-us/articles/4408826284698 for details.)

## Example Usage

Expand Down
89 changes: 89 additions & 0 deletions docs/resources/webhook.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
---
# generated by https://github.com/hashicorp/terraform-plugin-docs
page_title: "zendesk_webhook Resource - terraform-provider-zendesk"
subcategory: ""
description: |-
[Experimental] Provides a webhook resource. This feature is still experimental and has not been fully tested. Do not use in production environments.
---

# zendesk_webhook (Resource)

[Experimental] Provides a webhook resource. This feature is still experimental and has not been fully tested. Do not use in production environments.

## Example Usage

```terraform
# API reference:
# https://developer.zendesk.com/api-reference/event-connectors/webhooks/webhooks/

resource "zendesk_webhook" "example-webhook" {
name = "Example Webhook without authentication"
endpoint = "https://example.com/status/200"
http_method = "GET"
request_format = "json"
subscriptions = ["conditional_ticket_events"]
}

resource "zendesk_webhook" "example-basic-auth-webhook" {
name = "Example Webhook with Basic Auth"
endpoint = "https://example.com/status/200"
http_method = "POST"
request_format = "json"
subscriptions = ["conditional_ticket_events"]

authentication {
type = "basic_auth"
add_position = "header"
data = jsonencode({
token = "xxxxxxxxxxx"
username = "john.doe"
password = "password"
})
}
}

resource "zendesk_webhook" "example-bearer-token-webhook" {
name = "Example Webhook with Bearer token"
endpoint = "https://example.com/status/200"
http_method = "POST"
request_format = "json"
subscriptions = ["conditional_ticket_events"]

authentication {
type = "bearer_token"
add_position = "header"
data = jsonencode({
token = "xxxxxxxxxx"
})
}
}
```

<!-- schema generated by tfplugindocs -->
## Schema

### Required

- `endpoint` (String) The destination URL that the webhook notifies when Zendesk events occur.
- `name` (String) Webhook name.

### Optional

- `authentication` (Block Set, Max: 1) Authentication data that enables the integration with the destination system. Supports basic authentication and bearer token authentication. (see [below for nested schema](#nestedblock--authentication))
- `description` (String) Webhook description.
- `http_method` (String) The HTTP method used by the webhook. Allowed values are "GET", "POST", "PUT", "PATCH", or "DELETE". Default is "POST"
- `id` (String) The ID of this resource.
- `request_format` (String) The format of the data that the webhook will send. Allowed values are "json", "xml", or "form_encoded". Default is "json"
- `status` (String) Current status of the webhook. Allowed values are "active" or "inactive". Default is "active".
- `subscriptions` (Set of String) Zendesk event subscriptions. Allowed value is "conditional_ticket_events".

<a id="nestedblock--authentication"></a>
### Nested Schema for `authentication`

Required:

- `add_position` (String) Where to add credentials. Allowed value is only "header" currently.
- `data` (String, Sensitive) Authentication data as JSON string. This field generally includes credentials username and password for "basic_auth", token for "bearer_token".
- `type` (String) Authentication type. Allowed values are "basic_auth" or "bearer_token".


44 changes: 44 additions & 0 deletions examples/resources/zendesk_webhook/resource.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# API reference:
# https://developer.zendesk.com/api-reference/event-connectors/webhooks/webhooks/

resource "zendesk_webhook" "example-webhook" {
name = "Example Webhook without authentication"
endpoint = "https://example.com/status/200"
http_method = "GET"
request_format = "json"
subscriptions = ["conditional_ticket_events"]
}

resource "zendesk_webhook" "example-basic-auth-webhook" {
name = "Example Webhook with Basic Auth"
endpoint = "https://example.com/status/200"
http_method = "POST"
request_format = "json"
subscriptions = ["conditional_ticket_events"]

authentication {
type = "basic_auth"
add_position = "header"
data = jsonencode({
token = "xxxxxxxxxxx"
username = "john.doe"
password = "password"
})
}
}

resource "zendesk_webhook" "example-bearer-token-webhook" {
name = "Example Webhook with Bearer token"
endpoint = "https://example.com/status/200"
http_method = "POST"
request_format = "json"
subscriptions = ["conditional_ticket_events"]

authentication {
type = "bearer_token"
add_position = "header"
data = jsonencode({
token = "xxxxxxxxxx"
})
}
}
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ go 1.17
require (
github.com/golang/mock v1.6.0
github.com/hashicorp/terraform-plugin-sdk/v2 v2.14.0
github.com/nukosuke/go-zendesk v0.11.2
github.com/nukosuke/go-zendesk v0.12.0
)

require (
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,8 @@ github.com/mitchellh/reflectwalk v1.0.2/go.mod h1:mSTlrgnPZtwu0c4WaC2kGObEpuNDbx
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e/go.mod h1:zD1mROLANZcx1PVRCS0qkT7pwLkGfwJo4zjcN/Tysno=
github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce h1:RPclfga2SEJmgMmz2k+Mg7cowZ8yv4Trqw9UsJby758=
github.com/nsf/jsondiff v0.0.0-20200515183724-f29ed568f4ce/go.mod h1:uFMI8w+ref4v2r9jz+c9i1IfIttS/OkmLfrk1jne5hs=
github.com/nukosuke/go-zendesk v0.11.2 h1:dbt+qjSpbeDjS7TL9zMqrvvHFVDTCkfQ/GaKYNFYfkY=
github.com/nukosuke/go-zendesk v0.11.2/go.mod h1:FMC25ZV0/fo2kP9c0jleOmSoKsKmTdnycPkyQCkiykI=
github.com/nukosuke/go-zendesk v0.12.0 h1:28uiIHZwS5UkZnBOvJXXOeD6MXu3skF/RQjw7FlNWsg=
github.com/nukosuke/go-zendesk v0.12.0/go.mod h1:FMC25ZV0/fo2kP9c0jleOmSoKsKmTdnycPkyQCkiykI=
github.com/oklog/run v1.0.0 h1:Ru7dDtJNOyC66gQ5dQmaCa0qIsAUFY3sFpK1Xk8igrw=
github.com/oklog/run v1.0.0/go.mod h1:dlhp/R75TPv97u0XWUtDeV/lRKWPKSdTuV0TZvrmrQA=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
Expand Down
1 change: 1 addition & 0 deletions zendesk/provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func Provider() *schema.Provider {
"zendesk_attachment": resourceZendeskAttachment(),
"zendesk_organization": resourceZendeskOrganization(),
"zendesk_sla_policy": resourceZendeskSLAPolicy(),
"zendesk_webhook": resourceZendeskWebhook(),
},

DataSourcesMap: map[string]*schema.Resource{
Expand Down
2 changes: 1 addition & 1 deletion zendesk/resource_zendesk_organization.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
// https://developer.zendesk.com/rest_api/docs/support/organizations
func resourceZendeskOrganization() *schema.Resource {
return &schema.Resource{
Description: "Provides an organization resource.",
Description: "[Beta] Provides an organization resource.",
CreateContext: func(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
zd := meta.(*client.Client)
return createOrganization(ctx, d, zd)
Expand Down
2 changes: 1 addition & 1 deletion zendesk/resource_zendesk_sla_policy.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// https://developer.zendesk.com/api-reference/ticketing/business-rules/sla_policies/
func resourceZendeskSLAPolicy() *schema.Resource {
return &schema.Resource{
Description: "Provides a SLA policy resource.",
Description: "[Experimental] Provides a SLA policy resource. This feature is still experimental and has not been fully tested. Do not use in production environments.",
CreateContext: func(ctx context.Context, d *schema.ResourceData, i interface{}) diag.Diagnostics {
zd := i.(client.SLAPolicyAPI)
return createSLAPolicy(ctx, d, zd)
Expand Down
2 changes: 1 addition & 1 deletion zendesk/resource_zendesk_target.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
// https://developer.zendesk.com/rest_api/docs/support/targets
func resourceZendeskTarget() *schema.Resource {
return &schema.Resource{
Description: `Provides a target resource. (HTTP target is deprecated. See https://support.zendesk.com/hc/en-us/articles/4408826284698 for details.)`,
Description: `[Beta] Provides a target resource. (HTTP target is deprecated. See https://support.zendesk.com/hc/en-us/articles/4408826284698 for details.)`,
CreateContext: func(ctx context.Context, d *schema.ResourceData, meta interface{}) diag.Diagnostics {
zd := meta.(*client.Client)
return createTarget(ctx, d, zd)
Expand Down
Loading