-
Notifications
You must be signed in to change notification settings - Fork 5
move more lambdas over to Sr lambda construct #3107
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
Conversation
| new StripeDisputes(app, 'stripe-disputes-CODE', { | ||
| stack: 'support', | ||
| stage: 'CODE', | ||
| domainName: `stripe-disputes-code.${supportApisDomain}`, | ||
| hostedZoneId: supportHostedZoneId, | ||
| certificateId: supportCertificateId, | ||
| }); | ||
| new StripeDisputes(app, 'stripe-disputes-PROD', { | ||
| stack: 'support', | ||
| stage: 'PROD', | ||
| domainName: `stripe-disputes.${supportApisDomain}`, | ||
| hostedZoneId: supportHostedZoneId, | ||
| certificateId: supportCertificateId, | ||
| }); |
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.
it's better not to repeart the parameters every time here and in the tests, as they're more likely to get mixed up, now the stacks are constructed with a standard incantation above
| new MetricPushApi(app, 'CODE', 'membership-CODE-metric-push-api'); | ||
| new MetricPushApi(app, 'PROD', 'membership-PROD-metric-push-api'); |
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.
not sure why this needs a specific stack name, but I kept it just in case
| new MParticleApi(app, 'mparticle-api-PROD', { | ||
| stack: 'support', | ||
| stage: '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.
don't forget to load the "large diff"s below and review them all
(I will comment on the first instance of each interesting thing)
| { | ||
| "Key": "App", | ||
| "Value": "alarms-handler", | ||
| }, |
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.
using SrStack ensures that everything is tagged correctly with the App, (this should happen anyway via riffraff/cfn, but GuCDK makes it explicit if it knows the app)
| { | ||
| "Key": "Stack", | ||
| "Value": "membership", | ||
| "Value": "support", |
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.
as with most of the tests, for some reason it was passing in membership. Now it's not passed in at all so it is definitely consistent.
3cded12 to
73d2341
Compare
| }, | ||
| "MetricPushDNSRecord": { | ||
| "Properties": { | ||
| "Comment": "CNAME for metric-push-api API CODE", |
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 don't think this comment goes anywhere, I was looking in AWS console and I couldn't see it
73d2341 to
5f8653a
Compare
| "Comment": "CNAME for metric-push-api API CODE", | ||
| "HostedZoneName": "support.guardianapis.com.", | ||
| "Name": "metric-push-api-code.support.guardianapis.com", | ||
| "HostedZoneId": "Z1E4V12LQGXFEC", |
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.
some places use HostedZoneName and some HostedZoneId, better to be consistent
| "Ref": "AWS::AccountId", | ||
| }, | ||
| ":certificate/b384a6a0-2f54-4874-b99b-96eeff96c009", | ||
| ":certificate/c1efc564-9ff8-4a03-be48-d1990a3d79d2", |
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.
this was actually wrong in the snapshot
supportCertificateId instead of membershipCertificateId
| "EvaluationPeriods": 1, | ||
| "MetricName": "5XXError", | ||
| "Namespace": "AWS/ApiGateway", | ||
| "Period": 60, |
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.
metric push API is a bit broken in that it was in membership stack but uses the support domain. I think it's best to make sure it's on support all throughout.
dc49d0e to
8e9c8f5
Compare
8e9c8f5 to
9c5f5e8
Compare
# Conflicts: # cdk/lib/__snapshots__/stripe-disputes.test.ts.snap # cdk/lib/stripe-disputes.test.ts # cdk/lib/stripe-disputes.ts
|
closing as it was too big so I extracted plenty of smaller PRs from this one, whatever is left over is conflicting and unusable |
Following on from recent work to add a reusable SR domain construct #3106
and a reusable SR lambda construct
It appears that using them can reduce duplication and make our stacks more readable and consistent.
It also means that changes e.g. adding en environment variable to tell node to use source maps, would be a one liner.
This PR moves a bunch more stacks over to use the above constructs.