Module 4 of 8

Terraform Configuration

6.0 hours (lessons 4 h 5 min, labs 1 h 35 min, knowledge check 20 min)

Why this module is the largest: it holds the most objectives and most of 004's new emphasis: depends_on (4f), custom conditions (4g), and ephemeral values and write-only arguments (4h).

Learning objectives

ID You will be able to…
4a Choose between resource and data blocks, explain when data sources are read, and use terraform_data.
4b Write references to resource, data, variable, local, and module values, including indexed instances.
4c Declare variables and outputs, apply the variable precedence order, and use sensitive, nullable, and ephemeral.
4d Use list, set, map, object, and tuple types, optional() attributes, and explain type conversion.
4e Write for expressions, splats, conditionals, dynamic blocks, and locals, use built-in functions, and test expressions in terraform console.
4f Explain implicit vs. explicit dependencies, and use count, for_each, depends_on, provider, and lifecycle.
4g Write variable validation, preconditions, postconditions, and check blocks, and predict whether each blocks the run or only warns.
4h Explain where secrets end up, and keep them out of state using ephemeral values, ephemeral resources, write-only arguments, Vault, and dynamic credentials.

In this module