Chapter 4. Other Built-In Fields
In Chapter 2, you saw the various ways to construct and assign input variables in TF. In this chapter, you will see the other elements that may hold a value in TF, how to effectively construct them, and how they may be leveraged strategically to enhance flexibility, readability, and maintainability of TF projects. You will also review the meta-arguments and the dynamic{} block, which are both used to further augment flexibility and, more importantly, how to introduce this tactically.
Resource Fields and Reference Attributes
Similar to input variables for modules, the resource fields are the input elements for a resource{} block. They are defined by the provider and generally would map to parameters expected by the corresponding API that is exposed by the CSP. It is very common for most resource fields to be optional, with default values (which are sometimes null) in many cases. For example a general purpose storage bucket may support dozens of first order resource ...
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.
Read now
Unlock full access