Skip to content

Commit 2ea39d5

Browse files
fix: suggestion 1
Co-authored-by: Ben Drucker <[email protected]>
1 parent 2837daf commit 2ea39d5

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

docs/rules/aws_write_only_attributes.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,9 @@ Warning: [Fixable] "secret_string" is a non-ephemeral attribute, which means thi
2525

2626
## Why
2727

28-
Saving secrets to state or plan files is a bad practice. It can cause serious security issues. Keeping secrets from these files is possible in most of the cases by using write-only attributes.
28+
By default, sensitive attributes are still stored in state, just hidden from view in plan output. Other resources are able to refer to these attributes. Current versions of Terraform also include support for write-only arguments, which are not persisted to state. Other resources cannot refer to their values.
29+
30+
Using write-only arguments mitigates the risk of a malicious actor obtaining privileged credentials by accessing Terraform state files directly. Prefer using them over the original sensitive attribute unless you need to refer to it in other blocks, such as a [root `output`](https://developer.hashicorp.com/terraform/language/values/outputs#ephemeral-avoid-storing-values-in-state-or-plan-files), that cannot be ephemeral.
2931

3032
## How To Fix
3133

0 commit comments

Comments
 (0)