github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/aws/dynamodb/enable_recovery.tf.go (about)

     1  package dynamodb
     2  
     3  var terraformEnableRecoveryGoodExamples = []string{
     4  	`
     5   resource "aws_dynamodb_table" "good_example" {
     6   	name             = "example"
     7   	hash_key         = "TestTableHashKey"
     8   	billing_mode     = "PAY_PER_REQUEST"
     9   	stream_enabled   = true
    10   	stream_view_type = "NEW_AND_OLD_IMAGES"
    11     
    12   	attribute {
    13   	  name = "TestTableHashKey"
    14   	  type = "S"
    15   	}
    16   
    17   	point_in_time_recovery {
    18   		enabled = true
    19   	}
    20   }
    21   `,
    22  }
    23  
    24  var terraformEnableRecoveryBadExamples = []string{
    25  	`
    26   resource "aws_dynamodb_table" "bad_example" {
    27   	name             = "example"
    28   	hash_key         = "TestTableHashKey"
    29   	billing_mode     = "PAY_PER_REQUEST"
    30   	stream_enabled   = true
    31   	stream_view_type = "NEW_AND_OLD_IMAGES"
    32     
    33   	attribute {
    34   	  name = "TestTableHashKey"
    35   	  type = "S"
    36   	}
    37   }
    38   `,
    39  }
    40  
    41  var terraformEnableRecoveryLinks = []string{
    42  	`https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/dynamodb_table#point_in_time_recovery`,
    43  }
    44  
    45  var terraformEnableRecoveryRemediationMarkdown = ``