diff --git a/examples/lattice-lambda-target-group/main.tf b/examples/lattice-lambda-target-group/main.tf index 7a9f5bd..f481dff 100644 --- a/examples/lattice-lambda-target-group/main.tf +++ b/examples/lattice-lambda-target-group/main.tf @@ -14,6 +14,8 @@ module "target_group" { name = "lambda-hello" + lambda_event_structure_version = "V2" + ## Targets targets = [ diff --git a/modules/lattice-alb-target-group/README.md b/modules/lattice-alb-target-group/README.md index 138ba53..0f21e28 100644 --- a/modules/lattice-alb-target-group/README.md +++ b/modules/lattice-alb-target-group/README.md @@ -11,13 +11,13 @@ This module creates following resources. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5 | -| [aws](#requirement\_aws) | >= 5.12 | +| [aws](#requirement\_aws) | >= 5.21 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.17.0 | +| [aws](#provider\_aws) | 5.22.0 | ## Modules diff --git a/modules/lattice-alb-target-group/main.tf b/modules/lattice-alb-target-group/main.tf index ab8e4e6..40c2ec1 100644 --- a/modules/lattice-alb-target-group/main.tf +++ b/modules/lattice-alb-target-group/main.tf @@ -27,8 +27,9 @@ locals { ################################################### # INFO: Not supported attributes -# - `config.ip_address_type` # - `config.health_check` +# - `config.ip_address_type` +# - `config.lambda_event_structure_version` resource "aws_vpclattice_target_group" "this" { name = var.name type = "ALB" diff --git a/modules/lattice-alb-target-group/versions.tf b/modules/lattice-alb-target-group/versions.tf index 3ac74d4..0cdc3d2 100644 --- a/modules/lattice-alb-target-group/versions.tf +++ b/modules/lattice-alb-target-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.12" + version = ">= 5.21" } } } diff --git a/modules/lattice-instance-target-group/README.md b/modules/lattice-instance-target-group/README.md index 5c7f7fa..4b789d4 100644 --- a/modules/lattice-instance-target-group/README.md +++ b/modules/lattice-instance-target-group/README.md @@ -11,13 +11,13 @@ This module creates following resources. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5 | -| [aws](#requirement\_aws) | >= 5.12 | +| [aws](#requirement\_aws) | >= 5.21 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.17.0 | +| [aws](#provider\_aws) | 5.22.0 | ## Modules diff --git a/modules/lattice-instance-target-group/main.tf b/modules/lattice-instance-target-group/main.tf index bd9eaa7..c4bd6a0 100644 --- a/modules/lattice-instance-target-group/main.tf +++ b/modules/lattice-instance-target-group/main.tf @@ -28,6 +28,7 @@ locals { # INFO: Not supported attributes # - `config.ip_address_type` +# - `config.lambda_event_structure_version` resource "aws_vpclattice_target_group" "this" { name = var.name type = "INSTANCE" diff --git a/modules/lattice-instance-target-group/versions.tf b/modules/lattice-instance-target-group/versions.tf index 3ac74d4..0cdc3d2 100644 --- a/modules/lattice-instance-target-group/versions.tf +++ b/modules/lattice-instance-target-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.12" + version = ">= 5.21" } } } diff --git a/modules/lattice-ip-target-group/README.md b/modules/lattice-ip-target-group/README.md index ff74d51..3b88e87 100644 --- a/modules/lattice-ip-target-group/README.md +++ b/modules/lattice-ip-target-group/README.md @@ -11,13 +11,13 @@ This module creates following resources. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5 | -| [aws](#requirement\_aws) | >= 5.12 | +| [aws](#requirement\_aws) | >= 5.21 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.17.0 | +| [aws](#provider\_aws) | 5.22.0 | ## Modules diff --git a/modules/lattice-ip-target-group/main.tf b/modules/lattice-ip-target-group/main.tf index 832b255..7e49e26 100644 --- a/modules/lattice-ip-target-group/main.tf +++ b/modules/lattice-ip-target-group/main.tf @@ -26,6 +26,8 @@ locals { # IP Target Group for VPC Lattice Service ################################################### +# INFO: Not supported attributes +# - `config.lambda_event_structure_version` resource "aws_vpclattice_target_group" "this" { name = var.name type = "IP" diff --git a/modules/lattice-ip-target-group/versions.tf b/modules/lattice-ip-target-group/versions.tf index 3ac74d4..0cdc3d2 100644 --- a/modules/lattice-ip-target-group/versions.tf +++ b/modules/lattice-ip-target-group/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.12" + version = ">= 5.21" } } } diff --git a/modules/lattice-lambda-target-group/README.md b/modules/lattice-lambda-target-group/README.md index 5f83684..3de3c92 100644 --- a/modules/lattice-lambda-target-group/README.md +++ b/modules/lattice-lambda-target-group/README.md @@ -11,13 +11,13 @@ This module creates following resources. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5 | -| [aws](#requirement\_aws) | >= 5.12 | +| [aws](#requirement\_aws) | >= 5.21 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.17.0 | +| [aws](#provider\_aws) | 5.22.0 | ## Modules @@ -37,6 +37,7 @@ This module creates following resources. | Name | Description | Type | Default | Required | |------|-------------|------|---------|:--------:| | [name](#input\_name) | (Required) The name of the target group. The name must be unique within the account. The valid characters are a-z, 0-9, and hyphens (-). You can't use a hyphen as the first or last character, or immediately after another hyphen. | `string` | n/a | yes | +| [lambda\_event\_structure\_version](#input\_lambda\_event\_structure\_version) | (Optional) The version of the event structure that the Lambda function receives. Valid values are `V1` are `V2`. Defaults to `V2`. | `string` | `"V2"` | no | | [module\_tags\_enabled](#input\_module\_tags\_enabled) | (Optional) Whether to create AWS Resource Tags for the module informations. | `bool` | `true` | no | | [resource\_group\_description](#input\_resource\_group\_description) | (Optional) The description of Resource Group. | `string` | `"Managed by Terraform."` | no | | [resource\_group\_enabled](#input\_resource\_group\_enabled) | (Optional) Whether to create Resource Group to find and group AWS resources which are created by this module. | `bool` | `true` | no | @@ -51,6 +52,7 @@ This module creates following resources. |------|-------------| | [arn](#output\_arn) | The ARN of the target group. | | [id](#output\_id) | The ID of the target group. | +| [lambda\_event\_structure\_version](#output\_lambda\_event\_structure\_version) | The version of the event structure that the Lambda function receives. | | [name](#output\_name) | The name of the target group. | | [status](#output\_status) | The status of the target group. | | [targets](#output\_targets) | The list of targets of the target group.
`name` - The name of the target. This value is only used internally within Terraform code.
`lambda_function` - The Amazon Resource Name (ARN) of the target Lambda function. | diff --git a/modules/lattice-lambda-target-group/main.tf b/modules/lattice-lambda-target-group/main.tf index 8617045..3cd02f1 100644 --- a/modules/lattice-lambda-target-group/main.tf +++ b/modules/lattice-lambda-target-group/main.tf @@ -20,11 +20,20 @@ locals { ################################################### # INFO: Not supported attributes -# - `config` +# - `config.health_check` +# - `config.ip_address_type` +# - `config.port` +# - `config.protocol` +# - `config.protocol_version` +# - `config.vpc_identifier` resource "aws_vpclattice_target_group" "this" { name = var.name type = "LAMBDA" + config { + lambda_event_structure_version = var.lambda_event_structure_version + } + timeouts { create = var.timeouts.create delete = var.timeouts.delete diff --git a/modules/lattice-lambda-target-group/outputs.tf b/modules/lattice-lambda-target-group/outputs.tf index 48749c5..942cf71 100644 --- a/modules/lattice-lambda-target-group/outputs.tf +++ b/modules/lattice-lambda-target-group/outputs.tf @@ -23,6 +23,11 @@ output "status" { value = aws_vpclattice_target_group.this.status } +output "lambda_event_structure_version" { + description = "The version of the event structure that the Lambda function receives." + value = one(aws_vpclattice_target_group.this.config[*].lambda_event_structure_version) +} + output "targets" { description = < [terraform](#requirement\_terraform) | >= 1.5 | -| [aws](#requirement\_aws) | >= 5.12 | +| [aws](#requirement\_aws) | >= 5.21 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.17.0 | +| [aws](#provider\_aws) | 5.22.0 | ## Modules diff --git a/modules/lattice-service-listener/versions.tf b/modules/lattice-service-listener/versions.tf index 3ac74d4..0cdc3d2 100644 --- a/modules/lattice-service-listener/versions.tf +++ b/modules/lattice-service-listener/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.12" + version = ">= 5.21" } } } diff --git a/modules/lattice-service-network/README.md b/modules/lattice-service-network/README.md index 831cf3e..e9fa665 100644 --- a/modules/lattice-service-network/README.md +++ b/modules/lattice-service-network/README.md @@ -15,13 +15,13 @@ This module creates following resources. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5 | -| [aws](#requirement\_aws) | >= 5.12 | +| [aws](#requirement\_aws) | >= 5.21 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.17.0 | +| [aws](#provider\_aws) | 5.22.0 | ## Modules diff --git a/modules/lattice-service-network/versions.tf b/modules/lattice-service-network/versions.tf index 3ac74d4..0cdc3d2 100644 --- a/modules/lattice-service-network/versions.tf +++ b/modules/lattice-service-network/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.12" + version = ">= 5.21" } } } diff --git a/modules/lattice-service/README.md b/modules/lattice-service/README.md index 4dee26b..49c4efc 100644 --- a/modules/lattice-service/README.md +++ b/modules/lattice-service/README.md @@ -16,13 +16,13 @@ This module creates following resources. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5 | -| [aws](#requirement\_aws) | >= 5.12 | +| [aws](#requirement\_aws) | >= 5.21 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.17.0 | +| [aws](#provider\_aws) | 5.22.0 | ## Modules diff --git a/modules/lattice-service/versions.tf b/modules/lattice-service/versions.tf index 3ac74d4..0cdc3d2 100644 --- a/modules/lattice-service/versions.tf +++ b/modules/lattice-service/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.12" + version = ">= 5.21" } } } diff --git a/modules/lattice-shared-service-network/README.md b/modules/lattice-shared-service-network/README.md index a3961b4..59c0081 100644 --- a/modules/lattice-shared-service-network/README.md +++ b/modules/lattice-shared-service-network/README.md @@ -11,13 +11,13 @@ This module creates following resources. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5 | -| [aws](#requirement\_aws) | >= 5.12 | +| [aws](#requirement\_aws) | >= 5.21 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.17.0 | +| [aws](#provider\_aws) | 5.22.0 | ## Modules diff --git a/modules/lattice-shared-service-network/versions.tf b/modules/lattice-shared-service-network/versions.tf index 3ac74d4..0cdc3d2 100644 --- a/modules/lattice-shared-service-network/versions.tf +++ b/modules/lattice-shared-service-network/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.12" + version = ">= 5.21" } } } diff --git a/modules/lattice-shared-service/README.md b/modules/lattice-shared-service/README.md index 7c61f4e..639a169 100644 --- a/modules/lattice-shared-service/README.md +++ b/modules/lattice-shared-service/README.md @@ -10,13 +10,13 @@ This module creates following resources. | Name | Version | |------|---------| | [terraform](#requirement\_terraform) | >= 1.5 | -| [aws](#requirement\_aws) | >= 5.12 | +| [aws](#requirement\_aws) | >= 5.21 | ## Providers | Name | Version | |------|---------| -| [aws](#provider\_aws) | 5.17.0 | +| [aws](#provider\_aws) | 5.22.0 | ## Modules diff --git a/modules/lattice-shared-service/versions.tf b/modules/lattice-shared-service/versions.tf index 3ac74d4..0cdc3d2 100644 --- a/modules/lattice-shared-service/versions.tf +++ b/modules/lattice-shared-service/versions.tf @@ -4,7 +4,7 @@ terraform { required_providers { aws = { source = "hashicorp/aws" - version = ">= 5.12" + version = ">= 5.21" } } }