I am working with a Terraform file that declares secrets as either sensitive or non-sensitive. My objective is to extract only the non-sensitive secrets and set them as environment variables for better accessibility. I plan to use the output variables defined in an output file, but I am unsure how to proceed. Is there an automated way to do this?
Here is an example of my Terraform code:
variable "tag" {
type=string
description="EC2 Instance Type"
sensitive=false
}
variable "user_name"{
type=string
sensitive=true
}