Get started with Pulumi

Shows how to install the Redis Cloud Pulumi provider and create a subscription.

Here, you'll learn how to use the Redis Cloud Pulumi provider to create a Redis Cloud Pro subscription and a database using Python.

Prerequisites

  1. Install Pulumi and create a Pulumi account if you do not have one already.

  2. Create a Redis Cloud account if you do not have one already.

  3. Enable the Redis Cloud API.

  4. Get your Redis Cloud API keys.

Install the Pulumi provider files

  1. In your Python project, create an empty folder. From this folder, run pulumi new rediscloud-python.

  2. Log into Pulumi using your Pulumi access token if prompted.

  3. Enter a project name, description, and stack name.

  4. Enter your Redis Cloud access and secret keys.

  5. Enter the credit card type (Visa, Mastercard) on file with your Redis Cloud account.

  6. Enter the last four numbers of the card on file with your Redis Cloud account.

Once these steps are completed, the dependencies needed for the project will be installed and a Python virtual environment will be created.

Deploy resources with Pulumi

The Pulumi Python project includes three main files:

  • pulumi.yaml : A metadata file which is used to help configure the Python runtime environment.

  • pulumi.YOUR_PROJECT_NAME.yaml: Contains the information related to the Cloud API access and secret key, credit card type and last 4 digits.

  • __main__.py: A Pulumi template file that creates a Redis Cloud Pro subscription. Use this template file as a starting point to create the subscription with a cloud provider and define specifications for the database (this includes memory, throughput, Redis advanced capabilities, and other information).

To deploy the resources described in __main__.py, run pulumi up. This will take some time. You will be able to see your subscription being created through the Redis Cloud console.

If you want to remove these resources, run pulumi down.

More info

RATE THIS PAGE
Back to top ↑