2022-03-07 10:14:13 +01:00
|
|
|
include::../description.adoc[]
|
|
|
|
|
|
|
|
include::../ask-yourself.adoc[]
|
|
|
|
|
|
|
|
include::../recommended.adoc[]
|
|
|
|
|
|
|
|
== Sensitive Code Example
|
|
|
|
|
2023-07-21 10:14:14 +02:00
|
|
|
For https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html[AWS Cloudwatch Logs]:
|
|
|
|
|
|
|
|
[source,terraform]
|
|
|
|
----
|
|
|
|
resource "aws_cloudwatch_log_group" "example" {
|
|
|
|
name = "example"
|
|
|
|
retention_in_days = 3 # Sensitive
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2022-03-07 10:14:13 +01:00
|
|
|
For https://docs.microsoft.com/en-us/azure/firewall-manager/policy-overview[Azure Firewall Policy]:
|
2022-03-23 15:46:34 +01:00
|
|
|
|
2022-03-07 10:14:13 +01:00
|
|
|
[source,terraform]
|
|
|
|
----
|
|
|
|
resource "azurerm_firewall_policy" "example" {
|
|
|
|
insights {
|
|
|
|
enabled = true
|
|
|
|
retention_in_days = 7 # Sensitive
|
|
|
|
}
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
|
|
|
For https://cloud.google.com/logging/docs/routing/overview#buckets[Google Cloud Logging buckets]:
|
|
|
|
|
|
|
|
[source,terraform]
|
|
|
|
----
|
|
|
|
resource "google_logging_project_bucket_config" "example" {
|
|
|
|
project = var.project
|
|
|
|
location = "global"
|
|
|
|
retention_days = 7 # Sensitive
|
|
|
|
bucket_id = "_Default"
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
|
|
|
== Compliant Solution
|
|
|
|
|
2023-07-21 10:14:14 +02:00
|
|
|
For https://docs.aws.amazon.com/AmazonCloudWatch/latest/logs/Working-with-log-groups-and-streams.html[AWS Cloudwatch Logs]:
|
|
|
|
|
|
|
|
[source,terraform]
|
|
|
|
----
|
|
|
|
resource "aws_cloudwatch_log_group" "example" {
|
|
|
|
name = "example"
|
|
|
|
retention_in_days = 30
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
2022-03-07 10:14:13 +01:00
|
|
|
For https://docs.microsoft.com/en-us/azure/firewall-manager/policy-overview[Azure Firewall Policy]:
|
2023-05-11 17:03:30 +02:00
|
|
|
|
2022-03-07 10:14:13 +01:00
|
|
|
[source,terraform]
|
|
|
|
----
|
|
|
|
resource "azurerm_firewall_policy" "example" {
|
|
|
|
insights {
|
|
|
|
enabled = true
|
|
|
|
retention_in_days = 30
|
|
|
|
}
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
|
|
|
For https://cloud.google.com/logging/docs/routing/overview#buckets[Google Cloud Logging buckets]:
|
|
|
|
|
|
|
|
[source,terraform]
|
|
|
|
----
|
|
|
|
resource "google_logging_project_bucket_config" "example" {
|
|
|
|
project = var.project
|
|
|
|
location = "global"
|
|
|
|
retention_days = 30
|
|
|
|
bucket_id = "_Default"
|
|
|
|
}
|
|
|
|
----
|
|
|
|
|
|
|
|
ifdef::env-github,rspecator-view[]
|
|
|
|
|
|
|
|
'''
|
|
|
|
== Implementation Specification
|
|
|
|
(visible only on this page)
|
|
|
|
|
|
|
|
include::../message.adoc[]
|
|
|
|
|
|
|
|
include::../highlighting.adoc[]
|
|
|
|
|
|
|
|
endif::env-github,rspecator-view[]
|
|
|
|
|