lambda-exec
connect-group/lambda-exec/aws
Execute a Lambda and obtain its results during a Terraform apply
Install
README
AWS Lambda Exec Module ====================== This module will execute a Lambda function and return its result(s). It allows Lambdas to be used as a form of Data Source (via a resource) but it also allows them to perform other functions upon e.g. when destroy is called. There are some very specific constraints on how the Lambda function should work: under the hood it is using a CloudFormation "CustomResource" to execute the Lambda. Possible uses include, Advanced AMI Queries: look for an AMI but return a default if not found; Get an SSM Parameter but return a default if it is not found (see this example) Get the latest RDS Snapshot Identifier, but return an empty string if it does not exist Usage ----- If your Lambda function has inputs, pass them using the lambda_inputs map. The actual in
Inputs (6)
| Name | Type | Description | Default |
|---|---|---|---|
| lambda_outputs | list(string) | List of outputs from the Lambda function. The Lambda must ALWAYS return these o | required |
| name | string | Unique name for the result of executing the lambda. | required |
| lambda_function_arn | string | Lambda ARN - identify the lambda to execute. | required |
| tags | map(string) | Any tags to add to the CloudFormation stack. | {} |
| timeout_in_minutes | string | Maximum Time to wait for a response from CloudFormation/Lambda. The Lambda itse | "5" |
| lambda_inputs | map(string) | Map of inputs which are passed into the Lambda function via the event['ResourceP | {} |
Outputs (1)
result — A map of results returned by the Lambda, based on the input variable 'lambda_outputs'Resources (1)
Details
Similar packages
Azure landing zones Terraform module
Terraform supermodule for the Terraform platform engineering for Azure
Terraform module to deploy landing zone subscriptions (and much more) in Azure
Terraform Module to define a consistent naming convention by (namespace, stage,