Legacy Dev Forum Posts

 View Only

Sign Up

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

  • 1.  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

    Posted 06-05-2025 19:34

    siddd0542 | 2023-03-16 15:58:43 UTC | #1

    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 "genesyscloudarchitectuserprompt" "PromptName123" { 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 ?


    charlie.conneely | 2023-03-17 15:18:10 UTC | #2

    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.


    siddd0542 | 2023-03-17 16:25:57 UTC | #3

    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 "genesyscloudarchitectuserprompt" "TestPrompt" { 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


    charlie.conneely | 2023-03-20 10:15:08 UTC | #4

    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


    siddd0542 | 2023-03-20 11:43:51 UTC | #5

    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 "genesyscloudarchitectuserprompt" "TestPrompt" { 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


    charlie.conneely | 2023-03-21 10:09:38 UTC | #6

    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


    siddd0542 | 2023-03-21 12:22:51 UTC | #7

    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


    charlie.conneely | 2023-03-21 13:09:37 UTC | #8

    No problem. Glad it got resolved!


    This post was migrated from the old Developer Forum.

    ref: 18957