Pass var to local.tf

How to pass variable from terraform command
-var=env=dev to local.tf file
locals {
env=dev
}
Further I want to use dev across the file in other strings to concatinate