We are using Terraform to manage our infrastructure.
One of the tags that we use is called updatedBy and it's supposed to show the e-mail of the person that updated that resource:
tags = {
"updatedBY" = "name.surname@contoso.com"
}
As you can imagine so many times people input the wrong e-mail.
Is there a way I can put that e-mail in a variable using:
WHOAMI
: for Linux users- whoami /upn: for Windows users
git config user.email
: for both
In my opinion git config user.email
should be the way to go because it's OS agnostic and all our Terraform engineers use Git.
But how to put that into a variable so they cannot be wrong again?