Translation blueprint using terraform

Hi, trying to replicate this blueprint on my org:

I have an issue trying to run terraform. I have created my env variables for GC Client id, client secret and region, but for some reason terraform is not using them. See my screenshots:

I've tried to create the env vars in the windows system config, and also in the terraform directory by using these commands:

set GENESYSCLOUD_OAUTHCLIENT_ID=9ded................
set GENESYSCLOUD_OAUTHCLIENT_SECRET=Mj.........................
set GENESYSCLOUD_REGION=eu-west-1

Nothing seems to work. As you can see in the screenshots, no client id is sent in the terraform request. What's wrong with environment variables?
What exactly does the blueprint mean by "open a Terminal window and set the following environment variables"?. My set commands in the terraform directory should work, right?

Thanks

Are you sure you have the required permissions along with the role assigned to your OAuth client credentials?

Hi,

Depending on how you are creating your environment variables you might need to refresh the terminal in your code editor for it to know about the environment variables. I would suggest printing one or all of the environment variable before running any terraform commands to ensure they have been set correctly like so:

echo %GENESYSCLOUD_OAUTHCLIENT_ID%

If all else fails you can always set you credentials in the provider.tf file like so:

terraform {
  required_providers {
    genesyscloud = {
      source  = "mypurecloud/genesyscloud",
      version = ">= 1.X.0"
    }
  }
}

provider "genesyscloud" {
  oauthclient_id = "<client-id>"
  oauthclient_secret = "<client-secret>"
  aws_region = "<aws-region>"
}

Regards,
Declan

1 Like

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.