Skip to content

Commit e2970fd

Browse files
authoredMar 14, 2024
feat: Support VPC flow log cloudwatch log group class (terraform-aws-modules#1053)
support log group class
1 parent 3e793b4 commit e2970fd

File tree

31 files changed

+50
-41
lines changed

31 files changed

+50
-41
lines changed
 

‎README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -256,13 +256,13 @@ Full contributing [guidelines are covered here](.github/contributing.md).
256256
| Name | Version |
257257
|------|---------|
258258
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
259-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
259+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
260260

261261
## Providers
262262

263263
| Name | Version |
264264
|------|---------|
265-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
265+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
266266

267267
## Modules
268268

@@ -445,6 +445,7 @@ No modules.
445445
| <a name="input_external_nat_ip_ids"></a> [external\_nat\_ip\_ids](#input\_external\_nat\_ip\_ids) | List of EIP IDs to be assigned to the NAT Gateways (used in combination with reuse\_nat\_ips) | `list(string)` | `[]` | no |
446446
| <a name="input_external_nat_ips"></a> [external\_nat\_ips](#input\_external\_nat\_ips) | List of EIPs to be used for `nat_public_ips` output (used in combination with reuse\_nat\_ips and external\_nat\_ip\_ids) | `list(string)` | `[]` | no |
447447
| <a name="input_flow_log_cloudwatch_iam_role_arn"></a> [flow\_log\_cloudwatch\_iam\_role\_arn](#input\_flow\_log\_cloudwatch\_iam\_role\_arn) | The ARN for the IAM role that's used to post flow logs to a CloudWatch Logs log group. When flow\_log\_destination\_arn is set to ARN of Cloudwatch Logs, this argument needs to be provided | `string` | `""` | no |
448+
| <a name="input_flow_log_cloudwatch_log_group_class"></a> [flow\_log\_cloudwatch\_log\_group\_class](#input\_flow\_log\_cloudwatch\_log\_group\_class) | Specified the log class of the log group. Possible values are: STANDARD or INFREQUENT\_ACCESS | `string` | `null` | no |
448449
| <a name="input_flow_log_cloudwatch_log_group_kms_key_id"></a> [flow\_log\_cloudwatch\_log\_group\_kms\_key\_id](#input\_flow\_log\_cloudwatch\_log\_group\_kms\_key\_id) | The ARN of the KMS Key to use when encrypting log data for VPC flow logs | `string` | `null` | no |
449450
| <a name="input_flow_log_cloudwatch_log_group_name_prefix"></a> [flow\_log\_cloudwatch\_log\_group\_name\_prefix](#input\_flow\_log\_cloudwatch\_log\_group\_name\_prefix) | Specifies the name prefix of CloudWatch Log Group for VPC flow logs | `string` | `"/aws/vpc-flow-log/"` | no |
450451
| <a name="input_flow_log_cloudwatch_log_group_name_suffix"></a> [flow\_log\_cloudwatch\_log\_group\_name\_suffix](#input\_flow\_log\_cloudwatch\_log\_group\_name\_suffix) | Specifies the name suffix of CloudWatch Log Group for VPC flow logs | `string` | `""` | no |

‎examples/complete/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Note that this example may create resources which can cost money (AWS Elastic IP
2222
| Name | Version |
2323
|------|---------|
2424
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
3232

3333
## Modules
3434

‎examples/complete/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎examples/ipam/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,13 +30,13 @@ Note that this example may create resources which can cost money (AWS Elastic IP
3030
| Name | Version |
3131
|------|---------|
3232
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
33-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
33+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
3434

3535
## Providers
3636

3737
| Name | Version |
3838
|------|---------|
39-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
39+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
4040

4141
## Modules
4242

‎examples/ipam/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎examples/ipv6-dualstack/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which can cost money (AWS Elastic IP
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
3030

3131
## Modules
3232

‎examples/ipv6-dualstack/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎examples/ipv6-only/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,13 @@ Note that this example may create resources which can cost money (AWS Elastic IP
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
2424

2525
## Providers
2626

2727
| Name | Version |
2828
|------|---------|
29-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
29+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
3030

3131
## Modules
3232

‎examples/ipv6-only/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎examples/issues/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ Note that this example may create resources which can cost money (AWS Elastic IP
2525
| Name | Version |
2626
|------|---------|
2727
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
28-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
28+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
2929

3030
## Providers
3131

3232
| Name | Version |
3333
|------|---------|
34-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
34+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
3535

3636
## Modules
3737

‎examples/issues/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎examples/manage-default-vpc/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Run `terraform destroy` when you don't need these resources.
2222
| Name | Version |
2323
|------|---------|
2424
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
2626

2727
## Providers
2828

‎examples/manage-default-vpc/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎examples/network-acls/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Note that this example may create resources which can cost money (AWS Elastic IP
2424
| Name | Version |
2525
|------|---------|
2626
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
27-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
27+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
2828

2929
## Providers
3030

3131
| Name | Version |
3232
|------|---------|
33-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
33+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
3434

3535
## Modules
3636

‎examples/network-acls/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎examples/outpost/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,13 +24,13 @@ Note that this example may create resources which can cost money (AWS Elastic IP
2424
| Name | Version |
2525
|------|---------|
2626
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
27-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
27+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
2828

2929
## Providers
3030

3131
| Name | Version |
3232
|------|---------|
33-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
33+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
3434

3535
## Modules
3636

‎examples/outpost/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎examples/secondary-cidr-blocks/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Note that this example may create resources which can cost money (AWS Elastic IP
2222
| Name | Version |
2323
|------|---------|
2424
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
3232

3333
## Modules
3434

‎examples/secondary-cidr-blocks/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎examples/separate-route-tables/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ Note that this example may create resources which can cost money (AWS Elastic IP
2222
| Name | Version |
2323
|------|---------|
2424
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
25-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
25+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
2626

2727
## Providers
2828

2929
| Name | Version |
3030
|------|---------|
31-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
31+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
3232

3333
## Modules
3434

‎examples/separate-route-tables/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎examples/simple/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,13 +26,13 @@ Note that this example may create resources which can cost money (AWS Elastic IP
2626
| Name | Version |
2727
|------|---------|
2828
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
29-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
29+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
3030

3131
## Providers
3232

3333
| Name | Version |
3434
|------|---------|
35-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
35+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
3636

3737
## Modules
3838

‎examples/simple/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎examples/vpc-flow-logs/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,14 @@ Note that this example may create resources which can cost money (AWS Elastic IP
2424
| Name | Version |
2525
|------|---------|
2626
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
27-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
27+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
2828
| <a name="requirement_random"></a> [random](#requirement\_random) | >= 2.0 |
2929

3030
## Providers
3131

3232
| Name | Version |
3333
|------|---------|
34-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
34+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
3535
| <a name="provider_random"></a> [random](#provider\_random) | >= 2.0 |
3636

3737
## Modules

‎examples/vpc-flow-logs/main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,7 @@ module "vpc_with_flow_logs_cloudwatch_logs_default" {
7878
flow_log_max_aggregation_interval = 60
7979
flow_log_cloudwatch_log_group_name_prefix = "/aws/my-amazing-vpc-flow-logz/"
8080
flow_log_cloudwatch_log_group_name_suffix = "my-test"
81+
flow_log_cloudwatch_log_group_class = "INFREQUENT_ACCESS"
8182

8283
vpc_flow_log_tags = local.tags
8384
}

‎examples/vpc-flow-logs/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99

1010
random = {

‎modules/vpc-endpoints/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ module "endpoints" {
5656
| Name | Version |
5757
|------|---------|
5858
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.0 |
59-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.20 |
59+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.30 |
6060

6161
## Providers
6262

6363
| Name | Version |
6464
|------|---------|
65-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.20 |
65+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.30 |
6666

6767
## Modules
6868

‎modules/vpc-endpoints/versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -1584,6 +1584,12 @@ variable "flow_log_cloudwatch_log_group_skip_destroy" {
15841584
default = false
15851585
}
15861586

1587+
variable "flow_log_cloudwatch_log_group_class" {
1588+
description = "Specified the log class of the log group. Possible values are: STANDARD or INFREQUENT_ACCESS"
1589+
type = string
1590+
default = null
1591+
}
1592+
15871593
variable "putin_khuylo" {
15881594
description = "Do you agree that Putin doesn't respect Ukrainian sovereignty and territorial integrity? More info: https://en.wikipedia.org/wiki/Putin_khuylo!"
15891595
type = bool

‎versions.tf

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ terraform {
44
required_providers {
55
aws = {
66
source = "hashicorp/aws"
7-
version = ">= 5.20"
7+
version = ">= 5.30"
88
}
99
}
1010
}

‎vpc-flow-logs.tf

+1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ resource "aws_cloudwatch_log_group" "flow_log" {
5050
retention_in_days = var.flow_log_cloudwatch_log_group_retention_in_days
5151
kms_key_id = var.flow_log_cloudwatch_log_group_kms_key_id
5252
skip_destroy = var.flow_log_cloudwatch_log_group_skip_destroy
53+
log_group_class = var.flow_log_cloudwatch_log_group_class
5354

5455
tags = merge(var.tags, var.vpc_flow_log_tags)
5556
}

0 commit comments

Comments
 (0)
Please sign in to comment.