mariiador | 2024-04-16 13:31:31 UTC | #1
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
jacobshaw | 2024-04-16 20:20:51 UTC | #2
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: https://registry.terraform.io/providers/MyPureCloud/genesyscloud/latest/docs/resources/integration_credential
Your credentialtypename will be pureCloudOAuthClient and the fields will be clientId and clientSecret
mariiador | 2024-04-17 09:05:47 UTC | #3
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
jacobshaw | 2024-04-17 15:27:38 UTC | #4
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 TFVAR Examples can be found in several of the blueprints including this one https://github.com/GenesysCloudBlueprints/send-email-notification-when-outbound-message-fails-blueprint Also documented here https://developer.hashicorp.com/terraform/cli/config/environment-variables#tf_var_name
mariiador | 2024-04-18 07:14:06 UTC | #5
Thank you so much for helping, @jacobshaw
Best regards Mariia
system | 2024-05-18 07:14:07 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: 25737