MAPA-277: add change someones cell api ECR and RDS - preprod - #44927
Open
Michael Willis (Mjwillis) wants to merge 2 commits into
Open
MAPA-277: add change someones cell api ECR and RDS - preprod#44927Michael Willis (Mjwillis) wants to merge 2 commits into
Michael Willis (Mjwillis) wants to merge 2 commits into
Conversation
…annotation annotation-check resolves cloud-platform.justice.gov.uk/team-name against the GitHub API, and "Move a Prisoner" is a display name rather than a team slug, so the lookup 404s. Uses the slug, matching the hmpps-cell-sharing-risk-assessment namespaces owned by the same team. Same fix as merged for dev in #44922.
|
Team name: move-a-prisoner
Repository: [https://github.com/ministryofjustice/hmpps-change-someones-cell.git https://github.com/ministryofjustice/hmpps-change-someones-cell-api]
|
Contributor
Terraform Plan SummaryTerraform Plan: 26 to be created, 0 to be destroyed, 0 to be updated, 0 to be replaced and 25 unchanged.Resources to create:+ kubernetes_config_map.rds
+ kubernetes_secret.rds
+ module.hmpps-change-someones-cell-api.github_actions_environment_variable.namespace_env_var
+ module.hmpps-change-someones-cell-api.github_repository_environment.env
+ module.hmpps-change-someones-cell-api.kubernetes_secret.application-insights[0]
+ module.hmpps-change-someones-cell-api.kubernetes_secret.kotlin_client_creds[0]
+ module.hmpps-change-someones-cell-api.module.service_account.github_actions_environment_secret.cluster-name["hmpps-change-someones-cell-api.preprod"]
+ module.hmpps-change-someones-cell-api.module.service_account.github_actions_environment_secret.cluster-namespace["hmpps-change-someones-cell-api.preprod"]
+ module.hmpps-change-someones-cell-api.module.service_account.github_actions_environment_secret.serviceaccount-cert["hmpps-change-someones-cell-api.preprod"]
+ module.hmpps-change-someones-cell-api.module.service_account.github_actions_environment_secret.serviceaccount-token["hmpps-change-someones-cell-api.preprod"]
+ module.hmpps-change-someones-cell-api.module.service_account.kubernetes_role.github_actions_role
+ module.hmpps-change-someones-cell-api.module.service_account.kubernetes_role_binding.github-actions-rolebinding
+ module.hmpps-change-someones-cell-api.module.service_account.kubernetes_secret_v1.serviceaccount-token
+ module.hmpps-change-someones-cell-api.module.service_account.kubernetes_service_account.github_actions_serviceaccount
+ module.hmpps-change-someones-cell-api.random_password.session_secret
+ module.hmpps-change-someones-cell-api.time_rotating.weekly
+ module.hmpps-change-someones-cell.time_rotating.weekly
+ module.rds.aws_db_instance.rds
+ module.rds.aws_db_parameter_group.custom_parameters
+ module.rds.aws_db_subnet_group.db_subnet[0]
+ module.rds.aws_kms_alias.alias[0]
+ module.rds.aws_kms_key.kms[0]
+ module.rds.aws_security_group.rds-sg
+ module.rds.random_id.id
+ module.rds.random_password.password
+ module.rds.random_string.username |
Contributor
|
This PR CANNOT be auto approved and requires manual approval from the Cloud Platform team. |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds the resources for a second component in this existing namespace:
hmpps-change-someones-cell-api, a new Kotlin API that takes over cell move orchestration fromwhereabouts-api, which is being decommissioned.The API deliberately reuses the UI's namespace rather than getting its own, since it is the same product (DPS059) and the same team.
Follows #44922, which did dev. That change is proven — the API now deploys and reports healthy in dev, with Flyway having migrated the real RDS instance.
Changes
resources/github.tf— a secondcloud-platform-terraform-hmpps-templatemodule forhmpps-change-someones-cell-api, withsource_template_repo = "hmpps-template-kotlin"andreviewer_teams = [var.github_deployment_team]to match the existing UI module in this environment. This provisions the GitHub Actions deploy environment and itsKUBE_*secrets.resources/rds-postgresql.tf— Postgres 18 ondb.t4g.micro, plus therds-postgresql-instance-outputsecret and configmap. Modelled on thehmpps-cell-sharing-risk-assessmentinstances owned by the same team.00-namespace.yaml— appends the new repo to thesource-codeannotation, and fixes theteam-nameannotation (see below).06-certificate.yaml— certificate for the API hostname.The team-name fix
annotation-checkresolvescloud-platform.justice.gov.uk/team-nameagainst the GitHub API as a team slug, and this namespace had"Move a Prisoner"— a display name — so the lookup 404s.This is pre-existing and unrelated to the new API; it surfaced because this is the first change to
00-namespace.yamlsince that check was added. Corrected to themove-a-prisonerslug, which exists and is what thehmpps-cell-sharing-risk-assessment-*namespaces already use. Same fix as merged for dev.Notes for review
An RDS instance existed in this namespace until
14b0db32ab("MAP-1366 removing hmpps-prisoner-cell-allocation-api"), which removed it along with the retired API. This largely restores what that commit deleted.Existing terraform formatting in
github.tfis left as it was — it was already non-fmt-clean before this change.Related:
ministryofjustice/hmpps-change-someones-cell-api, JIRA MAPA-277 under epic MAPA-275.