File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 44 " eu-west-1a" ,
55 " eu-west-1b" ,
66 " eu-west-1c"
7- ],
8- "ssm:account=764918915129:parameterName=/env/dev/domainName:region=eu-west-1" : " dev1.codu.co" ,
9- "ssm:account=764918915129:parameterName=/env/dev/hostedZoneId:region=eu-west-1" : " Z09797183E6CQSVU1LFVP"
7+ ]
108}
Original file line number Diff line number Diff line change @@ -14,8 +14,6 @@ import * as acm from "aws-cdk-lib/aws-certificatemanager";
1414import { HttpsRedirect } from "aws-cdk-lib/aws-route53-patterns" ;
1515
1616interface Props extends cdk . StageProps {
17- domainName : string ;
18- hostedZoneId : string ;
1917 db : cdk . aws_rds . DatabaseInstance ;
2018 production ?: boolean ;
2119}
@@ -27,7 +25,19 @@ export class AppStack extends cdk.Stack {
2725
2826 constructor ( scope : Construct , id : string , props : Props ) {
2927 super ( scope , id , props ) ;
30- const { domainName, hostedZoneId, db } = props ;
28+ const { db } = props ;
29+
30+ const domainName = ssm . StringParameter . valueForStringParameter (
31+ this ,
32+ `/env/domainName` ,
33+ 1
34+ ) ;
35+
36+ const hostedZoneId = ssm . StringParameter . valueForStringParameter (
37+ this ,
38+ `/env/hostedZoneId` ,
39+ 1
40+ ) ;
3141
3242 const cluster = new ecs . Cluster ( this , "ServiceCluster" ) ;
3343
Original file line number Diff line number Diff line change @@ -3,21 +3,12 @@ import type { Construct } from "constructs";
33import { StorageStack } from "./storage-stack" ;
44import { AppStack } from "./app-stack" ;
55
6- interface Props extends cdk . StageProps {
7- domainName : string ;
8- hostedZoneId : string ;
9- }
10-
116export class AppStage extends cdk . Stage {
12- constructor ( scope : Construct , id : string , props : Props ) {
7+ constructor ( scope : Construct , id : string , props : cdk . StageProps ) {
138 super ( scope , id , props ) ;
149
15- const { domainName, hostedZoneId } = props ;
16-
1710 const storageStack = new StorageStack ( this , "StorageStack" ) ;
1811 new AppStack ( this , "AppStack" , {
19- domainName,
20- hostedZoneId,
2112 db : storageStack . db ,
2213 } ) . addDependency ( storageStack ) ;
2314 }
Original file line number Diff line number Diff line change @@ -30,24 +30,12 @@ export class PipelineStack extends cdk.Stack {
3030 `/env/${ env } /accountId`
3131 ) ;
3232
33- const domainName = ssm . StringParameter . valueFromLookup (
34- this ,
35- `/env/${ env } /domainName`
36- ) ;
37-
38- const hostedZoneId = ssm . StringParameter . valueFromLookup (
39- this ,
40- `/env/${ env } /hostedZoneId`
41- ) ;
42-
4333 return {
4434 env : {
4535 // Dummy value on synth prep that causes fail
4636 account : accountId . includes ( "dummy-value" ) ? "123456789" : accountId ,
4737 region : "eu-west-1" ,
4838 } ,
49- domainName : domainName ,
50- hostedZoneId : hostedZoneId ,
5139 } ;
5240 } ;
5341
You can’t perform that action at this time.
0 commit comments