The on-demand disk storage is an infrastructure pattern which consists in resizing a running instance's volumes, when they get to their maximum capacity or when the applications become very I/O heavy. While this is a manual process which requires some down time, in this tutorial we'll be using an IAC approach based onTerraform scripts, in order to create our initial infrastructure.
One of the key factors in DEVOPS movement is Infrastructure As Code (IAC) which represents an important shift in mindset, according to which everything is code, including infrastructure. While there are currently many tools allowing to perform IAC, this article is focusing on one of the most interesting of them: Terraform from Hashicorp (https://www.terraform.io/). Terraform is an open source provisioning tool which allows the IAC developer to define and create infrastructures elements and to deploy them in different clouds, be them AWS, Azure or GC. Other similar tools exist, like Amazon CloudFormation but, as opposed to Terraform, this tool only works with AWS.
The sample presented here for illustration purposes is based on the Yevgeniy Brikman’s excellent book “Terraform Up & Running”, published by O’Reilly Media Inc. in march 2017.