In this video, you will learn about three important commands that one would use in a terraform environment. They are as follows. There is the ability to use, plan, then apply, and lastly, destroy. The way it works is, let's say you have created a directory with various terraform configuration files, which we call as the.tf When you execute the terraform plan command, it will give an output in terms of what will terraform do with the current configuration files, depending on the state of the existing sources, it might change certain resources or destroy resources depending on whatever you are doing. Now, when you look at the terraform configuration file and if you are executing it for the first time, it will result in creating resources. But if you make changes, then it will orchestrate in such a way that makes the corresponding changes. Plan is not going to do the actual task. Instead, it will only tell you what we'll terraform do, if you apply it. Thus from a plan, you know, with the current terraform configuration files you have what is terraform going to do. It takes care of the order in which it will create or manage the resources. When you do an apply, that is when it will actually orchestrate the resources and will give you the output of what it has done. A state file will be created as a result of the apply command because the state file will have the details about what resources God created so that the terraform configuration and the state file are together giving the current state of the configuration that you have. Whenever you want to terminate resources, you can use the destroy command along with the configuration file, from the state file it will pick up the resource identifiers and it will take care of terminating the resources in the appropriate order. Thus, these are the three commands one would typically use in a terraform environment. An example here is given as to once I have a terraform configuration in place from within the same directory, if I execute terraform plan, this will give me the list of resources that it is going to deploy or orchestrate. It will take care of the dependency between the resources, even though the files are just one configuration file or a collection of configuration file, it takes and identifies the order in which they have to be created. The plan itself is only for the person's review of what this configuration will do. As a result of the plan command what all terraform will do will be given. At the end, it gives you the plans States 34 resources will be added, no changes and no destroy will be done as part of this plan. The whole idea is it will give you what is this configuration going to do if you do one apply. Once you are okay with the plan, you can go and do one terraform apply from within the same directory. Now is when it will again generate a plan. If you do not apply a plan, you have an option to apply a plan directly by giving the plan detail in this command. But in this case, I have not applied a plan. I'm just running apply, it will again generate a plan. It will prompt you to tell, do you want to go ahead with the plan? If you say yes, as I have given in this slide, it will result in creating all the resources and tells you all the 34 resources that were to be added asked for that configuration are created. The result of this example, it created various resources including a load balancer, which is a public load balancer. It is giving you the output of the public IP of that load balancer. Once this is available and in use, the state file is in your terraform configuration location and it runs fine. The day you decide you no more need this configuration, all the resources can be destroyed. You can just run the terraform destroy command from within the same location. It will tell you, first of all, what all it is going to destroy. This will take care of ordering the deletion in the correct order. For example, if there are compute instances in a VCM if you will terminate the compute instance first and then deleted the VCM. As a result of the destroy command first it is going to tell you, "Hey, as for the destroy command, this is the plan I have, and are you sure you want to destroy?" Once you tell, yes, by typing out and giving an enter the prompt for enter value is given. Then it will go about terminating all the resources and tells you the confirmation that all these resources are destroyed. This is a basic overview about how you would use terraform in any environment and you could set up terraform in any computer and create configuration files. Configure the OCI provider with the connection details and execute. But what I will be showing you is not normal terraform in a compute instance. Instead, in the next video, you will understand about OCIs resource manager, and it is basically terraform as a service. We will see some examples of using resource manager later in another video.