2021-12-15 16:51:01 +01:00
|
|
|
include::../description.adoc[]
|
|
|
|
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
|
|
|
|
== Sensitive Code Example
|
|
|
|
|
|
|
|
For https://aws.amazon.com/rds/[Amazon Relational Database Service] clusters and instances:
|
|
|
|
|
2022-03-25 14:22:32 +01:00
|
|
|
[source,terraform]
|
2021-12-15 16:51:01 +01:00
|
|
|
----
|
2022-03-25 14:22:32 +01:00
|
|
|
resource "aws_db_instance" "example" {
|
2021-12-15 16:51:01 +01:00
|
|
|
backup_retention_period = 2 # Sensitive
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2022-03-25 14:22:32 +01:00
|
|
|
For https://docs.microsoft.com/en-us/azure/cosmos-db/introduction[Azure Cosmos DB] accounts:
|
|
|
|
|
|
|
|
[source,terraform]
|
|
|
|
----
|
|
|
|
resource "azurerm_cosmosdb_account" "example" {
|
|
|
|
backup {
|
|
|
|
type = "Periodic"
|
|
|
|
retention_in_hours = 8 # Sensitive
|
|
|
|
}
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2021-12-15 16:51:01 +01:00
|
|
|
== Compliant Solution
|
|
|
|
|
|
|
|
For https://aws.amazon.com/rds/[Amazon Relational Database Service] clusters and instances:
|
|
|
|
|
2022-02-04 17:28:24 +01:00
|
|
|
[source,terraform]
|
2021-12-15 16:51:01 +01:00
|
|
|
----
|
2022-03-25 14:22:32 +01:00
|
|
|
resource "aws_db_instance" "example" {
|
2021-12-15 16:51:01 +01:00
|
|
|
backup_retention_period = 5
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2022-03-25 14:22:32 +01:00
|
|
|
For https://docs.microsoft.com/en-us/azure/cosmos-db/introduction[Azure Cosmos DB] accounts:
|
|
|
|
|
|
|
|
[source,terraform]
|
|
|
|
----
|
|
|
|
resource "azurerm_cosmosdb_account" "example" {
|
|
|
|
backup {
|
|
|
|
type = "Periodic"
|
|
|
|
retention_in_hours = 300
|
|
|
|
}
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2021-12-15 16:51:01 +01:00
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
|
|
|
|
'''
|
|
|
|
== Implementation Specification
|
|
|
|
(visible only on this page)
|
|
|
|
|
|
|
|
include::../message.adoc[]
|
|
|
|
|
2022-03-25 14:22:32 +01:00
|
|
|
include::../highlighting.adoc[]
|
|
|
|
|
2021-12-15 16:51:01 +01:00
|
|
|
endif::env-github,rspecator-view[]
|
|
|
|
|