In this video, you will learn about using Terraform with OCI. Then in the next couple of videos, you will go into more details. Fundamentally, Terraform, as you understood earlier, can be used as a Cloud agnostic tool. When you want to create your Terraform script to be executed in an OCI environment there is a provider option you'll specify, wherein I have given here as an example, the provider is OCI, where you give the tenancy ocid, the user who's logging in, the public key, fingerprint of the API key, the private key of the API key, and the region to which you want to work with. In this example, all these are not literal values given. Instead, you can make use of variables in Terraform to consume these variables. Terraform variables can be in a separate PF file or you can declare it in a given PF configuration at the top and use them within the script. Just like using CLI, you give details about which tenancy, which user is logging in. The OCI provider that we have given here enables the script to execute and manage resources within that particular tenancy. Now, when you want to create resources or orchestrate resources in OCI, there is a specific syntax specification that has to be kept in mind. Each resource has a particular name as per the provider specification. In this example, I'm creating a VCN followed by a subnet and an Internet gateway within the VCN. Inside the Terraform configuration files, PF files, you would define the resources to be created by using the resource keyword, which tells this is a resource that you want to create or manage or destroy. The resource attributes can be set, when you are creating a VCN what is the size of block you want in which compartment do you want to set up. This is an example of a variable being used. What is the display name, DNS label you want for your VCN specifications? Look at the specifications given beyond in the following lines. I want to create a subnet and I am referring to the VCN by telling virtual Cloud network name, the VCN get its ID. Within one directory, if I have created a VCN by this name and another script is creating a subnet, it can pick the ocid of this VCN and create the subnet in it. Remember it is not necessary, all these would have to be in the correct sequence. Terraform will pick it up for you and builds a dependency graph to create the resources in a proper order. As for this example, it will create the VCN first. Then when it creates the subnet, it will get the ocid of the VCN that is created, which is what I have pointed here. Lastly, when the Internet gateway is created, it is also created inside this particular VCN. You also have the ability to fetch data of existing resources inside the tenancy, could be resources that you have created, or could be resources that OCI has already made available. It could be an example of what we are giving here, identity domains, availability domains to be picked up, or images to be picked up, etc. The type of data source you use will depend on your need. The data source gives you the ability to fetch data from OCI about existing resources either created by you or created by Oracle. Using this, you can populate values when you are creating a resource. Look at this example, I am creating a compute instance, and I'm choosing the availability domain that I want. From here, there is a list of availability domains for a particular compartment that is going to be listed and specify the source image from which I want to pick. I have given a particular reference in the list that would have been returned from here. I want to pick up the first image from the list that is captured and create a boot volume of this size. Terraform gives you the ability to define data sources and capture values which you can use in your resource creation as such. When you use Terraform, remember, you create Terraform configuration files, execute them by doing an apply. We'll come into that construct a little later about plan, apply and destroy. But when you create resources, OCI returns back for Terraform a state file. The state file basically contains information about the various resources including the ocid for whatever got created. As a result, the state is giving a binding between what you wanted to create and the actual objects that got created, so that when you make changes to the Terraform configuration and make changes, it knows which resource that you have created here is having which ocid so that it can make changes to the corresponding resource in OCI. It is very important you have your Terraform configuration file and state file together so that whenever you make changes to your Terraform configuration it can execute based on the current state of the resource. You create Terraform configuration files and execute as a result, the state files are created. You need to keep them both together. Now, there is the ability within Terraform to also perform remote execution by taking SSH connection on a compute instance, for example, where you may want to go and install something or configure something in the OS, it very much supports doing this task. Here is an example of null resource being the specification used and then perform remote execution using a bunch of commands. These are some of the important things that you need to remember when you use Terraform with OCI. In the next video, you will learn about how do you set up Terraform and how do you use Terraform in OCI in the next few videos.