goosy_assassin
CCoder.com
•Created by goosy_assassin on 8/15/2024 in #help
What's the best way to store GitHub PAT for main.tf?
I have a GitHub repo that I want all workspace to pull on creation. So I created a read only PAT for that repo, and stored in the env where coder service is running (export TF_VAR_GITHUB_TOKEN=).
However when I use the
variable "GIT_TOKEN" {
type = string
description = "GitHub Personal Access Token"
sensitive = true
}
, it prompts me to type in the variable instead reading it from the env.
My current workaround is store this PAT directly in the main.tf, since it's read only so it's not really the end of world, but is there a better way to do this?42 replies