Unable to publish flows containing settingsPrompt using Terraform

Hello,

I have been trying to configure our environment using Terraform, including our flows, specifically the commonModules.

When exporting an existing commonModule and trying to publish the exact same yaml using terraform it throws an error.

│ Error: flow publish failed. JobID: 6bc1c904-ce2d-47e8-8337-6129379a6c0a, tracing messages: setting the Archy exit code to 100
│ 
│ exception caught processing 'settingsPrompts' property in YAML: 
│ ensureAudioInPrompts: false
│ promptMediaToValidate:
│   mediaType: "none"
│ 
│ Exception: TypeError: Cannot set properties of undefined (setting 'promptMediaToValidate')
│     Path: '/commonModule'
│     Property name: 'settingsPrompts'
│ 
│ error(s) encountered.
│ 
│ exit code: 100 
│ 
│   with genesyscloud_flow.TerraformTestModule,
│   on flows_commonModules.tf line 6, in resource "genesyscloud_flow" "TerraformTestModule":
│    6: resource "genesyscloud_flow" "TerraformTestModule" {

Steps to reproduce:

  • Create basic commonModule using UI
  • Export .yaml file (results below)
commonModule:
  name: TerraformTestModule
  division: Home
  supportedLanguages:
    en-us:
      none: true
  settingsCommonModule:
    compatibleFlowTypes:
      - flowType: workflow
  settingsPrompts:
    ensureAudioInPrompts: false
    promptMediaToValidate:
      - mediaType: none
  startUpTaskActions:
    - endTask:
        name: Exit Common Module
  • Save yaml file in terraform project
  • Create genesyscloud_flow resource (see below)
resource "genesyscloud_flow" "TerraformTestModule" {
  filepath          = "./flows/TerraformTestModule.yaml"
  file_content_hash = md5(file("${path.module}/flows/TerraformTestModule.yaml"))
  force_unlock      = true
}
  • Remove existing flow in UI
  • Terraform apply (results in error while publishing)

Current workaround for us is to remove the settingsPrompt from the exported yaml. But everytime it is exported from the UI this setting comes back.

Is this a known issue or am I doing something wrong?

Hi @rvgate

Thanks for reporting this. I was able to recreate the bug locally.

We'll create a ticket and assign an engineer to work on this as soon as possible. In the meantime, we'll keep you posted on the progress, and if you have any questions, please don't hesitate to ask.

Regards,
Charlie

(Tracking with DEVTOOLING-600)

1 Like

Hi @rvgate
Looks like the UI is exporting the settingsPrompts section when it probably should not be. We will look into it further.

It seems that Archy is also exporting the settingsPrompts.

Hi, The UI and Archy use the same code for exporting flows, so we're planning to get a new release out as well for Archy with the fix

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.