Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added KMS key replication to eu-west-1 #7439

Merged
merged 1 commit into from
Jul 5, 2024
Merged

Conversation

ep-93
Copy link
Contributor

@ep-93 ep-93 commented Jul 5, 2024

A reference to the issue / Description of it

Requested here - https://moj.enterprise.slack.com/archives/C013RM6MFFW/p1720178339019439

How does this PR fix the problem?

Copies a key to another region as a replica. Will repeat for all keys if it works.

How has this been tested?

Plan looks good.

Checklist (check x in [ ] of list items)

  • [ x] I have performed a self-review of my own code
  • [ x] All checks have passed
  • I have made corresponding changes to the documentation (If it works I will)
  • Plan and discussed how it should be deployed to PROD (If needed)

Additional comments (if any)

N/A

@ep-93 ep-93 requested a review from a team as a code owner July 5, 2024 13:28
Copy link
Contributor

github-actions bot commented Jul 5, 2024

Trivy Scan Success

Show Output ```hcl

Trivy will check the following folders:
terraform/modernisation-platform-account


Running Trivy in terraform/modernisation-platform-account
2024-07-05T13:29:55Z INFO Need to update DB
2024-07-05T13:29:55Z INFO Downloading DB... repository="ghcr.io/aquasecurity/trivy-db:2"
2024-07-05T13:29:57Z INFO Vulnerability scanning is enabled
2024-07-05T13:29:57Z INFO Misconfiguration scanning is enabled
2024-07-05T13:29:57Z INFO Need to update the built-in policies
2024-07-05T13:29:57Z INFO Downloading the built-in policies...
74.86 KiB / 74.86 KiB [-----------------------------------------------------------] 100.00% ? p/s 0s2024-07-05T13:29:57Z INFO Secret scanning is enabled
2024-07-05T13:29:57Z INFO If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-07-05T13:29:57Z INFO Please see also https://aquasecurity.github.io/trivy/v0.53/docs/scanner/secret#recommendation for faster secret detection
2024-07-05T13:30:01Z INFO Number of language-specific files num=0
2024-07-05T13:30:01Z INFO Detected config files num=14

github.com/ministryofjustice/modernisation-platform-terraform-baselines?ref=2b4010fdcb5dfb78683e5fdf2dfb98aa17917e4f/config.tf (terraform)

Tests: 14 (SUCCESSES: 0, FAILURES: 0, EXCEPTIONS: 14)
Failures: 0 (HIGH: 0, CRITICAL: 0)

github.com/ministryofjustice/modernisation-platform-terraform-baselines?ref=2b4010fdcb5dfb78683e5fdf2dfb98aa17917e4f/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=8688bc15a08fbf5a4f4eef9b7433c5a417df8df1/main.tf (terraform)

Tests: 7 (SUCCESSES: 5, FAILURES: 0, EXCEPTIONS: 2)
Failures: 0 (HIGH: 0, CRITICAL: 0)

github.com/ministryofjustice/modernisation-platform-terraform-baselines?ref=2b4010fdcb5dfb78683e5fdf2dfb98aa17917e4f/modules/cloudtrail/main.tf (terraform)

Tests: 5 (SUCCESSES: 3, FAILURES: 0, EXCEPTIONS: 2)
Failures: 0 (HIGH: 0, CRITICAL: 0)

github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=cadab519b10a7d28dfa3b77d407725db6b37614a/main.tf (terraform)

Tests: 14 (SUCCESSES: 10, FAILURES: 0, EXCEPTIONS: 4)
Failures: 0 (HIGH: 0, CRITICAL: 0)

github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=cadab519b10a7d28dfa3b77d407725db6b37614a/replication.tf (terraform)

Tests: 35 (SUCCESSES: 6, FAILURES: 0, EXCEPTIONS: 29)
Failures: 0 (HIGH: 0, CRITICAL: 0)

iam.tf (terraform)

Tests: 5 (SUCCESSES: 0, FAILURES: 0, EXCEPTIONS: 5)
Failures: 0 (HIGH: 0, CRITICAL: 0)

trivy_exitcode=0

</details> #### `Checkov Scan` Success
<details><summary>Show Output</summary>

```hcl

*****************************

Checkov will check the following folders:
terraform/modernisation-platform-account

*****************************

Running Checkov in terraform/modernisation-platform-account
Excluding the following checks: CKV_GIT_1,CKV_AWS_126,CKV2_AWS_38,CKV2_AWS_39
2024-07-05 13:30:03,658 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-baselines?ref=2b4010fdcb5dfb78683e5fdf2dfb98aa17917e4f:None (for external modules, the --download-external-modules flag is required)
2024-07-05 13:30:03,658 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-iam-superadmins?ref=ed65a526a2bcd687b47e18988a6c0edead771636:None (for external modules, the --download-external-modules flag is required)
2024-07-05 13:30:03,658 [MainThread  ] [WARNI]  Failed to download module terraform-aws-modules/iam/aws//modules/iam-group-with-policies:~> 5.0 (for external modules, the --download-external-modules flag is required)
2024-07-05 13:30:03,658 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-github-oidc-provider?ref=82f546bd5f002674138a2ccdade7d7618c6758b3:None (for external modules, the --download-external-modules flag is required)
2024-07-05 13:30:03,658 [MainThread  ] [WARNI]  Failed to download module github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=cadab519b10a7d28dfa3b77d407725db6b37614a:None (for external modules, the --download-external-modules flag is required)
terraform scan results:

Passed checks: 224, Failed checks: 0, Skipped checks: 24


checkov_exitcode=0

CTFLint Scan Success

Show Output
*****************************

Setting default tflint config...
Running tflint --init...
Installing "terraform" plugin...
Installed "terraform" (source: github.com/terraform-linters/tflint-ruleset-terraform, version: 0.5.0)
tflint will check the following folders:
terraform/modernisation-platform-account

*****************************

Running tflint in terraform/modernisation-platform-account
Excluding the following checks: terraform_unused_declarations
tflint_exitcode=0

Trivy Scan Success

Show Output
*****************************

Trivy will check the following folders:
terraform/modernisation-platform-account

*****************************

Running Trivy in terraform/modernisation-platform-account
2024-07-05T13:29:55Z	INFO	Need to update DB
2024-07-05T13:29:55Z	INFO	Downloading DB...	repository="ghcr.io/aquasecurity/trivy-db:2"
2024-07-05T13:29:57Z	INFO	Vulnerability scanning is enabled
2024-07-05T13:29:57Z	INFO	Misconfiguration scanning is enabled
2024-07-05T13:29:57Z	INFO	Need to update the built-in policies
2024-07-05T13:29:57Z	INFO	Downloading the built-in policies...
74.86 KiB / 74.86 KiB [-----------------------------------------------------------] 100.00% ? p/s 0s2024-07-05T13:29:57Z	INFO	Secret scanning is enabled
2024-07-05T13:29:57Z	INFO	If your scanning is slow, please try '--scanners vuln' to disable secret scanning
2024-07-05T13:29:57Z	INFO	Please see also https://aquasecurity.github.io/trivy/v0.53/docs/scanner/secret#recommendation for faster secret detection
2024-07-05T13:30:01Z	INFO	Number of language-specific files	num=0
2024-07-05T13:30:01Z	INFO	Detected config files	num=14

github.com/ministryofjustice/modernisation-platform-terraform-baselines?ref=2b4010fdcb5dfb78683e5fdf2dfb98aa17917e4f/config.tf (terraform)
==========================================================================================================================================
Tests: 14 (SUCCESSES: 0, FAILURES: 0, EXCEPTIONS: 14)
Failures: 0 (HIGH: 0, CRITICAL: 0)


github.com/ministryofjustice/modernisation-platform-terraform-baselines?ref=2b4010fdcb5dfb78683e5fdf2dfb98aa17917e4f/github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=8688bc15a08fbf5a4f4eef9b7433c5a417df8df1/main.tf (terraform)
=============================================================================================================================================================================================================================================================
Tests: 7 (SUCCESSES: 5, FAILURES: 0, EXCEPTIONS: 2)
Failures: 0 (HIGH: 0, CRITICAL: 0)


github.com/ministryofjustice/modernisation-platform-terraform-baselines?ref=2b4010fdcb5dfb78683e5fdf2dfb98aa17917e4f/modules/cloudtrail/main.tf (terraform)
===========================================================================================================================================================
Tests: 5 (SUCCESSES: 3, FAILURES: 0, EXCEPTIONS: 2)
Failures: 0 (HIGH: 0, CRITICAL: 0)


github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=cadab519b10a7d28dfa3b77d407725db6b37614a/main.tf (terraform)
========================================================================================================================================
Tests: 14 (SUCCESSES: 10, FAILURES: 0, EXCEPTIONS: 4)
Failures: 0 (HIGH: 0, CRITICAL: 0)


github.com/ministryofjustice/modernisation-platform-terraform-s3-bucket?ref=cadab519b10a7d28dfa3b77d407725db6b37614a/replication.tf (terraform)
===============================================================================================================================================
Tests: 35 (SUCCESSES: 6, FAILURES: 0, EXCEPTIONS: 29)
Failures: 0 (HIGH: 0, CRITICAL: 0)


iam.tf (terraform)
==================
Tests: 5 (SUCCESSES: 0, FAILURES: 0, EXCEPTIONS: 5)
Failures: 0 (HIGH: 0, CRITICAL: 0)

trivy_exitcode=0

Copy link
Contributor

@davidkelliott davidkelliott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@ep-93 ep-93 added this pull request to the merge queue Jul 5, 2024
Merged via the queue into main with commit 4de2a8d Jul 5, 2024
5 checks passed
@ep-93 ep-93 deleted the feature/kms-key-region branch July 5, 2024 13:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants