Hello all,
I am trying to create an Integration in Genesys Cloud through Terraform. I need to have pureCloudOAuthClient connected to my Integration, can you please help how to correctly pass clientId and clientSecret to the Integration?
I will be very thankful for your answer
Mariia
Hi @mariiador
You can first create a credentials resource using genesyscloud_integration_credential
, then reference that resource in the credentials
field of your genesyscloud_integration
resource by passing in an object like this:
credentials = {
pureCloudOAuthClient = genesyscloud_integration_credential.<cred-resource-name>.id
}
An example of a genesyscloud_integration_credential
resource is documented here: Terraform Registry
Your credential_type_name will be pureCloudOAuthClient and the fields will be clientId and clientSecret
Hello @jacobshaw ,
thank you so much for your answer, but also an additional question. I donĀ“t really want to hard code clientId and clientSecret, maybe you can also give an advice how to solve this, it would be great;)
Best regards,
Mariia
Yes, it's better to supply those as variables in your project. You can assign environment variables to terraform variables using a .tfvars file or by prefixing the environment variable with TF_VAR_
Examples can be found in several of the blueprints including this one
Also documented here
Thank you so much for helping, @jacobshaw
Best regards
Mariia