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.tfas shown below (update theprofile,region, andpgp_keyvalues as appropriate).Note that a
pgp_keyis 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
XXXXfields below with your relevant valuesAWS_ACCESS_KEY_ID=XXXX AWS_SECRET_KEY=XXXX terraform init -
Build the resources:
terraform applyThis 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)
-