You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
| codedeploy_service_role_arn | string | ARN of the IAM Role for the CodeDeploy to use to initiate new deployments. (usually the PowerBuilder Role) |
85
-
| lambda_zip_file | string | File that contains your compiled or zipped source code. |
86
-
| handler | string | Lambda event handler |
87
-
| runtime | string | Lambda runtime |
88
-
| lambda_vpc_config | [object](#lambda_vpc_config) | Lambda VPC object. Used if lambda requires to run inside a VPC | null
89
-
| environment_variables | map(string) | A map that defines environment variables for the Lambda function. |
90
-
| 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. |
91
-
| https_certificate_arn | string | ARN of the HTTPS certificate of the hosted zone/domain. |
92
-
| 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
93
-
| appspec_filename | string | Filename (including path) to use when outputing appspec json. |`appspec.json` in the current working directory (i.e. where you ran `terraform apply`) |
94
-
| 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
95
-
| vpc_id | string | VPC ID to deploy ALB and Lambda (If specified). |
96
-
| public_subnet_ids | list(string) | List of subnet IDs for the ALB. |
97
-
| tags | map(string) | A map of AWS Tags to attach to each resource created | {}
98
-
| role_permissions_boundary_arn | string | IAM Role Permissions Boundary ARN |
99
-
| log_retention_in_days | number | CloudWatch log group retention in days. Defaults to 7. | 7
100
-
| lambda_policies | list(string) | List of IAM Policy ARNs to attach to the lambda role. | []'
101
-
| 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
102
-
| timeout | number | How long the lambda will run (in seconds) before timing out | 3 (same as terraform default)
103
-
| memory_size | number | Size of the memory of the lambda. CPU will scale along with it | 128 (same as terraform default)
104
-
| xray_enabled | bool | Whether or not the X-Ray daemon should be created with the Lambda API. | false
77
+
| app_name | string | application name (include the env aka. 'my-api-dev') ||
78
+
| zip_file |[object](#zip_file_config)| configuration for a zip file lambda (conflicts with `image_uri`) | null |
79
+
| image_uri | string | ECR Image URI containing the function's deployment package (conflicts with `zip_file`)| null |
80
+
| lambda_vpc_config |[object](#lambda_vpc_config)| Lambda VPC object. Used if lambda requires to run inside a VPC | null |
81
+
| environment_variables | map(string) | A map that defines environment variables for the Lambda function. ||
82
+
| domain_url | string | Custom domain URL for the API, defaults to <app_name>.<hosted_zone_domain> | null ||
83
+
| 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. ||
84
+
| https_certificate_arn | string | ARN of the HTTPS certificate of the hosted zone/domain. ||
85
+
| codedeploy_config |[object](#codedeploy_config)| Configuration for putting CodeDeploy on the lambda | null |
86
+
| vpc_id | string | VPC ID to deploy ALB and Lambda (If specified). ||
87
+
| public_subnet_ids | list(string) | List of subnet IDs for the ALB. ||
88
+
| tags | map(string) | A map of AWS Tags to attach to each resource created | {} |
89
+
| role_permissions_boundary_arn | string | IAM Role Permissions Boundary ARN ||
90
+
| log_retention_in_days | number | CloudWatch log group retention in days. Defaults to 7. | 7 |
91
+
| lambda_policies | list(string) | List of IAM Policy ARNs to attach to the lambda role. |[]' |
92
+
| timeout | number | How long the lambda will run (in seconds) before timing out | 3 (same as terraform default) |
93
+
| memory_size | number | Size of the memory of the lambda. CPU will scale along with it | 128 (same as terraform default) |
94
+
| xray_enabled | bool | Whether or not the X-Ray daemon should be created with the Lambda API. | false |
95
+
96
+
#### zip_file_config
97
+
This configuration is used for when you are including the zipped up code for the lambda instead of using the `image_uri`
98
+
*`filename` - (string) File that contains your compiled or zipped source code
99
+
*`handler` - (string) Lambda event handler
100
+
*`runtime` - (string) Lambda runtime
105
101
106
102
#### lambda_vpc_config
107
103
@@ -110,6 +106,13 @@ This variable is used when the lambda needs to be run from within a VPC.
110
106
***`subnet_ids`** - List of subnet IDs for the Lambda service.
111
107
***`security_group_ids`** - List of extra security group IDs to attach to the lambda.
112
108
109
+
#### codedeploy_config
110
+
If this configuration is included then this module will add the CodeDeploy App and Group required to deploy new versions of the Lambda through CodeDeploy, also allowing for the use of the LifeCycle hooks.
111
+
*`service_role_arn` - (string) ARN of the IAM Role for the CodeDeploy to use to initiate new deployments (usually the PowerBuilder Role)
112
+
*`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
113
+
*`appspec_filename` - (string) Filename (including path) to use when outputing appspec json (defaults to `appspec.json` in the current working directory)
114
+
*`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
115
+
113
116
#### codedeploy_lifecycle_hooks
114
117
115
118
This variable is used when generating the [appspec.json](#appspec) file. This will define what Lambda Functions to invoke
@@ -128,7 +131,7 @@ You can pass in either the object from the AWS terraform provider for an AWS Hos
128
131
129
132
#### CloudWatch logs
130
133
131
-
This module will create a CloudWatch log group named `/aws/lambda/<app_name>-<env>`.
134
+
This module will create a CloudWatch log group named `/aws/lambda/<app_name>`.
132
135
133
136
For instance with the [above example](#usage) the logs could be found in the CloudWatch log group: `aws/lambda/my-lambda-dev`.
0 commit comments