Skip to content

Commit c81d923

Browse files
author
Tyler Ray
committed
Update README
1 parent bc7f18d commit c81d923

File tree

1 file changed

+14
-4
lines changed

1 file changed

+14
-4
lines changed

README.md

Lines changed: 14 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,15 @@ module "lambda_api" {
3737
https_certificate_arn = module.acs.certificate.arn
3838
vpc_id = module.acs.vpc.id
3939
public_subnet_ids = module.acs.public_subnet_ids
40-
private_subnet_ids = module.acs.private_subnet_ids
4140
role_permissions_boundary_arn = module.acs.role_permissions_boundary.arn
4241
codedeploy_test_listener_port = 4443
4342
use_codedeploy = true
4443
44+
lambda_vpc_config = {
45+
subnet_ids = module.acs.private_subnet_ids
46+
security_group_ids = ["sg-3asdfadsfasdfas"]
47+
}
48+
4549
codedeploy_lifecycle_hooks = {
4650
BeforeAllowTraffic = aws_lambda_function.test_lambda.function_name
4751
AfterAllowTraffic = null
@@ -79,21 +83,27 @@ module "lambda_api" {
7983
| lambda_zip_file | string | File that contains your compiled or zipped source code. |
8084
| handler | string | Lambda event handler |
8185
| runtime | string | Lambda runtime |
86+
| lambda_vpc_config | [object](#lambda_vpc_config) | Lambda VPC object. Used if lambda requires to run inside a VPC | null
8287
| environment_variables | map(string) | A map that defines environment variables for the Lambda function. |
8388
| hosted_zone | [object](#hosted_zone) | Hosted Zone object to redirect to ALB. (Can pass in the aws_hosted_zone object). A and AAAA records created in this hosted zone. |
8489
| https_certificate_arn | string | ARN of the HTTPS certificate of the hosted zone/domain. |
8590
| codedeploy_lifecycle_hooks | [object](#codedeploy_lifecycle_hooks) | Define Lambda Functions for CodeDeploy lifecycle event hooks. Or set this variable to null to not have any lifecycle hooks invoked. Defaults to null | null
8691
| codedeploy_test_listener_port | number | The port for a codedeploy test listener. If provided CodeDeploy will use this port for test traffic on the new replacement set during the blue-green deployment process before shifting production traffic to the replacement set. Defaults to null | null
87-
| vpc_id | string | VPC ID to deploy ECS fargate service. |
92+
| vpc_id | string | VPC ID to deploy ALB and Lambda (If specified). |
8893
| public_subnet_ids | list(string) | List of subnet IDs for the ALB. |
89-
| private_subnet_ids | list(string) | List of subnet IDs for the Lambda service. |
9094
| tags | map(string) | A map of AWS Tags to attach to each resource created | {}
9195
| role_permissions_boundary_arn | string | IAM Role Permissions Boundary ARN |
9296
| log_retention_in_days | number | CloudWatch log group retention in days. Defaults to 7. | 7
9397
| lambda_policies | list(string) | List of IAM Policy ARNs to attach to the lambda role. | []
94-
| security_groups | list(string) | List of extra security group IDs to attach to the lambda. | []
9598
| use_codedeploy | bool | If true, CodeDeploy App and Deployment Group will be created and TF will not update alias to point to new versions of the Lambda (becuase CodeDeploy will do that). | false
9699

100+
#### lambda_vpc_config
101+
102+
This variable is used when the lambda needs to be run from within a VPC.
103+
104+
* **`subnet_ids`** - List of subnet IDs for the Lambda service.
105+
* **`security_group_ids`** - List of extra security group IDs to attach to the lambda.
106+
97107
#### codedeploy_lifecycle_hooks
98108

99109
This variable is used when generating the [appspec.json](#appspec) file. This will define what Lambda Functions to invoke

0 commit comments

Comments
 (0)