Set Up Multi Cloud Infrastructure using Terraform (IaC)
Terraform to integrate AWS and GCP clouds to Setup Multi Cloud Insfrastructure
This is my first article on medium but this doesn’t matter, so let’s get started with the article. In this article, I am gonna show you how we can setup a Multi-Cloud infrastructure using Terraform. So let me quickly give you a high overview of the setup we gonna do in this.
In this, we will use Google Cloud Platform (GCP) and AWS clouds for multi-cloud architecture. In GCP we will create a Kubernetes cluster using the Google Kubernetes Engine (GKE) and then deploy an application like wordpress, owncloud etc on top of it. And in the AWS cloud we will use its Relational Database Service (RDS) to launch a MySQL database. Then we use RDS as a Backend database for the application (Frontend) running on GKE and connect both of them. And since we are using two different public clouds one as a backend and other as a frontend, so that’s why it is known as Multi-Cloud Architecture.
But Since both are Public Clouds, so we have to give public connectivity to connect both the clouds. And we are launching the database in the AWS cloud and also giving public connectivity which is not a good practice and generally we launch the database in some Private Clouds like OpenStack. So in this article, I will also show you a way by which we can make our database secure and restrict its connectivity.
And we will not set up this infrastructure manually means by going to the AWS and GCP websites/WebUI and then just launch the things. we will write the code for each and every resource used to setup this infrastructure and this approach is known as Infrastructure as Code (IaC) and for IaC we will use Terraform. So before we start let me quickly brief you about Terraform and why we are using it.
What is Terraform ?
Terraform is an open-source infrastructure as code software tool created by HashiCorp. Users define and provision data center infrastructure using a declarative configuration language known as HashiCorp Configuration Language (HCL), or optionally JSON.