A local variable assigns a name to an expression, so you can use the name multiple times within a module instead of repeating the expression. Local variables are like a function's temporary local variables.
Full playlist: • Advanced Terraform with Azure