Skip to main content
Represents a cdktn application.

Initializers

import { App } from 'cdktn'

new App(config?: AppConfig)
NameTypeDescription
configAppConfigconfiguration.

configOptional

configuration.

Methods

NameDescription
toStringReturns a string representation of this construct.
crossStackReferenceCreates a reference from one stack to another, invoked on prepareStack since it creates extra resources.
synthSynthesizes all resources to the output directory.

toString

public toString(): string
Returns a string representation of this construct.

crossStackReference

public crossStackReference(fromStack: TerraformStack, toStack: TerraformStack, identifier: string): string
Creates a reference from one stack to another, invoked on prepareStack since it creates extra resources.

fromStackRequired


toStackRequired


identifierRequired

  • Type: string

synth

public synth(): void
Synthesizes all resources to the output directory.

Static Functions

NameDescription
isConstructChecks if x is a construct.
isAppNo description.
ofNo description.

isConstruct

import { App } from 'cdktn'

App.isConstruct(x: any)
Checks if x is a construct. Use this method instead of instanceof to properly detect Construct instances, even when the construct library is symlinked. Explanation: in JavaScript, multiple copies of the constructs library on disk are seen as independent, completely different libraries. As a consequence, the class Construct in each copy of the constructs library is seen as a different class, and an instance of one class will not test as instanceof the other class. npm install will not create installations like this, but users may manually symlink construct libraries together or use a monorepo tool: in those cases, multiple copies of the constructs library can be accidentally installed, and instanceof will behave unpredictably. It is safest to avoid using instanceof, and using this type-testing method instead.

xRequired

  • Type: any
Any object.

isApp

import { App } from 'cdktn'

App.isApp(x: any)

xRequired

  • Type: any

of

import { App } from 'cdktn'

App.of(construct: IConstruct)

constructRequired

  • Type: constructs.IConstruct

Properties

NameTypeDescription
nodeconstructs.NodeThe tree node.
hclOutputbooleanNo description.
manifestManifestNo description.
outdirstringThe output directory into which resources will be synthesized.
skipBackendValidationbooleanWhether to skip backend validation during synthesis of the app.
skipValidationbooleanWhether to skip all validations during synthesis of the app.
targetStackIdstringThe stack which will be synthesized.

nodeRequired

public readonly node: Node;
  • Type: constructs.Node
The tree node.

hclOutputRequired

public readonly hclOutput: boolean;
  • Type: boolean

manifestRequired

public readonly manifest: Manifest;

outdirRequired

public readonly outdir: string;
  • Type: string
The output directory into which resources will be synthesized.

skipBackendValidationRequired

public readonly skipBackendValidation: boolean;
  • Type: boolean
Whether to skip backend validation during synthesis of the app.

skipValidationRequired

public readonly skipValidation: boolean;
  • Type: boolean
Whether to skip all validations during synthesis of the app.

targetStackIdOptional

public readonly targetStackId: string;
  • Type: string
The stack which will be synthesized. If not set, all stacks will be synthesized.