The Pure Storage Cloud Terraform Provider for AWS

I’m excited to announce the first release of the Pure Cloud Block Store™ Terraform Provider. The first release introduces support for Pure Cloud Block Store on AWS.

Cloud

A version of this post was originally published at davidstamen.com.

Pure Storage Cloud is a purpose-built block storage system that currently sits in AWS and Azure. It provides many benefits and serves many use cases.

Previously deployments of Pure Storage Cloud were done through a CloudFormations template that allowed provisioning. Some organizations wanted better ways to streamline deployment, so we introduced the Terraform Provider for AWS. With the Terraform Provider, you can provision a Pure Storage Cloud instance on AWS in about 14 minutes.

Let’s dive in and take a look at how to utilize the new TerraForm Provider.

Prerequisites for Terraform Provider on AWS

Authentication Setup for AWS

To set up the AWS credential file for the Pure Storage Cloud Terraform Provider for AWS, open your operating system command-line interface and type the following command:

aws configure

Enter in your AWS Access Key, AWS Secret Access Key, and Default AWS region. Once entered it will be saved in ~/.aws/credential

Deployment Setup for AWS

Note: Download Pure Storage Cloud Deployment and Configuration Guide for AWS.

Before you can provision Pure Storage Cloud on AWS, you need to configure a set of AWS prerequisites first by creating:

You’ll use these prerequisites in the Terraform deployment.

Setup: Pure Storage Cloud Terraform Provider

Note: Access sample Terraform files.

The samples have been variablized for ease of deployment. You should only need to edit the terraform.tfvars file with your parameters.

The documentation has an explanation for the cbs_array_aws resource parameters for a successful deployment.

Deployment: Pure Storage Cloud Terraform Provider

Run Terraform initialize to set up provider

terraform init

Run Terraform Plan to validate Terraform module and files.

terraform plan

If successful, it’s now time to deploy!

terraform apply

Once the deployment is complete you can run terraform show to see the output and identify the controller IP addresses.

Alternatively, you can log to AWS and look up your CloudFormation Stack for the deployment outputs.

Decommission: Pure Storage Cloud instances

Currently, destroying the Terraform resource will not deactivate the Pure Cloud Block Store instance. You’ll have to deactivate the instance manually once the resource has been destroyed. See the deployment guide for information on how to remove Pure Storage Cloud instances.

For version 5.3.0.aws0, 5.3.0.aws1, and 5.3.0.aws2, Pure Storage Cloud can only be removed (terminated) by Pure Support to ensure all the resources in the stack are cleanly removed. If you are on 5.3.3.aws0+ you can perform this without Pure Support involvement

Note: Documentation for Removing Cloud Block Store on AWS.

The Future of the Pure Terraform Provider

Are you using Pure Storage Cloud or looking to test it out? This Terraform Provider can easily streamline deployment and testing in your environments! Future posts will expand on use cases on how to use Pure Storage Cloud with AWS, Azure, VMware Cloud on AWS, and who knows what else!

If you have any additional questions or comments, please share them below!