• jcnetworking
  • LONDON
AWS
What do you mean by TERRAFORM

What do you mean by TERRAFORM

When you are using Cloud Services such AWS, AZURE, GCP or others. You would start create resources in their website. Which is quite convince YES and NO.

Yes – It is like magic, by ONE click. a Window / Linux Server has been created. then login by SSH

No – when you need to create numbers of resources. it is time consuming and HUMAN ERROR

Reason below, using terraform is good things

  • Saving you time -you don’t want to back and forward different pages to create resources
  • Tidy – when you create numbers of resources for 1 project. You may using tag to mark it for a project. When you forget delete 1 or 2 recourse on that project, it will cost you money.
  • Money – Money matters a lot. You don’t this happen on just 1 resource below (Figure 1.1)
Figure 1.1

____________________________________

TERRAFORM is power tool to manage your cloud resource infrastructure as code. You will create a folder for each project. Each project, you will have main.tf, vars.tf….etc. After you type “terraform init”, It will start working something at the backend. Before, you will need to connect with your AWS, Azure or others first. Let’s say we want to create 2 no. S3 storage bucket. 1 for general storage, another one is for log files.

Figure 2.1

________________________________________ ________________________________________

On image figure 3.1, you will see on my aws page, there is only one bucket which is my personal use bucket. on image Figure 3.2, scripting has been made. you will type “Terraform apply”, it will tell you base on your scripting what AWS infrastructure will change. Click Yes, 1,2 mins after, 2 extra bucket has been created.

Figure 3.1
Figure 3.2

________________________________________ ________________________________________ ________________________________________

When your scripting included a lot of different resources such as VPC, subnet, ec2, EFS, load balancer, Database….etc And you want to know what resources has been created per your scripting. You can type “terraform state list” , It will show you.

Like on figure 4.2 image, I got 1 bucket call (log_mybucket), another one call (mybucket), and modify a bucket public access.

Figure 4.1
Figure 4.2

Leave a Reply

Your email address will not be published. Required fields are marked *