kral2 / terraform-generic-template

Terraform Configuration boilerplate with linting, automatic documentation, .gitignore file, etc.
MIT License
7 stars 1 forks source link

Add the TFC Project name and TFC Workspace name to the default tags #1

Open emrousselle opened 1 year ago

emrousselle commented 1 year ago

The default tags should include the TFC project and workspace name in order to quickly identify the workspace that is managing a particular resource.

variable "TFC_PROJECT_NAME" {
  type        = string
  description = "The TFC project name (exposed by TFC)"
}

variable "TFC_WORKSPACE_NAME" {
  type        = string
  description = "The TFC workpace name (exposed by TFC)"
}

These environment variables are set automatically when TFC executes a Run.

kral2 commented 1 year ago

Good idea, but I would like to make it optional. So it would facilitate usage with TFC/TFE, but not enforce it.