@@ -3,14 +3,14 @@ import { AccessScope } from '@guardian/cdk/lib/constants';
33import type { GuStackProps } from '@guardian/cdk/lib/constructs/core' ;
44import { GuVpcParameter } from '@guardian/cdk/lib/constructs/core' ;
55import { GuLoggingStreamNameParameter } from '@guardian/cdk/lib/constructs/core' ;
6- import { GuDistributionBucketParameter } from '@guardian/cdk/lib/constructs/core' ;
76import { GuStack } from '@guardian/cdk/lib/constructs/core' ;
87import { GuCname } from '@guardian/cdk/lib/constructs/dns' ;
98import { GuAllowPolicy } from '@guardian/cdk/lib/constructs/iam' ;
109import type { App } from 'aws-cdk-lib' ;
1110import { Duration } from 'aws-cdk-lib' ;
1211import type { CfnAutoScalingGroup } from 'aws-cdk-lib/aws-autoscaling' ;
1312import { InstanceClass , InstanceSize , InstanceType } from 'aws-cdk-lib/aws-ec2' ;
13+ import { adjustCloudformationParameters } from './mobile-n10n-compatibility' ;
1414
1515export interface ReportProps extends GuStackProps {
1616 domainName :
@@ -94,34 +94,7 @@ export class Report extends GuStack {
9494 // Once the YAML template has been removed we should be able to drop this override
9595 vpcParameter . overrideLogicalId ( 'GuCdkVpcId' ) ;
9696
97- // https://github.com/guardian/aws-account-setup/blob/67a516b65e2e151d69687fa61a8a1aa914e8b7c0/packages/cdk/lib/__snapshots__/aws-account-setup.test.ts.snap#L27280-L27327
98- const vpcParameterName = '/account/vpc/notifications/id' ;
99- const privateSubnetsParameterName =
100- '/account/vpc/notifications/subnets/private' ;
101- const publicSubnetsParameterName =
102- '/account/vpc/notifications/subnets/public' ;
103-
104- vpcParameter . default = vpcParameterName ;
105- vpcParameter . allowedValues = [ vpcParameterName ] ;
106-
107- const vpcSubnetsPrivate = this . parameters [ 'reportPrivateSubnets' ] ;
108- if ( vpcSubnetsPrivate ) {
109- vpcSubnetsPrivate . default = privateSubnetsParameterName ;
110- vpcSubnetsPrivate . allowedValues = [ privateSubnetsParameterName ] ;
111- }
112-
113- const vpcSubnetsPublic = this . parameters [ 'reportPublicSubnets' ] ;
114- if ( vpcSubnetsPublic ) {
115- vpcSubnetsPublic . default = publicSubnetsParameterName ;
116- vpcSubnetsPublic . allowedValues = [ publicSubnetsParameterName ] ;
117- }
118-
119- // In the Mobile account there are separate artifact buckets for different groups of applications, so we can't use
120- // the account-wide default
121- const distBucketParameterName = '/account/services/artifact.bucket.n10n' ;
122- const distBucketParameter = GuDistributionBucketParameter . getInstance ( this ) ;
123- distBucketParameter . allowedValues = [ distBucketParameterName ] ;
124- distBucketParameter . default = distBucketParameterName ;
97+ adjustCloudformationParameters ( this ) ;
12598
12699 // In the Mobile account there are separate Kinesis streams for CODE and PROD, so we can't use the account-wide
127100 // default
0 commit comments