NewStuff series – dynamic VM shape resize in OCI with Terraform

I am trying to follow constantly updated release notes of OCI. Nearly every single day we have something new there, so sometimes it really hard to follow all of the news there. To read some theory is great, but test it is even greater… and harder, to be honest. So I was thinking it would be great to have a chance to watch this kind of testing on YouTube, especially with Terraform OCI Provider usage. To be sure Provider has been updated and it follows OCI’s Rest API changes. And you know what? I haven’t found such videos on YT! So…? So I have decided to record my own one. Pretty short in form. Just 3-5 minutes long. And here is the first one. It is about a new compute instance feature – dynamic VM shape resize. No more compute instance migration, no more compute instance re-provisioning. Just a couple of minutes to restart. And that is all! This elasticity is great!

Bon Appetit,

Martin, The Cook.

OCI Terraform Provider – code and state file generator…

During the last HashiConf2019 I was watching these two guys from Oracle Cloud Infrastructure (OCI) and their presentation which was really interesting. Now you can watch it online (check-up the link below). Alex Ng and Leon Kuperman have presented approaching features of OCI Terraform Provider. This new feature seems to be the perfect option for early adopters of OCI which has build their infra directly from UI and now they want to switch their approach into DevOps and Infrastructure as Code concept. New OCI Terraform Provider will be capable to introspect compartment in OCI via RestAPI and generate Terraform code on the fly for all of your VCNs, subnets, compute and DBSystems. Then you can also create a proper Terraform’s state file that will consist of all data. Since that moment you can forget about your OCI Console and continue just with Terraform code 🙂

Bon Appetit,

Martin, The Cook.

UPDATE (5-Nov-2019): With Provider 3.5 discovery has been finally enabled: “Beginning with version 3.50, the terraform-oci-provider can be run as a command-line tool to discover resources that have been created within Oracle Cloud Infrastructure compartments and generate Terraform configuration files for the discovered resources.” 

More details under this link: https://www.terraform.io/docs/providers/oci/guides/resource_discovery.html

Introduction to Terraform Cloud

Last week, in Seattle I was attending an annual conference organized by HashiCorp. This year during HashiConf 2019, a new Terraform Cloud has been announced. TFCloud2What does it mean from your perspective? Of course, it depends on what is your current professional position, but if you are a part of a small team, let’s say, up to 5 infrastructure developers, it is the right time to learn more about Terraform Cloud, especially Terraform Cloud Free Tier.

I am more than sure that during the last few years you have installed terraform by yourself on VM in your DataCenter, your own computer or even in the cloud. Of course, it had been not very complicated, but since that moment problems have started to arise as you wanted to collaborate on the code with someone else. To make the story short the most complicated topic was your Terraform state file. How to exchange that state file securely with someone else, especially when your teammates are located in a different physical location. How to do it without risk of inconsistency? Yet another question is related to code itself. How to track and control versions of HCL code? Of course, the local git server can be an option, but the ultimate question is how to integrate all of that with some CD/CI pipeline to streamline infra provisioning in a secure way.

TFCloudFreeTierAll of these questions seem to be answered in Terraform Cloud. One more thing – for up to 5 developers it will be for free! Awesome, isn’t it?

This blog post is just an introduction. My plan here is to write a series of blog posts about Terraform Cloud features which include Remote State Storage (for state files), support for Organisations, Workspaces, Teams, and Users. Next, I will write about the remote plan and apply workflow plus a couple of details regarding the Private Modules Repository. For your information, all of that will be integrated with GitHub repositories which give us real Version Control Services (VCS) capability in Terraform Cloud.

Martin.

PS. Just a few days ago HashiCorp has published videos from the HashiConf2019. Here you can watch keynote by Armon Dadgar about Terraform Cloud.