File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -16,3 +16,7 @@ output "aws_lambda_invoke_arn" {
1616output "lambda_cmk_arn" {
1717 value = aws_kms_key. lambda_cmk . arn
1818}
19+
20+ output "lambda_signing_profile_name" {
21+ value = aws_signer_signing_profile. lambda_signing . name
22+ }
Original file line number Diff line number Diff line change 1+ resource "aws_signer_signing_profile" "lambda_signing" {
2+ name = " ${ terraform . workspace == " default" ? " " : " ${ terraform . workspace } " } EligibilityApiLambdaSigningProfile"
3+ # aws signer is strict with names, does not like hyphens or underscores
4+
5+ platform_id = " AWSLambda-SHA384-ECDSA"
6+
7+ signature_validity_period {
8+ value = 365
9+ type = " DAYS"
10+ }
11+ }
12+
13+ resource "aws_lambda_code_signing_config" "signing_config" {
14+ allowed_publishers {
15+ signing_profile_version_arns = [
16+ aws_signer_signing_profile . lambda_signing . version_arn
17+ ]
18+ }
19+
20+ policies {
21+ untrusted_artifact_on_deployment = " Enforce"
22+ }
23+
24+ description = " Only allow Lambda bundles signed by our trusted signer profile"
25+ }
Original file line number Diff line number Diff line change @@ -35,6 +35,12 @@ module "eligibility_signposting_lambda_function" {
3535 api_domain_name = local. api_domain_name
3636}
3737
38+
39+ # Needed by github workflows to sign the lambda artifacts
40+ output "signing_profile_name" {
41+ value = module. eligibility_signposting_lambda_function . lambda_signing_profile_name
42+ }
43+
3844# -----------------------------------------------------------------------------
3945# Secret rotation lambdas
4046# -----------------------------------------------------------------------------
You can’t perform that action at this time.
0 commit comments