Skip to Content
Terraform in Action
book

Terraform in Action

by Scott Winkler
July 2021
Intermediate to advanced
408 pages
9h 51m
English
Manning Publications
Content preview from Terraform in Action

3 Functional programming

This chapter covers

  • Using the full gamut of input variables, local values, and output values
  • Making Terraform more expressive with functions and for expressions
  • Incorporating two new providers: Random and Archive
  • Templating with templatefile()
  • Scaling resources with count

Functional programming is a declarative programming paradigm that allows you to do many things in a single line of code. By composing small modular functions, you can tell a computer what you want it to do instead of how to do it. Functional programming is called that because, as the name implies, programs consist almost entirely of functions. The core principles of functional programming are as follows:

  • Pure functions—Functions return the same ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Terraform in Action

Terraform in Action

Scott Winkler

Publisher Resources

ISBN: 9781617296895Supplemental ContentPublisher SupportOtherPublisher WebsiteSupplemental ContentErrata PagePurchase Link