github.com/khulnasoft-lab/defsec@v1.0.5-0.20230827010352-5e9f46893d95/rules/cloud/policies/aws/ec2/encryption_customer_key.cf.go (about)

     1  package ec2
     2  
     3  var cloudFormationEncryptionCustomerKeyGoodExamples = []string{
     4  	`---
     5  Resources:
     6    GoodExample:
     7      Type: AWS::EC2::Volume
     8      Properties: 
     9        Size: 100
    10        Encrypted: true
    11        KmsKeyId: "alias/volumeEncrypt"
    12      DeletionPolicy: Snapshot
    13  `,
    14  	`---
    15  Resources:
    16    GoodExample:
    17      Type: AWS::EC2::Volume
    18      Properties: 
    19        Size: 100
    20        Encrypted: true
    21        KmsKeyId: !ImportValue "MyStack:Key"
    22      DeletionPolicy: Snapshot
    23  `,
    24  }
    25  
    26  var cloudFormationEncryptionCustomerKeyBadExamples = []string{
    27  	`---
    28  Resources:
    29    BadExample:
    30      Type: AWS::EC2::Volume
    31      Properties:
    32        Size: 100
    33        AvailabilityZone: !GetAtt Ec2Instance.AvailabilityZone
    34      DeletionPolicy: Snapshot
    35  `,
    36  }
    37  
    38  var cloudFormationEncryptionCustomerKeyLinks = []string{}
    39  
    40  var cloudFormationEncryptionCustomerKeyRemediationMarkdown = ``