Setting Zendesk Account Name for SSO integration via Terraform

Problem statement

After successfully applying the following Terraform resource, the Zendesk Account Name is empty. This article describes how to resolve this issue with Terraform.

resource "auth0_client" "zendesk" {
name = "ZenDesk"
description = "Zendesk"
app_type = "zendesk"
client_metadata = {
accountname = "myzendeskaccount"
}

Symptoms

Cannot get the account name to populate via Terraform.

Cause

The example in Terraform documentation shows Zendesk as an option in addons but does not elaborate on how to send the accountName parameter.

Solution

The accountName can be added by using the following Terraform syntax:

resource "auth0_client" "zendesk" {
  name = "ZenDesk"
  description = "Zendesk"
  app_type = "zendesk"
  addons {
    zendesk = {
      "accountName" = "myzendeskaccount"
    }
  }
}