Skip to content

MEM-1138: Add IRSA to info and advice datastore - staging - #44487

Open
Ian King (ian-antking) wants to merge 1 commit into
mainfrom
mem-1138-staging
Open

MEM-1138: Add IRSA to info and advice datastore - staging#44487
Ian King (ian-antking) wants to merge 1 commit into
mainfrom
mem-1138-staging

Conversation

@ian-antking

@ian-antking Ian King (ian-antking) commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Adds RDS IAM authentication and moves the Microsoft Entra OAuth2 config into
AWS Secrets Manager for the staging environment.

  • rds-postgres.tf -- enables IAM auth on the RDS instance (enable_irsa = true)
    and grants the rds_iam role to the database user
  • irsa.tf (new) -- creates a Kubernetes service account annotated with an IAM
    role scoped to rds-db:connect for this instance
  • versions.tf / main.tf -- adds the cyrilgdn/postgresql provider
  • variables.tf -- adds eks_cluster_name, required by the IRSA module

The existing rds-postgresql-instance-output k8s secret is unchanged -- username
and password remain available for dev access to these environments.

@ian-antking
Ian King (ian-antking) requested a review from a team as a code owner July 30, 2026 10:28

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This PR affects multiple namespaces

  • laa-info-and-advice-datastore-staging
  • laa-info-and-advice-datastore-uat
    Please submit a separate PR for each namespace.

@sablumiah

Copy link
Copy Markdown
Contributor

Terraform Plan Summary

Terraform Plan: 17 to be created, 0 to be destroyed, 1 to be updated, 0 to be replaced and 25 unchanged.

Resources to create:

+ kubernetes_secret.irsa
+ module.irsa.kubernetes_service_account.generated_sa
+ module.irsa.module.iam_assumable_role.aws_iam_role.this[0]
+ module.irsa.module.iam_assumable_role.aws_iam_role_policy_attachment.this["rds"]
+ module.irsa.random_id.id
+ module.rds.aws_iam_policy.irsa[0]
+ module.secrets_manager.aws_iam_policy.irsa_policy
+ module.secrets_manager.aws_secretsmanager_secret.secret["laa-info-and-advice-datastore-entra-staging"]
+ module.secrets_manager.kubernetes_manifest.external_secrets["laa-info-and-advice-datastore-entra-staging"]
+ module.secrets_manager.kubernetes_manifest.secret_store
+ module.secrets_manager.module.irsa.kubernetes_service_account.generated_sa
+ module.secrets_manager.module.irsa.module.iam_assumable_role.aws_iam_role.this[0]
+ module.secrets_manager.module.irsa.module.iam_assumable_role.aws_iam_role_policy_attachment.this["irsa"]
+ module.secrets_manager.module.irsa.random_id.id
+ module.secrets_manager.random_id.secret_name["laa-info-and-advice-datastore-entra-staging"]
+ module.secrets_manager.random_id.serviceaccount_id
+ postgresql_grant_role.rds_iam

Resources to update:

! module.rds.aws_db_parameter_group.custom_parameters

@sablumiah

Copy link
Copy Markdown
Contributor

This PR CANNOT be auto approved and requires manual approval from the Cloud Platform team.
Reason:
🕵️‍♂️ Manual review required: OPA auto approve policy checks did not pass.

Test Passed? Reason
allowlist This PR includes changes to modules / resources which are not on the allowlist, so we can't auto approve these changes. Please request a Cloud Platform team member's review in #ask-cloud-platform
ecr Valid ECR related terraform changes
hmpps-template Valid hmpps template related terraform changes
irsa Valid irsa related terraform changes
kubernetes_secret Valid K8s secret related terraform changes
rds Valid RDS module related terraform changes
secrets_manager Valid secrets manager related terraform changes
service_pod Valid Service pod related changes
sns Valid sns related terraform changes

Please raise it in #ask-cloud-platform Slack channel.

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