Skip to content

Commit

Permalink
Merge pull request #6 from Real-Life-IaC/enable-bucket-encryption
Browse files Browse the repository at this point in the history
Merge enable-bucket-encryption
  • Loading branch information
andresionek91 committed Feb 1, 2024
2 parents f183226 + de5af9b commit d024c4a
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/actions/deploy/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,6 @@ runs:
role-session-name: GitHubActions-${{ github.event.repository.name }}
aws-region: ${{ inputs.aws-region }}

- name: Deploy Stack
- name: CDK Deploy
shell: bash
run: poetry run cdk deploy ${{ inputs.stack-name }} --force
2 changes: 0 additions & 2 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,10 @@ on:
- main
pull_request:
types:
- opened
- labeled
- synchronize

permissions:
contents: read
id-token: write

jobs:
Expand Down
1 change: 1 addition & 0 deletions infra/stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,5 @@ def __init__(self, scope: Construct, id: str, **kwargs) -> None:
id="Bucket",
block_public_access=s3.BlockPublicAccess.BLOCK_ALL,
versioned=True,
encryption=s3.BucketEncryption.S3_MANAGED,
)
9 changes: 9 additions & 0 deletions tests/infra/test_stack.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,14 @@ def test_bucket(template: Template):
"RestrictPublicBuckets": True,
},
"VersioningConfiguration": {"Status": "Enabled"},
"BucketEncryption": {
"ServerSideEncryptionConfiguration": [
{
"ServerSideEncryptionByDefault": {
"SSEAlgorithm": "AES256"
}
}
]
},
},
)

0 comments on commit d024c4a

Please sign in to comment.