Skip to content

Commit dbbb566

Browse files
committed
issue-658
1 parent 7b46c2c commit dbbb566

File tree

3 files changed

+14
-21
lines changed

3 files changed

+14
-21
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -784,7 +784,7 @@ No modules.
784784
| <a name="input_docker_image"></a> [docker\_image](#input\_docker\_image) | Docker image to use for the build | `string` | `""` | no |
785785
| <a name="input_docker_pip_cache"></a> [docker\_pip\_cache](#input\_docker\_pip\_cache) | Whether to mount a shared pip cache folder into docker environment or not | `any` | `null` | no |
786786
| <a name="input_docker_with_ssh_agent"></a> [docker\_with\_ssh\_agent](#input\_docker\_with\_ssh\_agent) | Whether to pass SSH\_AUTH\_SOCK into docker environment or not | `bool` | `false` | no |
787-
| <a name="input_enable_code_signing"></a> [enable\_code\_signing](#input\_enable\_code\_signing) | Must be used with a lambda storing code on s3. Set this to true for triggering a signing job creating a signed copy of the lambda zip. https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html | `bool` | `false` | no |
787+
| <a name="input_enable_code_signing"></a> [enable\_code\_signing](#input\_enable\_code\_signing) | Must be used with a lambda storing code on s3. Set this to true for triggering a signing job creating a signed copy of the lambda zip | `bool` | `false` | no |
788788
| <a name="input_environment_variables"></a> [environment\_variables](#input\_environment\_variables) | A map that defines environment variables for the Lambda Function. | `map(string)` | `{}` | no |
789789
| <a name="input_ephemeral_storage_size"></a> [ephemeral\_storage\_size](#input\_ephemeral\_storage\_size) | Amount of ephemeral storage (/tmp) in MB your Lambda Function can use at runtime. Valid value between 512 MB to 10,240 MB (10 GB). | `number` | `512` | no |
790790
| <a name="input_event_source_mapping"></a> [event\_source\_mapping](#input\_event\_source\_mapping) | Map of event source mapping | `any` | `{}` | no |
@@ -806,7 +806,7 @@ No modules.
806806
| <a name="input_kms_key_arn"></a> [kms\_key\_arn](#input\_kms\_key\_arn) | The ARN of KMS key to use by your Lambda Function | `string` | `null` | no |
807807
| <a name="input_lambda_at_edge"></a> [lambda\_at\_edge](#input\_lambda\_at\_edge) | Set this to true if using Lambda@Edge, to enable publishing, limit the timeout, and allow edgelambda.amazonaws.com to invoke the function | `bool` | `false` | no |
808808
| <a name="input_lambda_at_edge_logs_all_regions"></a> [lambda\_at\_edge\_logs\_all\_regions](#input\_lambda\_at\_edge\_logs\_all\_regions) | Whether to specify a wildcard in IAM policy used by Lambda@Edge to allow logging in all regions | `bool` | `true` | no |
809-
| <a name="input_lambda_code_signing_profile_name"></a> [lambda\_code\_signing\_profile\_name](#input\_lambda\_code\_signing\_profile\_name) | Lambda code signing profile name https://console.aws.amazon.com/lambda/home#/code-signing-configurations | `string` | `null` | no |
809+
| <a name="input_lambda_code_signing_profile_name"></a> [lambda\_code\_signing\_profile\_name](#input\_lambda\_code\_signing\_profile\_name) | Lambda code signing profile name | `string` | `null` | no |
810810
| <a name="input_lambda_role"></a> [lambda\_role](#input\_lambda\_role) | IAM role ARN attached to the Lambda Function. This governs both who / what can invoke your Lambda Function, as well as what resources our Lambda Function has access to. See Lambda Permission Model for more details. | `string` | `""` | no |
811811
| <a name="input_layer_name"></a> [layer\_name](#input\_layer\_name) | Name of Lambda Layer to create | `string` | `""` | no |
812812
| <a name="input_layer_skip_destroy"></a> [layer\_skip\_destroy](#input\_layer\_skip\_destroy) | Whether to retain the old version of a previously deployed Lambda Layer. | `bool` | `false` | no |

examples/code-signing/main.tf

Lines changed: 10 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -20,30 +20,23 @@ module "lambda" {
2020
function_name = random_pet.this.id
2121
handler = "index.lambda_handler"
2222
runtime = "python3.12"
23-
create_package = false
23+
create_package = true
2424
enable_code_signing = true
2525
code_signing_config_arn = aws_lambda_code_signing_config.this.arn
2626
lambda_code_signing_profile_name = local.lambda_code_signing_profile_name
2727
s3_signing_prefix = "signed/"
2828

29-
store_on_s3 = true
30-
s3_existing_package = {
31-
bucket = module.s3_bucket.s3_bucket_id
32-
key = aws_s3_object.unsigned.key
33-
version_id = aws_s3_object.unsigned.version_id
34-
}
35-
36-
}
29+
source_path = "${path.module}/../fixtures/python-app1"
3730

38-
resource "aws_s3_object" "unsigned" {
39-
bucket = module.s3_bucket.s3_bucket_id
40-
key = "unsigned/existing_package.zip"
41-
source = "${path.module}/../fixtures/python-zip/existing_package.zip"
31+
store_on_s3 = true
32+
s3_bucket = module.s3_bucket.s3_bucket_id
33+
s3_prefix = "lambda-builds/"
4234

43-
# Making sure that S3 versioning configuration is propagated properly
44-
depends_on = [
45-
module.s3_bucket
46-
]
35+
s3_object_override_default_tags = true
36+
s3_object_tags = {
37+
S3ObjectName = "lambda1"
38+
Override = "true"
39+
}
4740
}
4841

4942
# ################################################################################

variables.tf

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -853,13 +853,13 @@ variable "recursive_loop" {
853853
###############
854854

855855
variable "enable_code_signing" {
856-
description = "Must be used with a lambda storing code on s3. Set this to true for triggering a signing job creating a signed copy of the lambda zip. https://docs.aws.amazon.com/lambda/latest/dg/configuration-codesigning.html"
856+
description = "Must be used with a lambda storing code on s3. Set this to true for triggering a signing job creating a signed copy of the lambda zip"
857857
type = bool
858858
default = false
859859
}
860860

861861
variable "lambda_code_signing_profile_name" {
862-
description = "Lambda code signing profile name https://console.aws.amazon.com/lambda/home#/code-signing-configurations"
862+
description = "Lambda code signing profile name"
863863
type = string
864864
default = null
865865
}

0 commit comments

Comments
 (0)