Terraform Basics: Local Values

preview_player
Показать описание
One of the more underrated features of Terraform is local values. They are internal variables you can use throughout your configuration to help you practice DRY programming. Let's take a look at what local values are, how they are different from input variables, and when you would use them.

-----------------------------------------------------------------------------------------------------

Music by Evan Williams ©2020

Timestamps
0:00 Intro
1:34 What are local values?
4:14 Local value use cases
6:39 Local value syntax
8:54 Local value organization
10:45 Local value demonstration
16:30 Summary
17:11 Outro
Рекомендации по теме
Комментарии
Автор

Can you please tell which VSCode extension you use for Terraform and what's the configuration.

macdilen
Автор

Can you please cover the topic of using Atlantis and Chekhov? It’s rarely covered on the internet 🙏🏼

Luther_Luffeigh
Автор

Ty Ned! R u considering to start covering Bicep (since u've mentioned arm-templates var declaration similarity with TF) ? Would be great to attend Bicep Fri :)

mosksky
Автор

hi Ned, could you please tell me the theme you are using in vscode?

Vaisakhreghu
Автор

I like to hide the nasty logic in locals. For instance, the Azure modules provided by Microsoft are kind of nasty where you might build several Virtual Networks, you pass a list of names, then a list of address spaces... very poor practice.

Instead, I like defining map/object structure that is hierarchical. Well, that doesn't work well with a for_each. So, I will clean up the nice input format into a way that is flatter and more digestible with a for_each. Very handy in modules.

dusdnd