Inside local all of the declarations use the argument syntax, because we are assigning values to names using arbitrary expressions. In this case your vpcid_env should be written like this instead:
The above has an expression producing a literal map value. It would also be valid to write an expression that constructs a map dynamically somehow, such as this:
vpcid_env = zipmap(range(3), range(1, 4))
On the other hand, an identifier immediately followed by a brace, like locals { here, or an identifier followed by one or more quoted labels and a brace like resource "aws_instance" "foo" {, signals the beginning of a block. A block is a language construct that introduces a nested configuration body, and it’s therefore it’s not an arbitrary expression but rather a container for zero or more arguments or other nested blocks. Blocks are used to represent first-class language objects, like resources and modules, and also by some providers to represent nested objects within resource types.
Terraform 0.11 and prior had some validation bugs that would sometimes permit using block syntax to define arguments and argument syntax to define blocks, but those bugs were fixed in Terraform 0.12 in order to introduce some new language features that would otherwise have been ambiguous. I expect the examples you are seeing are incorrect usage that was not correctly detected by Terraform 0.11 and thus the author didn’t realize it was incorrect.