Hello,
We are trying to use "CX as Code" to migrate our flows from the main to the DR environment. We are using (currently) the latest "genesyscloud" Terraform provider (v1.65.0). We are exporting flows with enable_dependency_resolution = trueattribute to export all dependent objects too.
We came up with two problems:
- When a flow contains integrations that have credentials, those credentials are not exported (understandably). However, when we try to apply the exported configuration against the DR environment, as well as against our main environment, we receive a warning in the Terraform plan stating that the integration credentials will be changed because
fields have been added.
Fields, however, point to an empty variable file, with a warning:
// This file has been autogenerated. The following properties could not be retrieved from the API or would not make sense in a different org e.g. Edge IDs
// The variables contained in this file have been given default values and should be edited as necessary
I presume that we have to add required fields for credentials in that variable file, but those are sensitive information, and we don't want to keep it in a plain-text file.
We tried to exclude genesyscloud_integration_credential attribute from genesyscloud_integration on export, but then it just gets replaced with null, which causes a new warning on apply, telling that the credential will be deleted from the integration, which will probably fail on the API because the credential is a required field.
Since integrations are referenced in the flow YAML file by name and integrations are already in place in the DR environment with the same name, our question is: Is it possible to export a flow using enable_dependency_resolution = true attribute, without exporting integrations? Note that we also use the include_filter_resources attribute in export configuration to determine which flows we want to export.
What would be the best practices in handling credentials and other sensitive information when exporting and applying changes?
- Because of the
enable_dependency_resolution = true attribute, we also get genesyscloud_architect_user_prompt resources exported with flows. The export includes WAV files, and they're correctly referenced in the Terraform configuration file, but it appears they're missing from the exported state file. So, on Terraform apply, we get the warning that the resource will be updated. Can this be fixed?

Thanks,
Vladan
#CXasCode------------------------------
Vladan Bjelovic
------------------------------