Dell Infrastructure-as-a-code., Terraforming with Dell’s APEX Block Storage for AWS (PowerFlex 4.5 SDS)

Ambar Hassani
3 min readFeb 29, 2024

This blog is part of the Dell Infrastructure-as-a-code saga series. In my previous blog for Dell Infrastructure as a code, we explored the Terraform IaC provider for Dell PowerFlex 4.5 Software defined storage, which was installed in a hosted data center of Equinix.

In that same stride, I had also mentioned that PowerFlex SDS also runs as the core technology for Dell’s APEX Block Storage on Public clouds. If one is interested, then a greater comprehension on APEX Block Storage for AWS is available on these two blogs:

Dell APEX Block Storage for AWS — A Candidate for Database Workloads? Let’s Unpack.. (Part 1) — Itzikr’s Blog (volumes.blog)

Dell APEX Block Storage for AWS — A Candidate for Database Workloads? Let’s Unpack.. (Part 2) — Itzikr’s Blog (volumes.blog)

And an extremely insightful YouTube video that details a SQL server 2022 implementation using APEX Block Storage for AWS Dell Technologies APEX Block Storage for Public Cloud Multi-AZ Storage Resilience (youtube.com)

As a continued effort of IaC with PowerFlex SDS; we will in this blog experience Terraforming with Dell’s APEX Block Storage for AWS.

In doing so, we will also increment the use-case from the previous blog such that we will use Terraform to not only create the block volume but also map it to a ubuntu EC2 instance. It’s quite important to note that the terraform methodology is fully compatible with on-premises/co-located PowerFlex deployments as it’s a 100% parity solution offered on-premises or running as a Software Defined construct in AWS.

Let’s begin!

The entire demo is captured in this video that observes the creation of a block volume on APEX Block on AWS and maps it to the Ubuntu EC2 instance via Terraform.

For reference purposes, the configurations used in this demo are documented below. The demo configurations serve as starting point for the PowerScale Terraform provider. However, the possibilities are immense with the full range of capabilities documented on the Terraform site and Dell’s GitHub site.

Terraform variables.tf file.

variable "username" {
type = string
description = "Stores the username of PowerFlex host."
default = "admin"
}

variable "password" {
type = string
description = "Stores the password of PowerFlex host."
default = "Test@1234"
}

variable "endpoint" {
type = string
description = "Stores the endpoint of PowerFlex host. eg: https://10.1.1.1:443, here 443 is port where API requests are getting accepted"
default = "https://powerflex45-aws.edub.csc"
}

Terraform main.tf file.

terraform {
required_providers {
powerflex = {
version = "1.3.0"
source = "registry.terraform.io/dell/powerflex"
}
}
}
provider "powerflex" {
username = var.username
password = var.password
endpoint = var.endpoint
insecure = true
timeout = 120
}

resource "powerflex_volume" "volumes" {
count = 1
name = "dell-aws-${count.index}"
protection_domain_name = "default"
storage_pool_name = "default"
size = 8
use_rm_cache = true
volume_type = "ThinProvisioned"
access_mode = "ReadWrite"
}

resource "time_sleep" "wait_for_volume" {
create_duration = "20s"
depends_on = [powerflex_volume.volumes]
}

resource "powerflex_sdc_volumes_mapping" "mapping-test" {
depends_on = [time_sleep.wait_for_volume]
# SDC name
id = "59f89f5c00000000"
volume_list = [
{
volume_name = "dell-aws-0"
access_mode = "ReadWrite"
limit_iops = 120
limit_bw_in_mbps = 25
}
]
}

output "volumeid" {
value = [for volume in powerflex_volume.volumes : volume.id]
description = "PowerFlex Volume ID"
}

Happy Terraforming and PowerFlexing!

cheers,

Ambar@thecloudgarage.com

#iwork4dell

--

--

Ambar Hassani

24+ years of blended experience of technology & people leadership, startup management and disruptive acceleration/adoption of next-gen technologies