
* Update rule * Add Azure example Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
65 lines
1.2 KiB
Plaintext
65 lines
1.2 KiB
Plaintext
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:
|
|
|
|
[source,terraform]
|
|
----
|
|
resource "aws_db_instance" "example" {
|
|
backup_retention_period = 2 # Sensitive
|
|
}
|
|
----
|
|
|
|
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
|
|
}
|
|
}
|
|
----
|
|
|
|
== Compliant Solution
|
|
|
|
For https://aws.amazon.com/rds/[Amazon Relational Database Service] clusters and instances:
|
|
|
|
[source,terraform]
|
|
----
|
|
resource "aws_db_instance" "example" {
|
|
backup_retention_period = 5
|
|
}
|
|
----
|
|
|
|
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
|
|
}
|
|
}
|
|
----
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
'''
|
|
== Implementation Specification
|
|
(visible only on this page)
|
|
|
|
include::../message.adoc[]
|
|
|
|
include::../highlighting.adoc[]
|
|
|
|
endif::env-github,rspecator-view[]
|
|
|