While using Terraform to get the User prompts as export, not getting the .wav details in the file export getting only the name of the prompt

Hello Everyone,

While using Terraform to get the User prompts as export, not getting the .wav file in the file export getting only the name.

Below is the sample

resource "genesyscloud_architect_user_prompt" "Prompt_Name123" {
name = "Prompt_Name123"
resources {
language = "en-us"
}

While using this to migrate to other environment, I am not getting the .wav details in the ?
Tried to refresh the terraform objects but still in the export file getting the genesyscloud.tf file itself to use it to migrate.

Any inputs on how to fix this ?

Hello!

What version of the provider are you using? v1.11.1 addressed a bug in the audio prompt export process that looks very similar to what you are experiencing.

Hello Charlie,

I upgraded the provider version to 1.13.0 but still same issue.
The file is getting created but there is no audio in the file.

This is the export which I am getting when I try to export it from another environment.

resource "genesyscloud_architect_user_prompt" "Test_Prompt" {
name = "Test_Prompt"
resources {
language = "en-us"
}
}

The filename with Test_Prompt.wav that is not showing up in the export, I have to download it from the env and than put it inside the folder and then run the command post which its happening which I don't think is feasible since will have to download all the prompt files in that case.

Thanks,
Sid

A few questions:

  1. Is this the case for all user prompt resources being exported, or do some export correctly?
  2. Which OS are you using?

I'm unable to recreate this issue in my own environment, but hopefully we can diagnose the problem and get a fix out on the next release if necessary.

Thanks,
Charlie

Hi Charlie,

  1. Yes this is happening to all the user prompt resources being exported, I tried to with all the prompts and everything was same in the file. I tried to import few of them to another environment and only the name was being imported.
  2. I am using Windows 10

Steps to recreate the issue.
a)Export the User prompts from one environment the exported tf file contains the below
resource "genesyscloud_architect_user_prompt" "Test_Prompt" {
name = "Test_Prompt"
resources {
language = "en-us"
}
}

b) When trying to import this same in another tf file to another environment only the name gets imported under user prompts

c) When I get the Prompt file in my local and put in some folder and add the details of the file than it gets imported.

Thanks,
Sid

Hi Sid

I still have not been able to recreate the issue.

A few more questions:

  1. When exporting, do you see within your export folder the sub directory audio_prompts? The wav files should be dumped in here with the name format en-us-0c987383-8c2e-9876-abcd-e56241234567.wav
  2. Using one of your user prompts that definitely holds an audio file, when performing a request to GET /api/v2/architect/prompts/<promptID>, do you see a field called MediaUri? (Be sure to use the same credentials as in your terraform config)

Our provider is performing a GET request on this returned Media URI to download the file and write it in your export directory, so maybe there is something specific to your environment or credentials that is preventing you from performing this action. If you receive a media URI and search the link in your web browser, ideally the audio should pop right up on screen for you to play.

Thanks,
Charlie

Hi Charlie,

Thank you for looking into the issue with me.
I ran the export of prompts again and I could see that prompts are getting created under genesyscloud/audio_prompts with the naming convention which you have mentioned.

I had to update my Provider and than reboot my system post which it worked.
Thank you for all the help on this.

Thanks,
Sid

1 Like

No problem. Glad it got resolved!