module documentation

Undocumented

Class StepInLine No class docstring; 1/1 method documented
Function generate_event_bridge Creates Terraform resource for event bridge to schedule step function run
Function generate_lambda_function adds an environment variable "VAULT_LAMBDA_ROLE" for easier Vault integration.
Function generate_step_function Creates Terraform resource for step functions
Function get_python_code Generates full python code for lambda
Function main Undocumented
Function package_lambda Creates zip of Step code for use in Lambda
Function remove_decorators truncates code so that there is no space in front of function definition
Function rename_tf_output adds the .json extension and moves it into the root directory
Variable logger Undocumented
def generate_event_bridge(scope: Construct, pipeline: Pipeline, step_function_arn: str): (source)

Creates Terraform resource for event bridge to schedule step function run

Args:
scope pipeline (Pipeline): pipeline to convert into step function step_function_arn (str): ARN of the step function pipeline
def generate_lambda_function(scope: Construct, name_prefix: str, step: Step, template_file: str, subnet_ids: Optional[List[str]] = None, security_group_ids: Optional[List[str]] = None): (source)

Creates Terraform resource for Lambda. Automatically
adds an environment variable "VAULT_LAMBDA_ROLE" for easier Vault integration.
Args:
scope name_prefix (str): Prefix for lambda name to ensure uniqueness. step (Step): Step to create Lambda from template_file (str): Location of template file to populate. Defaults to internal template, but a custom file can be provided. subnet_ids (list): Optional subnet IDs. Required if VPC is specified. security_group_ids (list): Option security group IDs. Required if VPC is specified.

def generate_step_function(scope: Construct, pipeline: Pipeline, aws_region: str, lambda_arns: List[str]): (source)

Creates Terraform resource for step functions

Args:
scope pipeline (Pipeline): pipeline to convert into step function aws_region (str): AWS Region lambda_arns (list): ARNs of Lambdas, required to give step functions access to invoke Lambdas
def get_python_code(python_template_path: str, step: Step) -> str: (source)

Generates full python code for lambda

Args:
python_template_path (str): Location of template python code step (Step): Step to place inside template
def main(): (source)

Undocumented

def package_lambda(python_template_path: str, step: Step, lambda_entry: str) -> Tuple[str, str]: (source)

Creates zip of Step code for use in Lambda

Args:
python_template_path (str): Location of template python code step (Step): Step to place inside template lambda_entry (str): Name of python entry file
def remove_decorators(src: str) -> str: (source)

Removes any decorators from source code and
truncates code so that there is no space in front of function definition
Args:
src (str): Source code for lambda

def rename_tf_output(path: Path): (source)

Terraform creates .tf, but expects .tf.json. This function
adds the .json extension and moves it into the root directory
Args:
path (Path): directory where Terraform outputs the .tf file

Undocumented