Skip to content

Commit

Permalink
Create rule S6258[terraform]: Add AWS CloudFront Distributions (#549)
Browse files Browse the repository at this point in the history
Co-authored-by: Nils Werner <64034005+nils-werner-sonarsource@users.noreply.github.com>
  • Loading branch information
1 parent d8c6aac commit 555f37b
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions rules/S6258/terraform/rule.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ resource "aws_s3_bucket" "mynoncompliantbucket" { # Sensitive
}
----

For https://aws.amazon.com/cloudfront/[Amazon CloudFront] distributions:

----
resource "aws_cloudfront_distribution" "cloudfront_distribution" { # Sensitive
default_root_object = "index.html"
}
----

For both Amazon https://aws.amazon.com/elasticloadbalancing/classic-load-balancer/[Classic Load Balancing] and https://aws.amazon.com/elasticloadbalancing/application-load-balancer/[Application Load Balancing]:

----
Expand Down Expand Up @@ -46,6 +54,18 @@ resource "aws_s3_bucket" "mycompliantbucket" { # Compliant
}
----

For https://aws.amazon.com/cloudfront/[Amazon CloudFront] distributions:

----
resource "aws_cloudfront_distribution" "cloudfront_distribution" {
default_root_object = "index.html"
logging_config {
bucket = "mycompliantbucketname"
prefix = "log/cloudfront-"
}
}
----

For both Amazon https://aws.amazon.com/elasticloadbalancing/classic-load-balancer/[Classic Load Balancing] and https://aws.amazon.com/elasticloadbalancing/application-load-balancer/[Application Load Balancing]:

----
Expand Down

0 comments on commit 555f37b

Please sign in to comment.