From the course: Introduction to Terraform on Google Cloud Platform
Unlock the full course today
Join today to access over 23,400 courses taught by industry experts.
How Terraform works
From the course: Introduction to Terraform on Google Cloud Platform
How Terraform works
- [Instructor] At first glance, what Terraform does might not seem that complex. You're able to write some code to define some cloud resources, run a program, and it goes out and makes those things happen. So what makes Terraform different than a simple script that calls out to the Google Cloud API? Terraform lets you define your infrastructure as code and gives you a lot of flexibility in how you do that, because you can freely use data from one resource to define another. In a non-Terraform script, you might deploy a couple of web servers and a load balancer. If you want to add those to a firewall, your script will need to call out to Google Cloud, retrieve and process information describing those resources, and then take action to define your firewall. With Terraform, that kind of sharing of data is trivial. Your code can define resources based on the definitions of other resources, even if they don't exist yet. That last point is critical. Terraform figures out the hard part of…