runway.module.cdk module¶
CDK module.
- class runway.module.cdk.CloudDevelopmentKit[source]¶
Bases:
RunwayModuleNpm
[CloudDevelopmentKitOptions
]CDK Runway Module.
- __init__(context: RunwayContext, *, explicitly_enabled: bool | None = False, logger: RunwayLogger = <RunwayLogger runway.module.cdk (WARNING)>, module_root: Path, name: str | None = None, options: dict[str, Any] | ModuleOptions | None = None, parameters: dict[str, Any] | None = None, **_: Any) None [source]¶
Instantiate class.
- Parameters:
context – Runway context object for the current session.
explicitly_enabled – Whether or not the module is explicitly enabled. This is can be set in the event that the current environment being deployed to matches the defined environments of the module/deployment.
logger – Used to write logs.
module_root – Root path of the module.
name – Name of the module.
options – Options passed to the module class from the config as
options
ormodule_options
if coming from the deployment level.parameters – Values to pass to the underlying infrastructure as code tool that will alter the resulting infrastructure being deployed. Used to templatize IaC.
- property cli_args_context: list[str]¶
Generate CLI args from self passed to CDK commands as
--context
.
- gen_cmd(command: Literal['bootstrap', 'context', 'deploy', 'destroy', 'diff', 'docs', 'doctor', 'init', 'list', 'metadata', 'synthesize'], args_list: list[str] | None = None, *, include_context: bool = False) list[str] [source]¶
Generate and log a CDK command.
This does not execute the command, only prepares it for use.
- Parameters:
command – The CDK command to be executed.
args_list – Additional arguments to include in the generated command.
include_context – Optionally, pass context to the CLI. Context is not valid for all commands.
- Returns:
The full command to be passed into a subprocess.
- class runway.module.cdk.CloudDevelopmentKitOptions[source]¶
Bases:
ModuleOptions
Module options for AWS Cloud Development Kit.
- build_steps¶
A list of commands to be executed before each action (e.g. diff, deploy, destroy).
- data¶
Options parsed into a data model.
- skip_npm_ci¶
Skip running
npm ci
in the module directory prior to processing the module.
- __init__(data: RunwayCdkModuleOptionsDataModel) None [source]¶
Instantiate class.
- Parameters:
data – Options parsed into a data model.
- classmethod parse_obj(obj: object) CloudDevelopmentKitOptions [source]¶
Parse options definition and return an options object.
- Parameters:
obj – Object to parse.