Skip to content

Commit

Permalink
Move from ACL enforced bucket ownership to Ownership Controls + megal…
Browse files Browse the repository at this point in the history
…inter prettier fix (#666)

* Remove ACLs to enforce bucket ownership, use OwnershipControls instead

* Fix MegaLinter JSON Prettier command
  • Loading branch information
sbkok authored Dec 8, 2023
1 parent 68fad6d commit 0c038b2
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 11 deletions.
4 changes: 1 addition & 3 deletions .mega-linter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@ FILEIO_REPORTER: false

# Install plugin for list handling.
JSON_PRETTIER_PRE_COMMANDS:
- command: |
npm install -g prettier-plugin-multiline-arrays@1.1.4
npm install --prefix /node-deps/ prettier-plugin-multiline-arrays@1.1.4
- command: "npm install prettier-plugin-multiline-arrays@3.0.0"
cwd: "workspace"

CLOUDFORMATION_CFN_LINT_CONFIG_FILE: '.cfnlintrc'
Expand Down
4 changes: 2 additions & 2 deletions .prettierrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ module.exports = {
],
trailingComma: 'es5',
semi: false,
singleQuote: true
}
singleQuote: true,
};
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ Resources:
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Properties:
AccessControl: BucketOwnerFullControl
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1048,7 +1048,9 @@ Resources:
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Properties:
AccessControl: BucketOwnerFullControl
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
Expand All @@ -1073,7 +1075,9 @@ Resources:
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Properties:
AccessControl: BucketOwnerFullControl
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
Expand Down
12 changes: 9 additions & 3 deletions src/template.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,9 @@ Resources:
UpdateReplacePolicy: Retain
Type: AWS::S3::Bucket
Properties:
AccessControl: BucketOwnerFullControl
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
Expand All @@ -169,7 +171,9 @@ Resources:
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Properties:
AccessControl: BucketOwnerFullControl
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
Expand Down Expand Up @@ -684,7 +688,9 @@ Resources:
DeletionPolicy: Retain
UpdateReplacePolicy: Retain
Properties:
AccessControl: BucketOwnerFullControl
OwnershipControls:
Rules:
- ObjectOwnership: BucketOwnerEnforced
BucketEncryption:
ServerSideEncryptionConfiguration:
- ServerSideEncryptionByDefault:
Expand Down

0 comments on commit 0c038b2

Please sign in to comment.