In this lesson learn about how to move your data into an external file of variable defaults so that you can easily manage your changes in one place.
- [Instructor] Now that we've looked … at variables and data sources … let's update our code using a pretty handy … built-in feature of the terraform command line tool, … which is the variable definitions file. … The way I like to tackle this kind of refactor work … is actually by duplicating my entire file. … So I'm going to copy prod.tf … and I'm going to copy that to the file … I'm converting to a data file. … So that's actually terraform.tfvars. … So I'm going to go through this file … and edit it down. … The goal here is to find anything we think … would work better as a variable. … Let's just open up the file. … I'm just going to work from top to bottom here … and I'll delete things as I go … that I don't think belong in the data file. … So we could separate out region as a variable … but I don't think that actually … makes a lot of sense for our use case, … so I'm going to delete that. … And the same could be said for the bucket name … but that's also a little bit cumbersome, I think, …
- Setting up Terraform
- How Terraform works
- Core Terraform commands
- Leveraging style conventions to keep code readable
- Configuring security groups
- Adding load balancers
- Using variables in your code
Skill Level Beginner
DevOps Foundations: Infrastructure as Codewith Ernest Mueller2h 6m Intermediate
1. First Steps with Terraform
2. Terraform in Action
3. Infrastructure as Code
4. Advanced Topics
Next steps3m 31s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.