Skip to content

Commit 3de1f2c

Browse files
Merge pull request #17 from niaid/remove-variable-default-values
Remove default values from variables
2 parents 8ba687a + 3f1576a commit 3de1f2c

File tree

4 files changed

+157
-147
lines changed

4 files changed

+157
-147
lines changed

managed_rules_locals.tf

Lines changed: 32 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,9 @@ locals {
397397
severity = "Low"
398398
}
399399

400-
cloudtrail-enabled = {
400+
cloud-trail-enabled = {
401401
description = "Checks if an AWS CloudTrail trail is enabled in your AWS account. The rule is NON_COMPLIANT if a trail is not enabled. Optionally, the rule checks a specific S3 bucket, Amazon Simple Notification Service (Amazon SNS) topic, and CloudWatch log group."
402-
input_parameters = var.cloudtrail_enabled_parameters
402+
input_parameters = var.cloud_trail_enabled_parameters
403403
severity = "Medium"
404404
}
405405

@@ -554,7 +554,7 @@ locals {
554554
}
555555

556556
dynamodb-pitr-enabled = {
557-
description = "Checks that point in time recovery (PITR) is enabled for Amazon DynamoDB tables. The rule is NON_COMPLIANT if point in time recovery is not enabled for Amazon DynamoDB tables."
557+
description = "Checks if point-in-time recovery (PITR) is enabled for Amazon DynamoDB tables. The rule is NON_COMPLIANT if PITR is not enabled for DynamoDB tables."
558558
resource_types_scope = ["AWS::DynamoDB::Table"]
559559
severity = "Medium"
560560
}
@@ -598,7 +598,7 @@ locals {
598598
}
599599

600600
ebs-optimized-instance = {
601-
description = "Checks if EBS optimization is enabled for your EC2 instances that can be EBS-optimized. The rule is NON_COMPLIANT if EBS optimization is not enabled for an EC2 instance that can be EBS-optimized."
601+
description = "Checks if Amazon EBS optimization is enabled for your Amazon Elastic Compute Cloud (Amazon EC2) instances that can be Amazon EBS-optimized. The rule is NON_COMPLIANT if EBS optimization is not enabled for an Amazon EC2 instance that can be EBS-optimized."
602602
resource_types_scope = ["AWS::EC2::Instance"]
603603
severity = "Medium"
604604
}
@@ -638,7 +638,7 @@ locals {
638638
severity = "Medium"
639639
}
640640

641-
ec2-instance-managed-by-systems-manager = {
641+
ec2-instance-managed-by-ssm = {
642642
description = "Checks if your Amazon EC2 instances are managed by AWS Systems Manager (SSM Agent). The rule is NON_COMPLIANT if the EC2 instance previously associated with an SSM Agent instance inventory becomes unreachable or is not managed by SSM Agent."
643643
resource_types_scope = ["AWS::EC2::Instance", "AWS::SSM::ManagedInstanceInventory"]
644644
severity = "Medium"
@@ -738,7 +738,7 @@ locals {
738738
}
739739

740740
ec2-security-group-attached-to-eni = {
741-
description = "Checks if non-default security groups are attached to Elastic network interfaces (ENIs). The rule is NON_COMPLIANT if the security group is not associated with an elastic network interface (ENI)."
741+
description = "Checks if non-default security groups are attached to elastic network interfaces. The rule is NON_COMPLIANT if the security group is not associated with a network interface."
742742
resource_types_scope = ["AWS::EC2::SecurityGroup"]
743743
severity = "Medium"
744744
}
@@ -902,7 +902,7 @@ locals {
902902
}
903903

904904
eip-attached = {
905-
description = "Checks if all Elastic IP addresses that are allocated to an AWS account are attached to EC2 instances or in-use elastic network interfaces (ENIs)."
905+
description = "Checks if all Elastic IP addresses that are allocated to an AWS account are attached to EC2 instances or in-use elastic network interfaces. The rule is NON_COMPLIANT if the AssociationId is null for the Elastic IP address."
906906
resource_types_scope = ["AWS::EC2::EIP"]
907907
severity = "Medium"
908908
}
@@ -997,24 +997,24 @@ locals {
997997
}
998998

999999
elasticsearch-encrypted-at-rest = {
1000-
description = "Checks if Elasticsearch domains have encryption at rest configuration enabled. The rule is NON_COMPLIANT if the EncryptionAtRestOptions field is not enabled."
1000+
description = "Checks if Amazon OpenSearch Service (previously called Elasticsearch) domains have encryption at rest configuration enabled. The rule is NON_COMPLIANT if the EncryptionAtRestOptions field is not enabled."
10011001
severity = "Medium"
10021002
}
10031003

10041004
elasticsearch-in-vpc-only = {
1005-
description = "Checks if Elasticsearch domains are in Amazon Virtual Private Cloud (Amazon VPC). The rule is NON_COMPLIANT if an Elasticsearch domain endpoint is public."
1005+
description = "Checks if Amazon OpenSearch Service (previously called Elasticsearch) domains are in Amazon Virtual Private Cloud (Amazon VPC). The rule is NON_COMPLIANT if an OpenSearch Service domain endpoint is public."
10061006
severity = "Medium"
10071007
}
10081008

10091009
elasticsearch-logs-to-cloudwatch = {
1010-
description = "Checks if Elasticsearch domains are configured to send logs to Amazon CloudWatch Logs. The rule is COMPLIANT if a log is enabled for an Elasticsearch domain. This rule is NON_COMPLIANT if logging is not configured."
1010+
description = "Checks if Amazon OpenSearch Service domains are configured to send logs to Amazon CloudWatch Logs. The rule is COMPLIANT if a log is enabled for an Amazon ES domain. This rule is NON_COMPLIANT if logging is not configured."
10111011
input_parameters = var.elasticsearch_logs_to_cloudwatch_parameters
10121012
resource_types_scope = ["AWS::Elasticsearch::Domain"]
10131013
severity = "Low"
10141014
}
10151015

10161016
elasticsearch-node-to-node-encryption-check = {
1017-
description = "Check if Elasticsearch nodes are encrypted end to end. The rule is NON_COMPLIANT if the node-to-node encryption is not enabled on the domain."
1017+
description = "Check if OpenSearch Service (previously called Elasticsearch) nodes are encrypted end to end. The rule is NON_COMPLIANT if the node-to-node encryption is not enabled on the domain."
10181018
resource_types_scope = ["AWS::Elasticsearch::Domain"]
10191019
severity = "Medium"
10201020
}
@@ -1086,7 +1086,7 @@ locals {
10861086
}
10871087

10881088
elb-tls-https-listeners-only = {
1089-
description = "Checks if your Classic Load Balancer is configured with SSL or HTTPS listeners."
1089+
description = "Checks if your Classic Load Balancer is configured with SSL or HTTPS listeners. The rule is NON_COMPLIANT if a listener is not configured with SSL or HTTPS."
10901090
resource_types_scope = ["AWS::ElasticLoadBalancing::LoadBalancer"]
10911091
severity = "Medium"
10921092
}
@@ -1098,13 +1098,13 @@ locals {
10981098
}
10991099

11001100
emr-master-no-public-ip = {
1101-
description = "Checks if Amazon Elastic MapReduce (EMR) clusters master nodes have public IPs. The rule is NON_COMPLIANT if the master node has a public IP."
1101+
description = "Checks if Amazon EMR clusters master nodes have public IPs. The rule is NON_COMPLIANT if the master node has a public IP."
11021102
resource_types_scope = ["AWS::EMR::Cluster"]
11031103
severity = "Medium"
11041104
}
11051105

11061106
encrypted-volumes = {
1107-
description = "Checks if the EBS volumes that are in an attached state are encrypted. If you specify the ID of a KMS key for encryption using the kmsId parameter, the rule checks if the EBS volumes in an attached state are encrypted with that KMS key."
1107+
description = "Checks if attached Amazon EBS volumes are encrypted and optionally are encrypted with a specified KMS key. The rule is NON_COMPLIANT if attached EBS volumes are unencrypted or are encrypted with a KMS key not in the supplied parameters."
11081108
input_parameters = var.encrypted_volumes_parameters
11091109
resource_types_scope = ["AWS::EC2::Volume"]
11101110
severity = "Medium"
@@ -1146,7 +1146,7 @@ locals {
11461146
}
11471147

11481148
guardduty-enabled-centralized = {
1149-
description = "Checks if Amazon GuardDuty is enabled in your AWS account and region. If you provide an AWS account for centralization, the rule evaluates the Amazon GuardDuty results in the centralized account. The rule is COMPLIANT when Amazon GuardDuty is enabled."
1149+
description = "Checks if Amazon GuardDuty is enabled in your AWS account and AWS Region. If you provide an AWS account for centralization, the rule evaluates the GuardDuty results in the centralized account. The rule is COMPLIANT when GuardDuty is enabled."
11501150
input_parameters = var.guardduty_enabled_centralized_parameters
11511151
severity = "High"
11521152
}
@@ -1158,7 +1158,7 @@ locals {
11581158
}
11591159

11601160
iam-customer-policy-blocked-kms-actions = {
1161-
description = "Checks if the managed AWS Identity and Access Management (IAM) policies that you create do not allow blocked actions on AWS KMS keys. The rule is NON_COMPLIANT if any blocked action is allowed on AWS KMS keys by the managed IAM policy."
1161+
description = "Checks if the managed AWS Identity and Access Management (IAM) policies that you create do not allow blocked actions on AWS KMS) keys. The rule is NON_COMPLIANT if any blocked action is allowed on AWS KMS keys by the managed IAM policy."
11621162
input_parameters = var.iam_customer_policy_blocked_kms_actions_parameters
11631163
resource_types_scope = ["AWS::IAM::Policy"]
11641164
severity = "Medium"
@@ -1184,13 +1184,13 @@ locals {
11841184
}
11851185

11861186
iam-password-policy = {
1187-
description = "Checks if the account password policy for IAM users meets the specified requirements indicated in the parameters. This rule is NON_COMPLIANT if the account password policy does not meet the specified requirements."
1187+
description = "Checks if the account password policy for AWS Identity and Access Management (IAM) users meets the specified requirements indicated in the parameters. The rule is NON_COMPLIANT if the account password policy does not meet the specified requirements."
11881188
input_parameters = var.iam_password_policy_parameters
11891189
severity = "Medium"
11901190
}
11911191

11921192
iam-policy-blacklisted-check = {
1193-
description = "Checks if for each IAM resource, a policy ARN in the input parameter is attached to the IAM resource. The rule is NON_COMPLIANT if the policy ARN is attached to the IAM resource. AWS Config marks the resource as COMPLIANT if the IAM resource is part of..."
1193+
description = "Checks in each AWS Identity and Access Management (IAM) resource, if a policy Amazon Resource Name (ARN) in the input parameter is attached to the IAM resource. The rule is NON_COMPLIANT if the policy ARN is attached to the IAM resource."
11941194
input_parameters = var.iam_policy_blacklisted_check_parameters
11951195
resource_types_scope = ["AWS::IAM::User", "AWS::IAM::Group", "AWS::IAM::Role"]
11961196
severity = "Medium"
@@ -1241,7 +1241,7 @@ locals {
12411241
}
12421242

12431243
iam-user-no-policies-check = {
1244-
description = "Checks if none of your IAM users have policies attached. IAM users must inherit permissions from IAM groups or roles. The rule is NON_COMPLIANT if there is at least one IAM user with policies attached."
1244+
description = "Checks if none of your AWS Identity and Access Management (IAM) users have policies attached. IAM users must inherit permissions from IAM groups or roles. The rule is NON_COMPLIANT if there is at least one IAM user with policies attached."
12451245
resource_types_scope = ["AWS::IAM::User"]
12461246
severity = "Medium"
12471247
}
@@ -1252,15 +1252,15 @@ locals {
12521252
severity = "Medium"
12531253
}
12541254

1255-
restricted-ssh = {
1255+
incoming-ssh-disabled = {
12561256
description = "Checks if the incoming SSH traffic for the security groups is accessible. The rule is COMPLIANT when IP addresses of the incoming SSH traffic in the security groups are restricted (CIDR other than 0.0.0.0/0). This rule applies only to IPv4."
12571257
resource_types_scope = ["AWS::EC2::SecurityGroup"]
12581258
severity = "Medium"
12591259
}
12601260

1261-
ec2-instances-in-vpc = {
1261+
instances-in-vpc = {
12621262
description = "Checks if your EC2 instances belong to a virtual private cloud (VPC). Optionally, you can specify the VPC ID to associate with your instances."
1263-
input_parameters = var.ec2_instances_in_vpc_parameters
1263+
input_parameters = var.instances_in_vpc_parameters
12641264
resource_types_scope = ["AWS::EC2::Instance"]
12651265
severity = "Medium"
12661266
}
@@ -1313,7 +1313,7 @@ locals {
13131313
}
13141314

13151315
lambda-inside-vpc = {
1316-
description = "Checks whether an AWS Lambda function is allowed access to an Amazon Virtual Private Cloud. The rule is NON_COMPLIANT if the Lambda function is not VPC enabled."
1316+
description = "Checks if a Lambda function is allowed access to a virtual private cloud (VPC). The rule is NON_COMPLIANT if the Lambda function is not VPC enabled."
13171317
input_parameters = var.lambda_inside_vpc_parameters
13181318
resource_types_scope = ["AWS::Lambda::Function"]
13191319
severity = "Low"
@@ -1355,9 +1355,9 @@ locals {
13551355
severity = "Medium"
13561356
}
13571357

1358-
multi-region-cloudtrail-enabled = {
1358+
multi-region-cloud-trail-enabled = {
13591359
description = "Checks if there is at least one multi-region AWS CloudTrail. The rule is NON_COMPLIANT if the trails do not match input parameters.The rule is NON_COMPLIANT if the ExcludeManagementEventSources field is not empty or if AWS CloudTrail is configured to..."
1360-
input_parameters = var.multi_region_cloudtrail_enabled_parameters
1360+
input_parameters = var.multi_region_cloud_trail_enabled_parameters
13611361
severity = "Medium"
13621362
}
13631363

@@ -1414,7 +1414,7 @@ locals {
14141414
}
14151415

14161416
no-unrestricted-route-to-igw = {
1417-
description = "Checks if route tables have inputs other than these default values: CIDR block of 0.0.0.0/0 as the Destination for IPv4 or ::/0 for IPv6, and igw-id as the Target. The rule is NON_COMPLIANT if you keep defaults."
1417+
description = "Checks if there are public routes in the route table to an Internet gateway (IGW). The rule is NON_COMPLIANT if a route to an IGW has a destination CIDR block of 0.0.0.0/0 or ::/0 or if a destination CIDR block does not match the rule parameter."
14181418
input_parameters = var.no_unrestricted_route_to_igw_parameters
14191419
resource_types_scope = ["AWS::EC2::RouteTable"]
14201420
severity = "Medium"
@@ -1523,7 +1523,7 @@ locals {
15231523
}
15241524

15251525
rds-instance-deletion-protection-enabled = {
1526-
description = "Checks if an Amazon Relational Database Service (Amazon RDS) instance has deletion protection enabled. This rule is NON_COMPLIANT if an Amazon RDS instance does not have deletion protection enabled i.e deletionProtection is set to false."
1526+
description = "Checks if an Amazon Relational Database Service (Amazon RDS) instance has deletion protection enabled. The rule is NON_COMPLIANT if an Amazon RDS instance does not have deletion protection enabled; for example, deletionProtection is set to false."
15271527
input_parameters = var.rds_instance_deletion_protection_enabled_parameters
15281528
resource_types_scope = ["AWS::RDS::DBInstance"]
15291529
severity = "Medium"
@@ -1542,7 +1542,7 @@ locals {
15421542
}
15431543

15441544
rds-in-backup-plan = {
1545-
description = "Checks if the Amazon RDS resource type is present in a backup plan in AWS Backup. The rule is NON_COMPLIANT if the Amazon RDS resource type is not included in any AWS Backup plan."
1545+
description = "Checks if Amazon Relational Database Service (Amazon RDS) databases are present in AWS Backup plans. The rule is NON_COMPLIANT if Amazon RDS databases are not included in any AWS Backup plan."
15461546
severity = "Medium"
15471547
}
15481548

@@ -1586,7 +1586,7 @@ locals {
15861586
}
15871587

15881588
rds-storage-encrypted = {
1589-
description = "Checks if storage encryption is enabled for your RDS DB instances. The rule is NON_COMPLIANT if storage encryption is not enabled."
1589+
description = "Checks if storage encryption is enabled for your Amazon Relational Database Service (Amazon RDS) DB instances. The rule is NON_COMPLIANT if storage encryption is not enabled."
15901590
input_parameters = var.rds_storage_encrypted_parameters
15911591
resource_types_scope = ["AWS::RDS::DBInstance"]
15921592
severity = "Medium"
@@ -1666,9 +1666,9 @@ locals {
16661666
severity = "Medium"
16671667
}
16681668

1669-
restricted-common-ports = {
1670-
description = "Checks if the security groups in use do not allow unrestricted incoming TCP traffic to the specified ports. The rule is COMPLIANT when the IP addresses for inbound TCP connections are restricted to the specified ports. This rule applies only to IPv4."
1671-
input_parameters = var.restricted_common_ports_parameters
1669+
restricted-incoming-traffic = {
1670+
description = "Checks if the security groups in use do not allow unrestricted incoming Transmission Control Protocol (TCP) traffic to the specified ports for IPv4. The rule is COMPLIANT if IP addresses for inbound TCP connections are restricted to the specified ports."
1671+
input_parameters = var.restricted_incoming_traffic_parameters
16721672
resource_types_scope = ["AWS::EC2::SecurityGroup"]
16731673
severity = "Medium"
16741674
}

0 commit comments

Comments
 (0)