Skip to content

Commit

Permalink
Extend the description of sourceCodeHash
Browse files Browse the repository at this point in the history
Signed-off-by: Fatih Türken <[email protected]>
  • Loading branch information
turkenf committed Apr 24, 2024
1 parent 5199951 commit 7b22448
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 22 deletions.
6 changes: 3 additions & 3 deletions apis/lambda/v1beta1/zz_function_types.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions config/lambda/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,10 @@ func Configure(p *config.Provider) {
r.LateInitializer = config.LateInitializer{
IgnoredFields: []string{"source_code_hash"},
}
r.MetaResource.ArgumentDocs["source_code_hash"] = "Used to trigger updates. Must be set to " +
"a base64 encoded SHA256 hash of the package file specified with either filename or s3_key. " +
"If you have specified this field manually, it should be the actual (computed) hash of the " +
"underlying lambda function specified in the filename, image_uri, s3_bucket fields."
})

p.AddResourceConfigurator("aws_lambda_function_event_invoke_config", func(r *config.Resource) {
Expand Down
2 changes: 1 addition & 1 deletion examples/lambda/v1beta1/function.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ metadata:
name: example
spec:
forProvider:
s3Bucket: upbound-provider-test-data
s3Bucket: official-provider-test-data
s3Key: hello-python.zip
handler: index.py
packageType: Zip
Expand Down
33 changes: 15 additions & 18 deletions package/crds/lambda.aws.upbound.io_functions.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -644,12 +644,11 @@ spec:
type: object
type: array
sourceCodeHash:
description: Used to trigger updates. Must be set to a base64-encoded
SHA256 hash of the package file specified with either filename
or s3_key. The usual way to set this is filebase64sha256("file.11.12
and later) or base64sha256(file("file.11.11 and earlier), where
"file.zip" is the local filename of the lambda function source
archive.
description: Used to trigger updates. Must be set to a base64
encoded SHA256 hash of the package file specified with either
filename or s3_key. If you have specified this field manually,
it should be the actual (computed) hash of the underlying lambda
function specified in the filename, image_uri, s3_bucket fields.
type: string
tags:
additionalProperties:
Expand Down Expand Up @@ -1439,12 +1438,11 @@ spec:
type: object
type: array
sourceCodeHash:
description: Used to trigger updates. Must be set to a base64-encoded
SHA256 hash of the package file specified with either filename
or s3_key. The usual way to set this is filebase64sha256("file.11.12
and later) or base64sha256(file("file.11.11 and earlier), where
"file.zip" is the local filename of the lambda function source
archive.
description: Used to trigger updates. Must be set to a base64
encoded SHA256 hash of the package file specified with either
filename or s3_key. If you have specified this field manually,
it should be the actual (computed) hash of the underlying lambda
function specified in the filename, image_uri, s3_bucket fields.
type: string
tags:
additionalProperties:
Expand Down Expand Up @@ -2047,12 +2045,11 @@ spec:
type: object
type: array
sourceCodeHash:
description: Used to trigger updates. Must be set to a base64-encoded
SHA256 hash of the package file specified with either filename
or s3_key. The usual way to set this is filebase64sha256("file.11.12
and later) or base64sha256(file("file.11.11 and earlier), where
"file.zip" is the local filename of the lambda function source
archive.
description: Used to trigger updates. Must be set to a base64
encoded SHA256 hash of the package file specified with either
filename or s3_key. If you have specified this field manually,
it should be the actual (computed) hash of the underlying lambda
function specified in the filename, image_uri, s3_bucket fields.
type: string
sourceCodeSize:
description: Size in bytes of the function .zip file.
Expand Down

0 comments on commit 7b22448

Please sign in to comment.