Introduction to Terraform

This topic is to discuss the following lesson:

Hi Rene ,

How do I set up the interface between my Cisco ASR920 and the Terraform platform?

BR//ZAMAN

Hello Zaman

In the lesson, by enabling RESTCONF and the HTTPS service on the router, Terraform is able to use the RESTCONF API to communicate with the router. If you want to find out how that connection is made, take a look at the RESTCONF section of this lesson here:

Once this is complete, Terraform will use HTTPS to communicate with the router, with the use of a URL as shown in the above lesson.

I hope this has been helpful!

Laz

Hello Laz,

Could you please explain what is AWS EC2 is it virtual machine or some component of VM or what exactly ?

Also as the lesson above we showed Rene worked in terraform on left and visual Studio on right my question, Is terraform works just by opening the terminal or do we have to do some setting ups to initialize Terraform, Also how the communication happened between the terminal and the Visual Studio as Rene were running the commands and script in each separately?

Regards.

Hello Ahmedlmad

AWS EC2 refers to Amazon’s Elastic Compute Cloud, which is part of Amazon’s cloud-computing platform, Amazon Web Services (AWS). Specifically, the EC2 is a VM that you can configure and “rent” based on the resources that you specify, and you can run your own applications on. More info about this can be found here:

Now, Rene, in his video, has shown two windows, one with Terraform and one with Visual Studio. Both of these run locally on the windows machine. As far as Terraform goes, when you define the resources you want, that’s when you specify how to connect to an AWS EC2 instance. This is done within the main.tf file. You must also download the required provider plugin using the Terraform init command using that info in the main.tf file.

Once that’s done, then your Terraform terminal is connected to your AWS resource. This is all shown within the lesson.

Now how about the interaction between Visual Studio and Terraform? VS Code is simply used to edit the Terraform config files (.tf files). There’s no direct integration or communication between the programs. VS Code is simply used as an editor. Does that make sense?

If you try out the lab and perform the steps one by one it should become clearer as to how this works and how the various parts interact.

I hope this has been helpful!

Laz

1 Like