Skip to content

Commit c1d224d

Browse files
feat: Add support for tls_config in integrations (#51)
1 parent 76e7ce2 commit c1d224d

File tree

4 files changed

+13
-2
lines changed

4 files changed

+13
-2
lines changed

examples/complete-http/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ Note that this example may create resources which cost money. Run `terraform des
4040
| Name | Source | Version |
4141
|------|--------|---------|
4242
| <a name="module_acm"></a> [acm](#module\_acm) | terraform-aws-modules/acm/aws | ~> 3.0 |
43-
| <a name="module_api_gateway"></a> [api\_gateway](#module\_api\_gateway) | ../../ | |
43+
| <a name="module_api_gateway"></a> [api\_gateway](#module\_api\_gateway) | ../../ | n/a |
4444
| <a name="module_lambda_function"></a> [lambda\_function](#module\_lambda\_function) | terraform-aws-modules/lambda/aws | ~> 2.0 |
4545
| <a name="module_step_function"></a> [step\_function](#module\_step\_function) | terraform-aws-modules/step-functions/aws | ~> 2.0 |
4646

examples/complete-http/main.tf

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ module "api_gateway" {
5151
}
5252

5353
integrations = {
54+
5455
"ANY /" = {
5556
lambda_arn = module.lambda_function.lambda_function_arn
5657
payload_format_version = "2.0"
@@ -80,6 +81,9 @@ module "api_gateway" {
8081

8182
"$default" = {
8283
lambda_arn = module.lambda_function.lambda_function_arn
84+
tls_config = jsonencode({
85+
server_name_to_verify = local.domain_name
86+
})
8387
}
8488

8589
}

examples/vpc-link-http/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Note that this example may create resources which cost money. Run `terraform des
3838
|------|--------|---------|
3939
| <a name="module_alb"></a> [alb](#module\_alb) | terraform-aws-modules/alb/aws | ~> 6.0 |
4040
| <a name="module_alb_security_group"></a> [alb\_security\_group](#module\_alb\_security\_group) | terraform-aws-modules/security-group/aws | ~> 4.0 |
41-
| <a name="module_api_gateway"></a> [api\_gateway](#module\_api\_gateway) | ../../ | |
41+
| <a name="module_api_gateway"></a> [api\_gateway](#module\_api\_gateway) | ../../ | n/a |
4242
| <a name="module_api_gateway_security_group"></a> [api\_gateway\_security\_group](#module\_api\_gateway\_security\_group) | terraform-aws-modules/security-group/aws | ~> 4.0 |
4343
| <a name="module_lambda_function"></a> [lambda\_function](#module\_lambda\_function) | terraform-aws-modules/lambda/aws | ~> 2.0 |
4444
| <a name="module_lambda_security_group"></a> [lambda\_security\_group](#module\_lambda\_security\_group) | terraform-aws-modules/security-group/aws | ~> 4.0 |

main.tf

+7
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,13 @@ resource "aws_apigatewayv2_integration" "this" {
154154
content_handling_strategy = lookup(each.value, "content_handling_strategy", null)
155155
credentials_arn = lookup(each.value, "credentials_arn", null)
156156
request_parameters = try(jsondecode(each.value["request_parameters"]), each.value["request_parameters"], null)
157+
158+
dynamic "tls_config" {
159+
for_each = flatten([try(jsondecode(each.value["tls_config"]), each.value["tls_config"], [])])
160+
content {
161+
server_name_to_verify = tls_config.value["server_name_to_verify"]
162+
}
163+
}
157164
}
158165

159166
# VPC Link (Private API)

0 commit comments

Comments
 (0)