Skip to content

Commit

Permalink
Update conditional logic for stacks
Browse files Browse the repository at this point in the history
  • Loading branch information
shanejearley committed Feb 18, 2023
1 parent cb6cb58 commit b0c47ff
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions infrastructure/cdk/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,17 @@ import { EtlStack } from './providers/etl'
import { LandingStack } from './providers/landing'
import { NodesStack } from './providers/nodes'

/** Create CDK app and stacks */
const { project, stage, env, nodesIp } = new Config()
const app = new cdk.App()
const { domain, subdomains, hostedZone } = new DnsStack(app, `${project}DnsStack${stage}`, { env, project, stage })

/** Create development-only resources */
if (process.env.STAGE !== 'prod') {
/** Create development-only stacks */
new EtlStack(app, `${project}EtlStack${stage}`, { env, project, stage })
new UsersStack(app, `${project}UsersStack${stage}`, { env, project, stage, domain, subdomains, hostedZone })
}
/** Create production-only resources */
if (process.env.STAGE === 'prod') {
} else {
/** Create production-only stacks */
new NodesStack(app, `${project}NodesStack${stage}`, { env, project, stage, domain, subdomains, hostedZone, nodesIp })
}
/** Create remaining resources */
/** Create remaining stacks */
new LandingStack(app, `${project}LandingStack${stage}`, { env, project, stage, domain, subdomains, hostedZone })

0 comments on commit b0c47ff

Please sign in to comment.