Skip to content

[wip] feat: dynamic content support #226

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 15 commits into
base: master
Choose a base branch
from
Draft

Conversation

nukosuke
Copy link
Owner

@nukosuke nukosuke commented Apr 19, 2022

@nukosuke nukosuke added this to the v0.1.0 milestone Apr 19, 2022
@nukosuke nukosuke self-assigned this Apr 19, 2022
@nukosuke nukosuke added the Resource Issues & PRs about Zendesk resources label Apr 19, 2022
@nukosuke
Copy link
Owner Author

nukosuke commented Apr 21, 2022

Manual test for create

dynamic_content_items.tf

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

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

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

  variant {
    locale  = "zh-tw"
    content = "繁體中文"
  }
}

terraform plan

Terraform used the selected providers to generate the following execution plan. Resource actions are indicated with the following symbols:
  + create

Terraform will perform the following actions:

  # zendesk_dynamic_content_item.loc-lang will be created
  + resource "zendesk_dynamic_content_item" "loc-lang" {
      + default_locale = "en-US"
      + id             = (known after apply)
      + name           = "language"

      + variant {
          + content = "English (US)"
          + default = false
          + locale  = "en-US"
        }
      + variant {
          + content = "日本語"
          + default = true
          + locale  = "ja"
        }
      + variant {
          + content = "繁體中文"
          + default = false
          + locale  = "zh-tw"
        }
    }

Plan: 1 to add, 0 to change, 0 to destroy.

apply

zendesk_dynamic_content_item.loc-lang: Creating...
zendesk_dynamic_content_item.loc-lang: Creation complete after 0s [id=xxxxxxxxxxxxx]

Apply complete! Resources: 1 added, 0 changed, 0 destroyed.

tfstate

{
  "version": 4,
  "terraform_version": "1.1.8",
  "serial": 1,
  "lineage": "344b53ff-4634-68ce-2d58-67414e8f1b26",
  "outputs": {},
  "resources": [
    {
      "mode": "managed",
      "type": "zendesk_dynamic_content_item",
      "name": "loc-lang",
      "provider": "provider[\"registry.terraform.io/nukosuke/zendesk\"]",
      "instances": [
        {
          "schema_version": 0,
          "attributes": {
            "default_locale": "ja",
            "id": "xxxxxxxxxxxxx",
            "name": "language",
            "variant": [
              {
                "content": "English (US)",
                "default": false,
                "locale": "en-US"
              },
              {
                "content": "日本語",
                "default": true,
                "locale": "ja"
              },
              {
                "content": "繁體中文",
                "default": false,
                "locale": "zh-tw"
              }
            ]
          },
          "sensitive_attributes": [],
          "private": "bnVsbA=="
        }
      ]
    }
  ]
}

Zendesk

スクリーンショット 2022-04-22 3 22 57

@nukosuke nukosuke force-pushed the feature/dynamic-content branch from 2efe27c to 92957b5 Compare April 22, 2022 18:31
@nukosuke nukosuke changed the title [wip] Dynamic content support [wip] feat: dynamic content support Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Resource Issues & PRs about Zendesk resources
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant