-
Notifications
You must be signed in to change notification settings - Fork 9.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AWS Lambda Function Sensitive Environment Variables #11595
Comments
Declare environment variables in AWS Lambda as sensitive so they will not be printed by terraform plan and apply.
I just stumbled across this thread. It appears a very solid work around is current available in later versions of Terraform. You can see the merged pull request here where this is now supported 😃 You can do something link so to hide the output of a env var which you pass into your Lambda function: variable "SOME_VAR_HERE" {
...
sensitive=true
} Hope this helps! |
As I discussed in my response to PR #11614, the use case discussed here is now covered by the (https://www.terraform.io/docs/language/functions/sensitive.html) |
I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. |
Community Note
Description
Sensitive information is sometimes provided as an environment variable to an AWS Lambda function. When we provide the secret as an environment variable with Terraform, the plan and apply step will output these values as plain text.
We suggest that a possibility is added, to specify sensitive environment variables which will not be printed out by Terraform. We futher suggest to use the existing "sensitive" function from Terraform to accomplish this goal.
New or Affected Resource(s)
Potential Terraform Configuration
With backward compatibility
Without backward compatibility
The text was updated successfully, but these errors were encountered: