Open
Conversation
| git_repo = "terragoat" | ||
| yor_trace = "d33c9292-952b-4c1f-9973-b6dbad519461" | ||
| } | ||
| storage_encrypted = false |
There was a problem hiding this comment.
Ensure RDS clusters have an AWS Backup backup plan
Resource: aws_rds_cluster.app2-rds-cluster | Bridgecrew ID: BC_AWS_GENERAL_49 | Checkov ID: CKV2_AWS_8
How to Fix
resource "aws_rds_cluster" "rds_cluster_good" {
cluster_identifier = "aurora-cluster-demo"
engine = "aurora-mysql"
engine_version = "5.7.mysql_aurora.2.03.2"
availability_zones = ["us-west-2a", "us-west-2b", "us-west-2c"]
database_name = "mydb"
master_username = "foo"
master_password = "bar"
}
resource "aws_backup_plan" "example" {
name = "tf_example_backup_plan"
rule {
rule_name = "tf_example_backup_rule"
target_vault_name = "vault-name"
schedule = "cron(0 12 * * ? *)"
}
}
resource "aws_backup_selection" "backup_good" {
iam_role_arn = "arn:partition:service:region:account-id:resource-id"
name = "tf_example_backup_selection"
plan_id = aws_backup_plan.example.id
resources = [
aws_rds_cluster.rds_cluster_good.arn
]
}
Description
Ensure that RDS clusters are included in your backup plans for the AWS Backup. AWS Backup is a fully managed backup service that helps you protect your data in the cloud by automatically backing up your data to a secure, durable storage location. By creating a backup plan, you can ensure that your data is regularly backed up and can be recovered in the event of data loss or corruption.| git_repo = "terragoat" | ||
| yor_trace = "b6f2c2ec-0715-46a0-83d4-502e588826d1" | ||
| } | ||
| storage_encrypted = false |
There was a problem hiding this comment.
Ensure RDS clusters have an AWS Backup backup plan
Resource: aws_rds_cluster.app1-rds-cluster | Bridgecrew ID: BC_AWS_GENERAL_49 | Checkov ID: CKV2_AWS_8
How to Fix
resource "aws_rds_cluster" "rds_cluster_good" {
cluster_identifier = "aurora-cluster-demo"
engine = "aurora-mysql"
engine_version = "5.7.mysql_aurora.2.03.2"
availability_zones = ["us-west-2a", "us-west-2b", "us-west-2c"]
database_name = "mydb"
master_username = "foo"
master_password = "bar"
}
resource "aws_backup_plan" "example" {
name = "tf_example_backup_plan"
rule {
rule_name = "tf_example_backup_rule"
target_vault_name = "vault-name"
schedule = "cron(0 12 * * ? *)"
}
}
resource "aws_backup_selection" "backup_good" {
iam_role_arn = "arn:partition:service:region:account-id:resource-id"
name = "tf_example_backup_selection"
plan_id = aws_backup_plan.example.id
resources = [
aws_rds_cluster.rds_cluster_good.arn
]
}
Description
Ensure that RDS clusters are included in your backup plans for the AWS Backup. AWS Backup is a fully managed backup service that helps you protect your data in the cloud by automatically backing up your data to a secure, durable storage location. By creating a backup plan, you can ensure that your data is regularly backed up and can be recovered in the event of data loss or corruption.| git_repo = "terragoat" | ||
| yor_trace = "b6f2c2ec-0715-46a0-83d4-502e588826d1" | ||
| } | ||
| storage_encrypted = false |
There was a problem hiding this comment.
Ensure RDS instances have backup policy
Resource: aws_rds_cluster.app1-rds-cluster | Bridgecrew ID: BC_AWS_GENERAL_46 | Checkov ID: CKV_AWS_133
How to Fix
resource "aws_rds_cluster" "test" {
...
+ backup_retention_period = 35
}Description
This check examines the attribute **backup_retention_period** this should have a value 1-35, and checks if its set to 0 which would disable the backup.This check is currently under review and maybe suppressed in future releases.
| git_repo = "terragoat" | ||
| yor_trace = "d33c9292-952b-4c1f-9973-b6dbad519461" | ||
| } | ||
| storage_encrypted = false |
There was a problem hiding this comment.
Ensure that RDS Cluster audit logging is enabled for MySQL engine
Resource: aws_rds_cluster.app2-rds-cluster | Bridgecrew ID: BC_AWS_LOGGING_44 | Checkov ID: CKV_AWS_325
| git_repo = "terragoat" | ||
| yor_trace = "b6f2c2ec-0715-46a0-83d4-502e588826d1" | ||
| } | ||
| storage_encrypted = false |
There was a problem hiding this comment.
Ensure that RDS Cluster audit logging is enabled for MySQL engine
Resource: aws_rds_cluster.app1-rds-cluster | Bridgecrew ID: BC_AWS_LOGGING_44 | Checkov ID: CKV_AWS_325
| git_repo = "terragoat" | ||
| yor_trace = "b6f2c2ec-0715-46a0-83d4-502e588826d1" | ||
| } | ||
| storage_encrypted = false |
There was a problem hiding this comment.
Ensure that RDS Cluster log capture is enabled
Resource: aws_rds_cluster.app1-rds-cluster | Bridgecrew ID: BC_AWS_LOGGING_43 | Checkov ID: CKV_AWS_324
| git_repo = "terragoat" | ||
| yor_trace = "b6f2c2ec-0715-46a0-83d4-502e588826d1" | ||
| } | ||
| storage_encrypted = false |
There was a problem hiding this comment.
Ensure that RDS Aurora Clusters have backtracking enabled
Resource: aws_rds_cluster.app1-rds-cluster | Bridgecrew ID: BC_AWS_GENERAL_233 | Checkov ID: CKV_AWS_326
| git_repo = "terragoat" | ||
| yor_trace = "d33c9292-952b-4c1f-9973-b6dbad519461" | ||
| } | ||
| storage_encrypted = false |
There was a problem hiding this comment.
Ensure that RDS Aurora Clusters have backtracking enabled
Resource: aws_rds_cluster.app2-rds-cluster | Bridgecrew ID: BC_AWS_GENERAL_233 | Checkov ID: CKV_AWS_326
| git_repo = "terragoat" | ||
| yor_trace = "d33c9292-952b-4c1f-9973-b6dbad519461" | ||
| } | ||
| storage_encrypted = false |
There was a problem hiding this comment.
Ensure RDS cluster configured to copy tags to snapshots
Resource: aws_rds_cluster.app2-rds-cluster | Bridgecrew ID: BC_AWS_GENERAL_225 | Checkov ID: CKV_AWS_313
| git_repo = "terragoat" | ||
| yor_trace = "b6f2c2ec-0715-46a0-83d4-502e588826d1" | ||
| } | ||
| storage_encrypted = false |
There was a problem hiding this comment.
Suggested change
| storage_encrypted = false | |
| storage_encrypted = true |
Ensure all data stored in Aurora is securely encrypted at rest
Resource: aws_rds_cluster.app1-rds-cluster | Bridgecrew ID: BC_AWS_GENERAL_38 | Checkov ID: CKV_AWS_96
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.