~/lightning

Lightning Talk: Locals Only: Patterns and Anti-Patterns in OpenTofu Local Variables

Lightningat OpenTofu Day Europe 2025 · on Tuesday, 2025-04-01· [devops-and-delivery]
links:none on file
slides:none on file

Locals are named values defined in locals blocks that reduce repetition but also create hidden complexity when misused; advice includes consolidating into a single locals.tf file to avoid runtime name collisions, avoiding inline string or loop logic by pulling transformations into locals, not implementing type safety or defaults via multiple competing variables, and never using excessively nested logic that requires refactoring to understand. Use locals inside modules to shrink the input surface and export locals via outputs for easy troubleshooting.

AI-written summary · about

~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.