Skip to content

Commit c100d33

Browse files
[PRMP-579] access log bucket null on dev deployments
1 parent f94c7e1 commit c100d33

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

infrastructure/cloudfront.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,6 @@ module "cloudfront-distribution-lg" {
1919
qualifed_arn = module.edge-presign-lambda.qualified_arn
2020
depends_on = [module.edge-presign-lambda.qualified_arn, module.ndr-lloyd-george-store.bucket_id, module.ndr-lloyd-george-store.bucket_domain_name, module.ndr-document-pending-review-store.bucket_id, module.ndr-document-pending-review-store.bucket_domain_name]
2121
web_acl_id = try(module.cloudfront_firewall_waf_v2[0].arn, "")
22-
access_log_bucket = local.is_production ? "${aws_s3_bucket.access_logs[0].bucket}.s3.eu-west-2.amazonaws.com" : ""
22+
access_log_bucket = local.is_production ? "${aws_s3_bucket.access_logs[0].bucket}.s3.eu-west-2.amazonaws.com" : null
2323
log_prefix = "cloudfront/"
2424
}

infrastructure/modules/lambda_edge/README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ module "s3_proxy_lambda" {
5858
|------|------|
5959
| [aws_iam_policy.combined_policies](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_policy) | resource |
6060
| [aws_iam_role.lambda_exec_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
61+
| [aws_iam_role.lambda_execution_role](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role) | resource |
6162
| [aws_iam_role_policy.lambda_exec_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy) | resource |
6263
| [aws_iam_role_policy_attachment.default_policies](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
6364
| [aws_iam_role_policy_attachment.lambda_execution_policy](https://registry.terraform.io/providers/hashicorp/aws/latest/docs/resources/iam_role_policy_attachment) | resource |
@@ -72,8 +73,8 @@ module "s3_proxy_lambda" {
7273
| Name | Description | Type | Default | Required |
7374
|------|-------------|------|---------|:--------:|
7475
| <a name="input_bucket_name"></a> [bucket\_name](#input\_bucket\_name) | The name of the S3 bucket the Lambda will proxy requests to. | `string` | n/a | yes |
76+
| <a name="input_default_policies"></a> [default\_policies](#input\_default\_policies) | List of default IAM policy ARNs to attach to the Lambda execution role. | `list(string)` | <pre>[<br/> "arn:aws:iam::aws:policy/service-role/AWSLambdaBasicExecutionRole"<br/>]</pre> | no |
7577
| <a name="input_handler"></a> [handler](#input\_handler) | Handler function in the code package (e.g., 'index.handler'). | `string` | n/a | yes |
76-
| <a name="input_iam_role_policies"></a> [iam\_role\_policies](#input\_iam\_role\_policies) | List of IAM policy ARNs or JSON documents to attach to the Lambda execution role. | `list(string)` | n/a | yes |
7778
| <a name="input_iam_role_policy_documents"></a> [iam\_role\_policy\_documents](#input\_iam\_role\_policy\_documents) | List of IAM policy document ARNs to attach to the Lambda execution role. | `list(string)` | `[]` | no |
7879
| <a name="input_lambda_ephemeral_storage"></a> [lambda\_ephemeral\_storage](#input\_lambda\_ephemeral\_storage) | Amount of ephemeral storage (in MB) allocated to the Lambda function. | `number` | `512` | no |
7980
| <a name="input_memory_size"></a> [memory\_size](#input\_memory\_size) | Amount of memory (in MB) to allocate to the Lambda function. | `number` | `128` | no |

0 commit comments

Comments
 (0)