Using the Pure Storage Cloud Block Store Terraform Provider for AWS

Share on:

Im excited to announce the first release of the Pure Storage Cloud Block Store (CBS) Terraform Provider. The first release introduces support for Cloud Block Store on AWS. Let’s dive in and take a look at how to utilize the new provider!

Overview

If you are not familiar with the Pure Cloud Block Store, it is a purpose build block storage system that currently sits in AWS and Azure. There are many benefits and use cases you can find out here.

Previously deployments of Cloud Block Store were done through a CloudFormations template which allowed it to be provisioned. We have had customers ask for better ways to streamline the deployment and the Terraform Provider was introduced. With the Terraform Provider a CBS instance on AWS can be provisioned in ~14 minutes!

Pre-Requisites

Hashicorp Terraform

  • This is used to automate the provisioning using a Terraform .TF file.

Amazon Web Services Account

  • This is the infrastructure to run the EC2 virtual machines.

AWS CLI

  • This is used to create AWS credential file for authentication.

Authentication Setup

To setup the AWS credential file open up your OS CLI and type the following command:

1aws configure

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

Cloud Block Store Deployment Setup

A link to the Cloud Block Store Deployment and Configuration Guide for AWS can be found here

Before CBS can be provisioned there is first a set of AWS pre-requisities that need to be configured.

These pre-requisities will be used in the terraform deployment in the next section.

Cloud Block Store Terraform Setup

Sample terraform files can be found here

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 paramters for a successful deployment.

Cloud Block Store Terraform Deployment

Run Terraform Initialize to Setup Provider

1terraform init

Run Terraform Plan to validate Terraform module and files.

1terraform plan

If successful, its now time to deploy!

1terraform 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.

Cloud Block Store Decommission

Currently, destroying the Terraform resource will not deactivate the CBS instance. The instance will have to be deactivated manually once the resource has been destroyed. Please see the deployment guide for information on how to remove CBS instances.

For version 5.3.0.aws0, 5.3.0.aws1, 5.3.0.aws2, Cloud Block Store 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+ this can be performed without Pure Storage Support involvement

Documentation for Removing Cloud Block Store on AWS

Closing

I have heard about the work being done internally on this and was excited to see the release today! Are you using Cloud Block Store 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 CBS with AWS, Azure, VMware Cloud on AWS and who knows what else!

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

comments powered by Disqus

See Also