-
Notifications
You must be signed in to change notification settings - Fork 2
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
chore: setup staging GOV_UK_PAY_TOKEN_GLOUCESTER #2706
Conversation
Removed vultr server and associated DNS entries |
- This will allow the credentials for Medway and Gloucester to be read on staging and production - As there won't be credentials on prod this will break
… environment - Add optional key of stagingOnly - Add guard clause in generateSecrets to skip Medway and Gloucester secret generation in production
@@ -25,6 +25,7 @@ export const generateTeamSecrets = ( | |||
): awsx.ecs.KeyValuePair[] => { | |||
const secrets: awsx.ecs.KeyValuePair[] = []; | |||
teams.forEach((team) => { | |||
if (env === "production" && team?.stagingOnly) return; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Comment:
I think this is a simple change and should work although I guess we can't test it until it's on staging/prod?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small suggestion!
infrastructure/common/teams.ts
Outdated
@@ -14,6 +14,7 @@ interface Team { | |||
name: string; | |||
// Must match "name" in the Digital Land dataset "local-authority-district" (https://www.planning.data.gov.uk/dataset/local-authority-district) | |||
uniformInstances?: string[]; | |||
stagingOnly?: boolean; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: To be totally explicit here we should link this to GovPay, e.g. govPayStagingOnly
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did consider this although I think as it's at a top level it would skip all secret generation on prod? Although we're only using it at the pay level it's not specific to gov pay?
I'm happy to go with that though as I guess it does better match how we're using it right now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think I maybe misunderstood your suggestion, I'll refactor to put it inline with the uniformInstances
pattern 👍
Added here: 55fff27
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perfect!
- Rename from stagingOnly to govPayStagingOnly to be more specific - Rather than a general guard clause specifically only add govPay secret if either sandbox or staging
What:
GOV_UK_PAY_TOKEN_GLOUCESTER
to pulumi staging stack.env.example
andserver.ts
accordingly.pizza-secrets
, addGOV_UK_PAY_TOKEN_GLOUCESTER
to .env and pushpizza-secrets
to allow sandbox gov uk pay to work on pizzasteams
to allow gov pay uk to work on staginggenerateTeamSecrets
to only generate Medway and Gloucester secrets on staging to avoid errors on prodWhy:
teams.ts
to allow the key to work on staging: https://editor.planx.dev/medway/gov-pay-staging-test/preview?analytics=falsegenerateTeamSecrets
to handle the difference in staging/prod credsTesting:
Follow up PR