From 51f39d469d2684f2debabc69bc96b2fd74256167 Mon Sep 17 00:00:00 2001 From: prancer Date: Mon, 23 May 2022 10:06:32 +0000 Subject: [PATCH] Fixed PR-AWS-CFR-KMS-001: AWS Customer Master Key (CMK) rotation is not enabled --- efs/efs.yaml | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/efs/efs.yaml b/efs/efs.yaml index d34f00f..39720f1 100644 --- a/efs/efs.yaml +++ b/efs/efs.yaml @@ -1,7 +1,7 @@ -AWSTemplateFormatVersion: 2010-09-09 +AWSTemplateFormatVersion: '2010-09-09' Resources: FileSystemResource: - Type: 'AWS::EFS::FileSystem' + Type: AWS::EFS::FileSystem Properties: BackupPolicy: Status: ENABLED @@ -13,30 +13,29 @@ Resources: - Key: Name Value: TestFileSystem FileSystemPolicy: - Version: 2012-10-17 + Version: '2012-10-17' Statement: - Effect: Allow Action: '*' Principal: '*' - KmsKeyId: !GetAtt - - key - - Arn + KmsKeyId: !GetAtt 'key.Arn' key: - Type: 'AWS::KMS::Key' + Type: AWS::KMS::Key Properties: KeyPolicy: - Version: 2012-10-17 + Version: '2012-10-17' Id: key-default-1 Statement: - Sid: Allow administration of the key Effect: Allow Principal: - AWS: !Join + AWS: !Join - '' - - 'arn:aws:iam::' - !Ref 'AWS::AccountId' - - ':root' + - :root Action: - - 'kms:*' + - kms:* Resource: - '*' + EnableKeyRotation: true