HeadlinesBriefing favicon HeadlinesBriefing.com

Terraform EBS Volume Creation Guide

DEV Community •
×

The Nautilus DevOps team is migrating infrastructure to AWS incrementally. For this step, they need to create an AWS EBS volume using Terraform. The task specifies a 2 GiB gp3 volume named 'nautilus-volume' in the us-east-1 region. This reflects a common pattern of breaking cloud migrations into manageable units to minimize operational disruption.

A Terraform configuration in `main.tf` uses data sources to find the default VPC and an available availability zone. The `aws_ebs_volume` resource defines the volume with the required type, size, and tags. This declarative approach ensures consistent, repeatable infrastructure provisioning across environments.

The deployment follows standard Terraform workflows: `terraform init` installs the AWS provider (v5.91.0), `terraform plan` previews the resource creation, and `terraform apply` executes it. The process completed successfully in about 10 seconds, creating the volume with ID `vol-3e6e15fb552e10e08`. This hands-on lab demonstrates practical IaC execution.