I´m using Terraform "genesyscloud_flow" resource to publish architect flows in Genesys Cloud. And I would like to use typical archy External References and Substitutions using additional YAML files.
I tried to use an external reference with this form <file_path>#<yaml_path> and I locate my external referenced file inside my terraform directory. This is the error message i get for an Archy exit code 101:
"Exception info: invalid reference - the file path '.././references/IntentBotCases.yaml' resolved to '/var/task/https:/prod-archy-jobs.s3.amazonaws.com/archy/flows/references/IntentBotCases.yaml' which does not exist."
If anyone knows if this two features are available for "genesyscloud_flow" resource, or anyone can help me to use them, I will appreciate.
Sorry about this. It appears this post had fallen through the cracks. Here is what I think is happening. The genesyscloud_flow can only process:
Archy file at a time. So you can not have an external reference to another architect file and have it automatically picked up. Instead, you need to make sure that map out the file dependencies between the architect flow and upload them each individually with the appropriate depends_on in the genesyscloud_flow declarations. So if A depends on B, you have to use define 2 genesyscloud_flows resource and makes sure B depends_on explicitly.
We do not currently support the Archy CLI variable substitution for substituting variables in the Archy flow. Terraform already supports variable substitution and file transformation natively and we opted to leave out the archy mechanism separately. Here is an example of where we do a variable substitution in an architect flow using terraform:
Here we have two variables we are substituting here. If you look in this file you will see two variables called ${integration_category } and ${ integration_data_action_name}.
I spoke a little soon in my solution. I was reviewing my "local_file" example and am seeing some inconsistent behavior with the provider. I am going to talk with the dev ton the resource provider omorrow so please do not take #2 as the right solution just yet :).
Thanks,
John Carnell
Manager, Developer Engagement
I just wanted to follow up with you. Per my previous email using a local_file to do variable substitution on Archy flows turned out to be problematic because Terraform builds its dependency graph and does change detection before it starts applying any changes. So the local_file resource will transform a file and inject variables, but the Archy flow will not detect that the flow has actually changes. The quick (and ugly) solution is to run Terraform twice and that will ensure that the injection of values in Archy get picked up.
My team has just finished a change that will allow for you to define variable substitution values directly in the Terraform provider. This will eliminate this problem. We should have a new version of the flow component available by sometime next week.
Thanks,
John Carnell
Manager, Developer Engagement