BAU: Create data api secrets with correct names#2117
Merged
Conversation
Previously, we created our own secrets for the Data API with a custom name format. The Query Editor Console can find secrets with the name format `rds-db-credentials/cluster-*/<credential-reference>`, so if we create our secrets with that format, this will be a better experience for engineers using the Query Editor Console. The Query editor console will automatically create a secret with this format if someone uses the `Add new database credentials` option in the console. We should clean these up, so as not to pollute the credentials list with potentially outdated secrets. A better long-term solution would be to prevent engineers from creating secrets in the first place, but this is a good interim step. - Create secrets with the correct name format - Allow engineer access to secrets with the new name format - Update forms-cli to use the new secrets - Add a post-apply script to delete any user-created secrets
d387e34 to
9a528eb
Compare
We had two tests which checked that the `aws_authenticated?` method
returned false when not authenticated, and that it printed a warning to
stdout. Instead, do it as one test, and eat the output in the test, so
that it doesn't pollute the test output when running the full suite.
Also, generally configure rspec to block writes to stdout - if we're
trying to match output in a test, we use `expect { ... }.to output(...)`
if we're not trying to match it, it's just unnecessary noise in the test
output.
9a528eb to
1310a03
Compare
cadmiumcat
approved these changes
May 14, 2026
Contributor
cadmiumcat
left a comment
There was a problem hiding this comment.
This works well and makes more sense 🙌
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.
What problem does this pull request solve?
Trello card: https://trello.com/c/NKwHyKNP/3100-fix-rds-data-api
Previously, we created our own secrets for the Data API with a custom
name format. The Query Editor Console can find secrets with the name
format
rds-db-credentials/cluster-*/<credential-reference>, so if wecreate our secrets with that format, this will be a better experience
for engineers using the Query Editor Console.
The Query editor console will automatically create a secret with this
format if someone uses the
Add new database credentialsoption in theconsole. We should clean these up, so as not to pollute the credentials
list with potentially outdated secrets. A better long-term solution
would be to prevent engineers from creating secrets in the first place,
but this is a good interim step.
I've also drive-by fixed an annoyance with the specs - happy to move this to a new PR if it's too chunky for this one.
Testing
You can test in dev where it's currently deployed:
Reminders
If you've made changes to the deployer role (files in
modules/deployer-access):make <environment> forms/account applyon the relevant environments (dev,stagingand/orprod)apply-forms-terraform-<environment>pipelines have run successfully