From the course: Developing Infrastructure as Code with Terraform
Unlock this course with a free trial
Join today to access over 24,900 courses taught by industry experts.
Demo: Learning about Terraform state - Terraform Tutorial
From the course: Developing Infrastructure as Code with Terraform
Demo: Learning about Terraform state
- Okay, so I want to talk more about the Terraform state. It's a really critical piece of Terraform. So before we dive into the code examples and the Terraform syntax, I just want to make sure that you have an understanding of Terraform State. So again, it's a database, it's stored as a file. It tracks the resources that you've are managed by Terraform, it acts as the source of truth. So this is what allows Terraform to understand what it's already created, what it's managing, and what it expects the infrastructure to look like. The state requires special handling, right? So these are just some quick dos and don'ts when it comes to managing state. So do definitely store the state in a backend for any resources that you got deployed. It's important to store this in a backend. If the file, you know, if you're using a local state file and it gets deleted or corrupted, then Terraform no longer knows how to manage those resources, and you're going to have to go in and sort of manually…
Contents
-
-
-
-
-
(Locked)
Part II: Terraform basics1m
-
(Locked)
Learning objectives59s
-
(Locked)
Building your mental model: What is Terraform?5m 24s
-
(Locked)
Learning what Terraform is (what it is and is not)5m 7s
-
(Locked)
Demo: Learning about Terraform state8m 17s
-
(Locked)
Learning the Terraform features5m 26s
-
Discover if Terraform is multicloud2m 42s
-
(Locked)
Review: How did “Hello Terraform” work?6m 22s
-
(Locked)
-
-
-
-
-
-
-