File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,11 +55,32 @@ function adjustArtifactBucketParameter(stack: GuStack) {
5555 ) ;
5656}
5757
58+ /**
59+ * In the Mobile account there are separate Kinesis streams for CODE and PROD, so we can't always use the account-wide default
60+ */
61+ function adjustLoggingStreamParameter ( stack : GuStack ) {
62+ if ( stack . stage !== 'PROD' ) {
63+ adjustParameter (
64+ stack ,
65+ '/account/services/logging.stream.name' ,
66+ '/account/services/logging.stream.name.code' ,
67+ ) ;
68+ } else {
69+ // Keep the same value, but explicitly set `allowedValues`
70+ adjustParameter (
71+ stack ,
72+ '/account/services/logging.stream.name' ,
73+ '/account/services/logging.stream.name' ,
74+ ) ;
75+ }
76+ }
77+
5878/**
5979 * Applications within the `mobile-n10n` stack do not use account (/GuCDK) defaults.
6080 * This adjusts CloudFormation parameters with values suitable for the `mobile-n10n` stack.
6181 */
6282export function adjustCloudformationParameters ( stack : GuStack ) {
6383 adjustVpcParameters ( stack ) ;
6484 adjustArtifactBucketParameter ( stack ) ;
85+ adjustLoggingStreamParameter ( stack ) ;
6586}
Original file line number Diff line number Diff line change @@ -2,7 +2,6 @@ import { GuPlayApp } from '@guardian/cdk';
22import { AccessScope } from '@guardian/cdk/lib/constants' ;
33import type { GuStackProps } from '@guardian/cdk/lib/constructs/core' ;
44import { GuVpcParameter } from '@guardian/cdk/lib/constructs/core' ;
5- import { GuLoggingStreamNameParameter } from '@guardian/cdk/lib/constructs/core' ;
65import { GuStack } from '@guardian/cdk/lib/constructs/core' ;
76import { GuCname } from '@guardian/cdk/lib/constructs/dns' ;
87import { GuAllowPolicy } from '@guardian/cdk/lib/constructs/iam' ;
@@ -96,13 +95,6 @@ export class Report extends GuStack {
9695
9796 adjustCloudformationParameters ( this ) ;
9897
99- // In the Mobile account there are separate Kinesis streams for CODE and PROD, so we can't use the account-wide
100- // default
101- const loggingStreamParameter =
102- GuLoggingStreamNameParameter . getInstance ( this ) ;
103- loggingStreamParameter . allowedValues = [ props . loggingStreamParameterName ] ;
104- loggingStreamParameter . default = props . loggingStreamParameterName ;
105-
10698 new GuCname ( this , 'DnsRecordForReport' , {
10799 app,
108100 domainName : props . domainName ,
You can’t perform that action at this time.
0 commit comments