Skip to content

Commit 7ed715c

Browse files
authored
Merge pull request #79 from pbs/CAT-23814
CAT-23814 - integrating log group class for cloudwatch
2 parents e85f94e + dc2a4ef commit 7ed715c

File tree

5 files changed

+14
-6
lines changed

5 files changed

+14
-6
lines changed

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
### Using the Repo Source
66

77
```hcl
8-
github.com/pbs/terraform-aws-lambda-module?ref=1.3.41
8+
github.com/pbs/terraform-aws-lambda-module?ref=x.y.z
99
```
1010

1111
### Alternative Installation Methods
@@ -22,7 +22,7 @@ Integrate this module like so:
2222

2323
```hcl
2424
module "role" {
25-
source = "github.com/pbs/terraform-aws-lambda-module?ref=1.3.41"
25+
source = "github.com/pbs/terraform-aws-lambda-module?ref=x.y.z"
2626
2727
handler = "main"
2828
filename = "../artifacts/handler.zip"
@@ -42,7 +42,7 @@ module "role" {
4242

4343
If this repo is added as a subtree, then the version of the module should be close to the version shown here:
4444

45-
`1.3.41`
45+
`x.y.z`
4646

4747
Note, however that subtrees can be altered as desired within repositories.
4848

@@ -59,7 +59,7 @@ Below is automatically generated documentation on this Terraform module using [t
5959
| Name | Version |
6060
|------|---------|
6161
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3.2 |
62-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 4.37.0 |
62+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30.0 |
6363

6464
## Providers
6565

@@ -113,6 +113,7 @@ Below is automatically generated documentation on this Terraform module using [t
113113
| <a name="input_lambda_insights_extension_account_number"></a> [lambda\_insights\_extension\_account\_number](#input\_lambda\_insights\_extension\_account\_number) | Account number for the LambdaInsightsExtension layer | `string` | `"580247275435"` | no |
114114
| <a name="input_lambda_insights_extension_version"></a> [lambda\_insights\_extension\_version](#input\_lambda\_insights\_extension\_version) | Lambda layer version for the LambdaInsightsExtension layer | `number` | `null` | no |
115115
| <a name="input_layers"></a> [layers](#input\_layers) | Lambda layers to apply to function. If null, a Lambda Layer extension is added by default. | `list(string)` | `null` | no |
116+
| <a name="input_log_group_class"></a> [log\_group\_class](#input\_log\_group\_class) | Log class of the log group. Possible values are: STANDARD or INFREQUENT\_ACCESS | `string` | `"STANDARD"` | no |
116117
| <a name="input_log_retention_in_days"></a> [log\_retention\_in\_days](#input\_log\_retention\_in\_days) | Number of days to retain CloudWatch Log entries | `number` | `7` | no |
117118
| <a name="input_memory_size"></a> [memory\_size](#input\_memory\_size) | Amount of memory in MB your Lambda Function can use at runtime | `number` | `128` | no |
118119
| <a name="input_name"></a> [name](#input\_name) | Name of the Lambda function | `string` | `null` | no |

logs.tf

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
resource "aws_cloudwatch_log_group" "log_group" {
22
name = local.log_group_name
33
retention_in_days = var.log_retention_in_days
4+
log_group_class = var.log_group_class
45
}

optional.tf

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -191,3 +191,9 @@ variable "ephemeral_storage_size" {
191191
error_message = "Ephemeral storage size must be between 512 and 10240 MB."
192192
}
193193
}
194+
195+
variable "log_group_class" {
196+
description = "Log class of the log group. Possible values are: STANDARD or INFREQUENT_ACCESS"
197+
default = "STANDARD"
198+
type = string
199+
}

scripts/validate.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,6 @@ IFS=$'\n\t'
77
GIT_ROOT=$(git rev-parse --show-toplevel)
88
pushd "$GIT_ROOT" >/dev/null
99
export AWS_DEFAULT_REGION='us-east-1'
10-
terraform init -backend=false
10+
terraform init -backend=false -upgrade
1111
terraform validate
1212
git add .terraform.lock.hcl

terraform.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ terraform {
33
required_providers {
44
# tflint-ignore: terraform_unused_required_providers
55
aws = {
6-
version = ">= 4.37.0"
6+
version = ">= 5.30.0"
77
}
88
}
99
}

0 commit comments

Comments
 (0)