Handling Environment-Specific Data Actions in Terraform for Genesys Cloud

Hello Everyone,

I have questions on CX as a code.

In Source

resource "genesyscloud_tf_export" "export_flow" {
directory = "./source"
export_as_hcl = true
log_permission_errors = true
include_state_file = false
enable_dependency_resolution = true
split_files_by_resource = false
include_filter_resources = ["genesyscloud_flow::FlowName"]
}
In the source region, I am exporting all the dependencies of the call flow. After the export, I copy all the generated resource files from the source folder to the target folder.

In Target

resource "genesyscloud_tf_export" "export_flow" {
directory = "./target"
export_as_hcl = true
log_permission_errors = true
include_state_file = true
enable_dependency_resolution = true
split_files_by_resource = false
include_filter_resources = ["genesyscloud_flow::FlowName"]
}

In the target region, I am exporting all the dependencies of the call flow along with the state file to track the existing dependencies in the target environment.
My call flow has several dependencies in both the source and target environments, including:

Data Actions
Datatables
User Prompts
Flow Outcomes
In-Queue Flows

How can I handle Data Actions?
In the source region, the Data Action has a different URL and Integration ID compared to the target region.

When I run terraform apply, it overrides the Data Action URL in the target region with the one from the source region, which is incorrect.

How can I ensure that the Data Action URLs and Integration IDs remain specific to their respective environments without being overwritten?

Hi @Klinton

I don't believe you need to have the domain in the request URL if you are making calls to the Genesys Cloud API. You can omit everything before /api/v2/... and the data actions should figure out the rest based on the integration.

If that does not help, using contract input variables in your data action can prevent from hard-coding org specific data.

Let me know if that advice isn't helpful. We may need to pull someone in with more knowledge on integration/action configuration. From a CX as Code perspective, there is not much we can do. The exporter will take a snapshot the entities in the source org and apply that to the target org. If the data action configs are hard-coded with org-specific data, then it's a matter of re-configuring them.

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