-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🔧 Update Secrets + Add workflow (#6559)
* 🔧 Update Secrets + Add workflow * workflow tabs * 🔥 Remove unneeded data blocks
- Loading branch information
Showing
5 changed files
with
81 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
--- | ||
name: 📥 Maintenance - Create JupyterLab Issue | ||
|
||
on: | ||
schedule: | ||
- cron: "0 8 1 * *" # UTC time: “At 08:00 on first day-of-month” | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
create-maintenance-issue: | ||
name: Create Maintenance Issue | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- name: Create Maintenance Issue | ||
id: create_maintenance_issue | ||
run: | | ||
if [[ "${CLOSE_PREVIOUS}" == true ]]; then | ||
previous_issue_number=$(gh issue list \ | ||
--label "$LABELS" \ | ||
--json number \ | ||
--jq '.[0].number') | ||
if [[ -n $previous_issue_number ]]; then | ||
gh issue close "$previous_issue_number" | ||
gh issue unpin "$previous_issue_number" | ||
fi | ||
fi | ||
new_issue_url=$(gh issue create \ | ||
--title "$TITLE" \ | ||
--assignee "$ASSIGNEES" \ | ||
--label "$LABELS" \ | ||
--body "$BODY") | ||
if [[ $PINNED == true ]]; then | ||
gh issue pin "$new_issue_url" | ||
fi | ||
env: | ||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
GH_REPO: ${{ github.repository }} | ||
TITLE: 📥 Maintenance - JML Report | ||
ASSIGNEES: | ||
LABELS: maintenance | ||
BODY: | | ||
### User Story | ||
As a… engineer on the Analytical Platform | ||
I need/want/expect to… keep the JML report mechanism up to date | ||
So that… security / best practice etc | ||
### Definition of Done | ||
- [ ] Merge any open dependabot Pull Requests in the JML report [repository](https://github.com/ministryofjustice/analytical-platform-jml-report). | ||
- [ ] Create new [release](https://github.com/ministryofjustice/analytical-platform-jml-report/releases). | ||
- [ ] Update the [lambda function](https://github.com/ministryofjustice/analytical-platform/blob/main/terraform/aws/analytical-platform-data-production/joiners-movers-leavers/lambda-functions.tf) to consume the new release | ||
PINNED: false | ||
CLOSE_PREVIOUS: false |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 22 additions & 10 deletions
32
terraform/aws/analytical-platform-data-production/joiners-movers-leavers/secrets.tf
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,25 @@ | ||
#tfsec:ignore:avd-aws-0098 CMK not required currently | ||
resource "aws_secretsmanager_secret" "govuk_notify_api_key" { | ||
# checkov:skip=CKV2_AWS_57:These won't be rotated in the traditional manner | ||
# checkov:skip=CKV_AWS_149:No KMS key needed as per above, these won't be rotated | ||
name = "gov-uk-notify/production/api-key" | ||
module "jml_email_secret" { | ||
#checkov:skip=CKV_TF_1:Module registry does not support commit hashes for versions | ||
#checkov:skip=CKV_TF_2:Module registry does not support tags for versions | ||
|
||
source = "terraform-aws-modules/secrets-manager/aws" | ||
version = "1.3.1" | ||
|
||
name = "jml-report/email" | ||
|
||
ignore_secret_changes = true | ||
secret_string = "CHANGEME" | ||
} | ||
|
||
#tfsec:ignore:avd-aws-0098 CMK not required currently | ||
resource "aws_secretsmanager_secret" "jml_email" { | ||
# checkov:skip=CKV2_AWS_57:These won't be rotated in the traditional manner | ||
# checkov:skip=CKV_AWS_149:No KMS key needed as per above, these won't be rotated | ||
name = "jml/email" | ||
module "govuk_notify_api_key_secret" { | ||
#checkov:skip=CKV_TF_1:Module registry does not support commit hashes for versions | ||
#checkov:skip=CKV_TF_2:Module registry does not support tags for versions | ||
|
||
source = "terraform-aws-modules/secrets-manager/aws" | ||
version = "1.3.1" | ||
|
||
name = "gov-uk-notify/api-key" | ||
|
||
ignore_secret_changes = true | ||
secret_string = "CHANGEME" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters