Perform Dynamic Operations with Functions
Create Terraform resources with built-in reusable functions. Deploy reusable configurations with the templatefile function for provisioning resources using files with Terraform interpolation. Use the lookup function to pass a map output to a variable and the concat function to concatenate and output lists to your configuration.
Create Dynamic Expressions
Make your Terraform configurations more dynamic and reusable with expressions. Create an ELB deployment with locals to assign expressions to variables for reuse, conditionals to declare if/then scenarios, and the splat expression to return attributes from complex value types.