Terraform provision a Redis Cloud subscription with GCP
Please follow the instructions with the Terrafrom Provider for Redis Cloud: https://registry.terraform.io/providers/RedisLabs/rediscloud/latest/docs
Here are some prereqs to get you going:
- Download the
terraform
binary for your operating system (link), and make sure the binary is in yourPATH
environment variable.
To obtain Google Cloud service account credentials (often referred to as JSON key file) for your GCP project, follow these steps:
Navigate to the IAM & Admin page: Sign in to your Google Cloud Console: https://console.cloud.google.com/ Then, click on the menu icon ☰ in the upper left corner and navigate to IAM & Admin > Service accounts.
Select your project: Ensure that the correct project is selected from the project selector drop-down menu at the top of the page.
Either Create a new service account, or use an exisitng one:
Create a service account:
Click on the "+ CREATE SERVICE ACCOUNT" button. Enter a name and description for the service account. Click on the "CREATE" button.
Or use exisitng account: Find exisitng, click the three dots in the actions column, manage keys, add key (export to json)
Now you have your keyfile.json Go put that somewhere you will be able to get access to it. "/path/to/your/keyfile.json"
Follow these instructions https://docs.redis.com/latest/rc/api/get-started/manage-api-keys/
The terraform is very simple, not variables in this example, go fill in it in and spin it up! This assumes you already have a Redis Cloud account. The gcp_direct.tf has notes telling you to update values.