Documentation Index
Fetch the complete documentation index at: https://cdktn.io/docs/llms.txt
Use this file to discover all available pages before exploring further.
Represents a cdktn application.
Initializers
import cdktn
cdktn.App(
context: typing.Mapping[typing.Any] = None,
hcl_output: bool = None,
outdir: str = None,
skip_backend_validation: bool = None,
skip_validation: bool = None,
stack_traces: bool = None
)
| Name | Type | Description |
|---|
context | typing.Mapping[typing.Any] | Additional context values for the application. |
hcl_output | bool | No description. |
outdir | str | The directory to output Terraform resources. |
skip_backend_validation | bool | Whether to skip backend validation during synthesis of the app. |
skip_validation | bool | Whether to skip all validations during synthesis of the app. |
stack_traces | bool | No description. |
contextOptional
- Type: typing.Mapping[typing.Any]
- Default: no additional context
Additional context values for the application.
Context set by the CLI or the context key in cdktf.json has precedence.
Context can be read from any construct using node.getContext(key).
hcl_outputOptional
outdirOptional
- Type: str
- Default: CDKTF_OUTDIR if defined, otherwise “cdktf.out”
The directory to output Terraform resources.
If you are using the CDKTN CLI, this value is automatically set from one of the following three sources:
- The
-o / --output CLI option
- The
CDKTF_OUTDIR environment variable
- The
outdir key in cdktf.json
If you are using the CDKTN CLI and want to set a different value here, you will also need to set the same value via one of the three ways specified above.
The most common case to set this value is when you are using the CDKTN library directly (e.g. when writing unit tests).
skip_backend_validationOptional
- Type: bool
- Default: false
Whether to skip backend validation during synthesis of the app.
skip_validationOptional
- Type: bool
- Default: false
Whether to skip all validations during synthesis of the app.
stack_tracesOptional
Methods
| Name | Description |
|---|
to_string | Returns a string representation of this construct. |
cross_stack_reference | Creates a reference from one stack to another, invoked on prepareStack since it creates extra resources. |
synth | Synthesizes all resources to the output directory. |
to_string
Returns a string representation of this construct.
cross_stack_reference
def cross_stack_reference(
from_stack: TerraformStack,
to_stack: TerraformStack,
identifier: str
) -> str
Creates a reference from one stack to another, invoked on prepareStack since it creates extra resources.
from_stackRequired
to_stackRequired
identifierRequired
synth
Synthesizes all resources to the output directory.
Static Functions
| Name | Description |
|---|
is_construct | Checks if x is a construct. |
is_app | No description. |
of | No description. |
is_construct
import cdktn
cdktn.App.is_construct(
x: typing.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
Any object.
is_app
import cdktn
cdktn.App.is_app(
x: typing.Any
)
xRequired
import cdktn
cdktn.App.of(
construct: IConstruct
)
constructRequired
- Type: constructs.IConstruct
Properties
| Name | Type | Description |
|---|
node | constructs.Node | The tree node. |
hcl_output | bool | No description. |
manifest | Manifest | No description. |
outdir | str | The output directory into which resources will be synthesized. |
skip_backend_validation | bool | Whether to skip backend validation during synthesis of the app. |
skip_validation | bool | Whether to skip all validations during synthesis of the app. |
target_stack_id | str | The stack which will be synthesized. |
nodeRequired
The tree node.
hcl_outputRequired
manifestRequired
outdirRequired
The output directory into which resources will be synthesized.
skip_backend_validationRequired
skip_backend_validation: bool
Whether to skip backend validation during synthesis of the app.
skip_validationRequired
Whether to skip all validations during synthesis of the app.
target_stack_idOptional
The stack which will be synthesized.
If not set, all stacks will be synthesized.