Create IAM resources using Terraform
You can use HashiCorp Terraform to create identity and access management (IAM) resources to support AWS cloud account access to Redis Cloud subscriptions.
The following example uses the terraform-aws-Redislabs-Cloud-Account-IAM-Resources
module, located in Amazon S3:
-
Create a
main.tf
as shown below (update theprofile
,region
, andpgp_key
values as appropriate).Note that a
pgp_key
is required. 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. Replace the
XXXX
fields below with your relevant valuesAWS_ACCESS_KEY_ID=XXXX AWS_SECRET_KEY=XXXX terraform init
-
Build the resources:
terraform apply
This displays the required values. To access the sensitive data:
-
accessSecretKey:
echo $(terraform output -raw accessSecretKey)
-
consolePassword:
echo $(terraform output -raw consolePassword | base64 --decode | keybase pgp decrypt)
-