How to Use Terraform Provisioning and ParkMyCloud to Manage AWS

Image for post
Image for post

Did you know that one of the ways you can manage costs of AWS resources is with Terraform provisioning? It’s come up a lot lately in working with ParkMyCloud customers, and in learning from a variety of technical teams in various businesses, it’s clear that Hashicorp’s Terraform deserves a spot in your DevOps tool belt. Here’s how you can utilize this prominent player in “infrastructure as a code” -

If you don’t already know about terraforming, it’s pretty simple. Taking a text file, use it to create a finely detailed description of your infrastructure, then simply run “terraform apply” and let the magic happen. Update or roll back your terraform to make changes to your infrastructure. Use terraforming with AWS, Azure, VMware, Oracle, and a more as your universal tool for deployment and provisioning.

Utilizing Terraform Provisioning and ParkMyCloud with AWS Autoscaling Groups

In conjunction with ParkMyCloud for cloud governance and automated cost control, you can use Terraform as your main provisioning tool. But how does it all work when ParkMyCloud makes changes according to scheduling auto scheduling groups? Let’s take a closer look.

When an autoscaling group is “parked” by ParkMyCloud, the default settings for min/max/desired instances starts at 0/0/0, then sets “started” values according to the settings you personally selected for that group. By running “terraform apply” while the autoscaling group is parked, terraform will disagree with the default settings and instead apply the values you stated. The next time ParkMyCloud pulls from AWS (every 10 minutes), it will recognize the autoscaling group as started and stop it as it normally would.

If you change your min/max/desired settings in Terraform, ParkMyCloud will recognize the updated settings as the new “started” values, regardless of whether your autoscaling group was parked when you did the update. What this all means is that you can use Terraform to deploy and make changes to your autoscaling group, and use ParkMyCloud to park idle resources and save money.

Using Terraform to Get Started ParkMyCloud

If you’re already utilizing Terraform for AWS provisioning but haven’t taken advantage of ParkMyCloud for cost savings, then you can use Terraform to get started. This Terraform script can be used to create the appropriate IAM Role and Policy in your AWS account — just paste the ARN output into your ParkMyCloud account and you can easily set up. Make the most out of AWS with Terraform for provisioning and ParkMyCloud for saving money with ease!

Written by

CEO of ParkMyCloud

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store