Hello all,
I asked this question already in one of the topics, but I still can not solve the problem. I need to connect Integration with pureCloudOAuthClient, but without hard coding the clientId and clientSecret. I will leave a piece of my code here and ask for help, it would be greate if some of you could help me;)
resource "genesyscloud_oauth_client" "example-client" {
name = "Example Data Actions Client"
access_token_validity_seconds = 86400
authorized_grant_type = "CLIENT-CREDENTIALS"
state = "active"
roles {
role_id = data.genesyscloud_auth_role.agent_role.id
division_id = data.genesyscloud_auth_division.division.id
}
}
data "genesyscloud_auth_role" "agent_role" {
name = "Master Admin"
}
data "genesyscloud_auth_division" "division" {
name = "Home"
}
resource "genesyscloud_integration" "integration" {
intended_state = "ENABLED"
integration_type = "purecloud-data-actions"
config {
name = "Test"
credentials = {
pureCloudOAuthClient = genesyscloud_integration_credential.credential.id
}
}
}
resource "genesyscloud_integration_credential" "credential" {
name = "credential"
credential_type_name = "pureCloudOAuthClient"
fields = {
clientId = genesyscloud_oauth_client.example-client.id
clientSecret = genesyscloud_oauth_client.example-client.clientSecret
}
}
I am looking forward to your replys
Best regards
Mariia