diff --git a/terraform/environments/ppud/data.tf b/terraform/environments/ppud/data.tf index 22d64cb4b96..8e7087ed096 100644 --- a/terraform/environments/ppud/data.tf +++ b/terraform/environments/ppud/data.tf @@ -50,3 +50,13 @@ data "aws_acm_certificate" "WAM_PROD_ALB" { domain = "wam.ppud.justice.gov.uk" statuses = ["ISSUED"] } + +# Klayers account ID - used by lambda layer ARNs - https://github.com/keithrozario/Klayers?tab=readme-ov-file +data "aws_ssm_parameter" "klayers_account" { + name = "klayers-account" + with_decryption = true +} + +output "klayers_account" { + value = data.aws_ssm_parameter.klayers_account.value +} \ No newline at end of file diff --git a/terraform/environments/ppud/lambda.tf b/terraform/environments/ppud/lambda.tf index c10322387f0..1f12acf7131 100644 --- a/terraform/environments/ppud/lambda.tf +++ b/terraform/environments/ppud/lambda.tf @@ -516,6 +516,8 @@ resource "aws_lambda_function" "terraform_lambda_func_send_cpu_graph_dev" { layers = [ "arn:aws:lambda:eu-west-2:770693421928:layer:Klayers-p312-numpy:8", #Publically available ARN for numpy package "arn:aws:lambda:eu-west-2:770693421928:layer:Klayers-p312-pillow:1" #Publically available ARN for pillow package +# "arn:aws:lambda:eu-west-2:${data.aws_ssm_parameter.klayers_account.value}:layer:Klayers-p312-numpy:8", +# "arn:aws:lambda:eu-west-2:${data.aws_ssm_parameter.klayers_account.value}:layer:Klayers-p312-pillow:1" ] }