2021-09-06 15:34:51 +02:00
|
|
|
include::../description.adoc[]
|
|
|
|
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
|
|
|
|
== Sensitive Code Example
|
|
|
|
|
2022-11-14 10:51:48 +01:00
|
|
|
For https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance[aws_db_instance]
|
|
|
|
and https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster[aws_rds_cluster]:
|
2021-09-06 15:34:51 +02:00
|
|
|
|
|
|
|
----
|
2022-11-14 10:51:48 +01:00
|
|
|
resource "aws_db_instance" "example" {
|
2023-07-20 16:36:25 +02:00
|
|
|
storage_encrypted = false # Sensitive, disabled by default
|
2021-09-06 15:34:51 +02:00
|
|
|
}
|
2022-11-14 10:51:48 +01:00
|
|
|
|
|
|
|
resource "aws_rds_cluster" "example" {
|
|
|
|
storage_encrypted = false # Sensitive, disabled by default
|
|
|
|
}
|
2021-09-06 15:34:51 +02:00
|
|
|
----
|
|
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
|
2022-11-14 10:51:48 +01:00
|
|
|
For https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/db_instance[aws_db_instance]
|
|
|
|
and https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/rds_cluster[aws_rds_cluster]:
|
2021-09-06 15:34:51 +02:00
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,terraform]
|
2021-09-06 15:34:51 +02:00
|
|
|
----
|
2022-11-14 10:51:48 +01:00
|
|
|
resource "aws_db_instance" "example" {
|
2021-09-06 15:34:51 +02:00
|
|
|
storage_encrypted = true
|
|
|
|
}
|
2022-11-14 10:51:48 +01:00
|
|
|
|
|
|
|
resource "aws_rds_cluster" "example" {
|
2023-07-20 16:36:25 +02:00
|
|
|
storage_encrypted = true
|
2022-11-14 10:51:48 +01:00
|
|
|
}
|
2021-09-06 15:34:51 +02:00
|
|
|
----
|
|
|
|
|
|
|
|
include::../see.adoc[]
|
2022-03-16 13:32:37 +01:00
|
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
|
|
|
|
'''
|
|
|
|
== Implementation Specification
|
|
|
|
(visible only on this page)
|
|
|
|
|
2023-05-25 14:18:12 +02:00
|
|
|
=== Message
|
|
|
|
|
|
|
|
* Make sure that using unencrypted databases is safe here.
|
|
|
|
* Omitting "storage_encrypted" disables databases encryption. Make sure it is safe here.
|
|
|
|
|
2022-03-16 13:32:37 +01:00
|
|
|
|
2022-11-14 10:51:48 +01:00
|
|
|
endif::env-github,rspecator-view[]
|