| Redis Cloud |
|---|
This article covers Redis Cloud Bring your Own Cloud (BYOC) deployments. To learn more or get started with Redis Cloud BYOC, contact sales.
You can use HashiCorp Terraform to create identity and access management (IAM) resources to support AWS cloud account access to Redis Cloud subscriptions.
We use the provided credentials to configure your AWS environment and provision required resources.
You must not change the configurations of provisioned resources or stop or terminate provisioned instances. If you do, your databases will be inaccessible and Redis will not be able to ensure database stability. See Avoid service disruption for more details.
The following example uses the terraform-aws-Redislabs-Cloud-Account-IAM-Resources module, located in Amazon S3:
Copy the following code into a file called main.tf.
provider "aws" {
profile = "<profile>"
region = "<region>"
}
module "Redislabs-Cloud-Account-Resources" {
source = "https://iam-resource-automation-do-not-delete.s3.amazonaws.com/terraform-aws-Redislabs-Cloud-Account-IAM-Resources.zip"
pgp_key = "<pgp_key>"
}
output "accessKeyId" {
value = module.Redislabs-Cloud-Account-Resources.accessKeyId
}
output "accessSecretKey" {
value = module.Redislabs-Cloud-Account-Resources.accessSecretKey
sensitive = true
}
output "IAMRoleName" {
value = module.Redislabs-Cloud-Account-Resources.IAMRoleName
}
output "consoleUsername" {
value = module.Redislabs-Cloud-Account-Resources.consoleUsername
}
output "signInLoginUrl" {
description = "Redis User's console login URL"
value = module.Redislabs-Cloud-Account-Resources.signInLoginUrl
}
output "consolePassword" {
value = module.Redislabs-Cloud-Account-Resources.consolePassword
sensitive = true
}
Replace the following values in the main.tf file:
<profile>: The AWS CLI profile to use.<region>: The AWS region to use.<pgp_key>: The PGP key to use. For details, see the Terraform docs.Initialize Terraform with the module:
Note: Terraform requires AWS credentials be supplied, but the source of the module is a public S3 bucket, so any valid credentials should work.
AWS_ACCESS_KEY_ID=<access_key_id> AWS_SECRET_KEY=<secret_key> terraform init
Replace <access_key_id> and <secret_key> with valid AWS keys.
Build the resources and display the outputs:
terraform apply
You need the following information to create a Cloud Account in the Redis Cloud console:
accessKeyId output.accessSecretKey output:
echo $(terraform output -raw accessSecretKey)
IAMRoleName output.