Created
December 3, 2021 04:30
-
-
Save yevgenypats/6ea29674552f30e29ae869fe3d0c2e94 to your computer and use it in GitHub Desktop.
pci_dss_blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// policy.hcl | |
policy "pci-dss-v3.2.1" { | |
description = "PCI DSS V3.2.1" | |
configuration { | |
provider "aws" { | |
version = ">= v0.5.0" | |
} | |
} | |
....... | |
policy "autoscaling" { | |
description = "checks for autoscaling" | |
query "autoscaling_groups_elb_check" { | |
description = "Auto Scaling groups associated with a load balancer should use health checks" | |
query = file("queries/autoscaling/autoscaling_groups_elb_check.sql") | |
} | |
} | |
} | |
// queries/autoscaling/autoscaling_groups_elb_check.sql | |
SELECT "account_id", "region", "arn", "name" | |
FROM aws_autoscaling_groups | |
WHERE array_length("load_balancer_names", 1) > 0 | |
AND "health_check_type" IS DISTINCT FROM 'ELB' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment