mariiador | 2024-04-15 08:39:26 UTC | #1
Hello all;)
Need a small help from you, I will give you an example to understand better what I need. I am in the process of creating a Data Action in Genesys Cloud through Terraform, and this Action has to be a part of chosen Integration, so I was wondering, if it is possible to connect this Integration to Action not with the id, but for example with the name? Example:
resource "genesyscloud_integration_action" "example-action" {
name = "Example Action"
category = "Genesys Cloud Data Action"
**integration_id = genesyscloud_integration.example_integ.id**
I hope you will understand my problem, I am looking forward to any help.
Best regards Mariia
charlie.conneely | 2024-04-15 09:06:19 UTC | #2
Hi @mariiador
You have to provide the ID of the integration to the data action. However, you can lookup the ID of the integration by providing the name to a data source. Here is an example:
resource "genesyscloud_integration_action" "action" {
name = "Example Action"
category = "Genesys Cloud Data Action"
integration_id = data.genesyscloud_integration.integration.id
data "genesyscloud_integration" "integration" {
name = "example integration name"
}
In this way, you only have to know the integration name. You don't have to know the ID or manage the integration under Terraform.
Hope this helps -Charlie
mariiador | 2024-04-15 09:27:49 UTC | #3
Hey Charlie,
thank you so much for your fast reply!
So this: data "genesyscloud_integration" "integration" { name = "example integration name" } is creating a new Integration or just gives me possibility to use the name for connecting?
Best regards Mariia
charlie.conneely | 2024-04-15 09:42:48 UTC | #4
The latter. It takes the name and searches through all the existing integrations in the org to find a match. If it finds a match, then it returns the ID of that integration. That is the purpose of data sources in Terraform - to use a unique identifier (name in this case, but it could even be a combination of other fields) to find the object and expose its GUID.
mariiador | 2024-04-15 09:47:50 UTC | #5
Ah, okay, I understand now. Thank you so much for your help!
Best regards Mariia
system | 2024-05-15 09:48:10 UTC | #6
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
This post was migrated from the old Developer Forum.
ref: 25702