Shorticle 356 – Creating Cloud Agnostic IaC templates using Terraform templates
During cloud adoption, we would have repeated activity for Infrastructure provisioning activities which could be simple or complex when it comes for multiple environment provisioning. Hence automating this activity and reducing the manual effort in Infrastructure provisioning activities including compute, storage, network and security configurations helps to reduce the overall DevOps operational activities and improve the efficiency in engineering activities.
This kind of Infrastructure as Code (IaC) can be available as native facility in Azure as Azure Resource Manager (ARM) templates, AWS as CloudFormation templates and GCP as Google Deployment Manager (GDM) and they are in JSON format to prepare scripts for infrastructure provisioning and configuration.
But when we think of an agnostic solution for IaC for an multi-cloud environment, we can think of a solution like Hashicorp’s Terraform template which can be JSON (to export/reuse from native scripts) or YAML script based simplified solution which can be integrated to any Cloud Service Provider’s native deployment pipeline or third-party pipeline like Ansible to enable infrastructure provisioning activities on-the-go and flexible.
For large scale infrastructure creation to spin-up development or test instances during implementation cycle or to create Pre-production or production instances during horizontal scaling, it is easy to do with IaC with Terraform scripts which can be run with resource schedulers or create network configuration or secured environment setup for Software Defined Network (SDN) using Terraform templates.
Terraform scripts can be used to spin-up instances or to destroy environments for disposable temporary test environments in a cloud platform. Terraform templates can be validated before actual provisioning and hence terraform workflow has three steps viz Write (create terraform templates for IaC), Plan (preview the changes before actually applying in the cloud environment to validate) and Apply (to actually provision infrastructure quickly).
For a cloud agnostic solution like a multi-cloud architecture, it is easy to adapt Terraform templates for IaC to quickly create uniform setup and configuration for multiple environments and reduce complexity in creating multiple parallel scripts and reuse as much as possible between these scripts for each cloud service provider in the multi-cloud setup.
Though, there is a claim commonly available in internet which says Terraform is not cloud agnostic but a wrapper running on top of native cloud service for any cloud service provider.
For further read: https://www.terraform.io/intro/use-cases.html
#magtechbytes #wipro #shorticle #shorticlecloud