Skip to content

Commit 413c962

Browse files
authored
feat: Support ip_address_type (#135)
1 parent ab6406a commit 413c962

File tree

12 files changed

+22
-12
lines changed

12 files changed

+22
-12
lines changed

README.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -177,13 +177,13 @@ module "api_gateway" {
177177
| Name | Version |
178178
|------|---------|
179179
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
180-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.37 |
180+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.96 |
181181

182182
## Providers
183183

184184
| Name | Version |
185185
|------|---------|
186-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.37 |
186+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.96 |
187187

188188
## Modules
189189

@@ -235,6 +235,7 @@ module "api_gateway" {
235235
| <a name="input_domain_name_ownership_verification_certificate_arn"></a> [domain\_name\_ownership\_verification\_certificate\_arn](#input\_domain\_name\_ownership\_verification\_certificate\_arn) | ARN of the AWS-issued certificate used to validate custom domain ownership (when certificate\_arn is issued via an ACM Private CA or mutual\_tls\_authentication is configured with an ACM-imported certificate.) | `string` | `null` | no |
236236
| <a name="input_fail_on_warnings"></a> [fail\_on\_warnings](#input\_fail\_on\_warnings) | Whether warnings should return an error while API Gateway is creating or updating the resource using an OpenAPI specification. Defaults to `false`. Applicable for HTTP APIs | `bool` | `null` | no |
237237
| <a name="input_hosted_zone_name"></a> [hosted\_zone\_name](#input\_hosted\_zone\_name) | Optional domain name of the Hosted Zone where the domain should be created | `string` | `null` | no |
238+
| <a name="input_ip_address_type"></a> [ip\_address\_type](#input\_ip\_address\_type) | The IP address types that can invoke the API. Valid values: ipv4, dualstack. Use ipv4 to allow only IPv4 addresses to invoke your API, or use dualstack to allow both IPv4 and IPv6 addresses to invoke your API. Defaults to ipv4. | `string` | `null` | no |
238239
| <a name="input_mutual_tls_authentication"></a> [mutual\_tls\_authentication](#input\_mutual\_tls\_authentication) | The mutual TLS authentication configuration for the domain name | `map(string)` | `{}` | no |
239240
| <a name="input_name"></a> [name](#input\_name) | The name of the API. Must be less than or equal to 128 characters in length | `string` | `""` | no |
240241
| <a name="input_protocol_type"></a> [protocol\_type](#input\_protocol\_type) | The API protocol. Valid values: `HTTP`, `WEBSOCKET` | `string` | `"HTTP"` | no |

examples/complete-http/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.37 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.96 |
2424
| <a name="requirement_local"></a> [local](#requirement\_local) | >= 2.5 |
2525
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
2626
| <a name="requirement_tls"></a> [tls](#requirement\_tls) | >= 3.1 |
@@ -29,7 +29,7 @@ Note that this example may create resources which cost money. Run `terraform des
2929

3030
| Name | Version |
3131
|------|---------|
32-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.37 |
32+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.96 |
3333
| <a name="provider_local"></a> [local](#provider\_local) | >= 2.5 |
3434
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
3535
| <a name="provider_tls"></a> [tls](#provider\_tls) | >= 3.1 |

examples/complete-http/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.37"
7+
version = ">= 5.96"
88
}
99
local = {
1010
source = "hashicorp/local"

examples/vpc-link-http/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,14 @@ Note that this example may create resources which cost money. Run `terraform des
2020
| Name | Version |
2121
|------|---------|
2222
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
23-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.37 |
23+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.96 |
2424
| <a name="requirement_null"></a> [null](#requirement\_null) | >= 2.0 |
2525

2626
## Providers
2727

2828
| Name | Version |
2929
|------|---------|
30-
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.37 |
30+
| <a name="provider_aws"></a> [aws](#provider\_aws) | >= 5.96 |
3131
| <a name="provider_null"></a> [null](#provider\_null) | >= 2.0 |
3232

3333
## Modules

examples/vpc-link-http/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.37"
7+
version = ">= 5.96"
88
}
99
null = {
1010
source = "hashicorp/null"

examples/websocket/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ connected (press CTRL+C to quit)
5151
| Name | Version |
5252
|------|---------|
5353
| <a name="requirement_terraform"></a> [terraform](#requirement\_terraform) | >= 1.3 |
54-
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.37 |
54+
| <a name="requirement_aws"></a> [aws](#requirement\_aws) | >= 5.96 |
5555

5656
## Providers
5757

examples/websocket/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.37"
7+
version = ">= 5.96"
88
}
99
}
1010
}

main.tf

+2
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ resource "aws_apigatewayv2_api" "this" {
3333
# https://docs.aws.amazon.com/apigateway/latest/developerguide/rest-api-disable-default-endpoint.html
3434
disable_execute_api_endpoint = local.is_http && local.create_domain_name ? true : var.disable_execute_api_endpoint
3535
fail_on_warnings = local.is_http ? var.fail_on_warnings : null
36+
ip_address_type = var.ip_address_type
3637
name = var.name
3738
protocol_type = var.protocol_type
3839
route_key = local.is_http ? var.route_key : null
@@ -91,6 +92,7 @@ resource "aws_apigatewayv2_domain_name" "this" {
9192
domain_name_configuration {
9293
certificate_arn = local.create_certificate ? module.acm.acm_certificate_arn : var.domain_name_certificate_arn
9394
endpoint_type = "REGIONAL"
95+
ip_address_type = var.ip_address_type
9496
security_policy = "TLS_1_2"
9597
ownership_verification_certificate_arn = var.domain_name_ownership_verification_certificate_arn
9698
}

variables.tf

+6
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,12 @@ variable "fail_on_warnings" {
5757
default = null
5858
}
5959

60+
variable "ip_address_type" {
61+
description = "The IP address types that can invoke the API. Valid values: ipv4, dualstack. Use ipv4 to allow only IPv4 addresses to invoke your API, or use dualstack to allow both IPv4 and IPv6 addresses to invoke your API. Defaults to ipv4."
62+
type = string
63+
default = null
64+
}
65+
6066
variable "name" {
6167
description = "The name of the API. Must be less than or equal to 128 characters in length"
6268
type = string

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.37"
7+
version = ">= 5.96"
88
}
99
}
1010
}

wrappers/main.tf

+1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ module "wrapper" {
2424
domain_name_ownership_verification_certificate_arn = try(each.value.domain_name_ownership_verification_certificate_arn, var.defaults.domain_name_ownership_verification_certificate_arn, null)
2525
fail_on_warnings = try(each.value.fail_on_warnings, var.defaults.fail_on_warnings, null)
2626
hosted_zone_name = try(each.value.hosted_zone_name, var.defaults.hosted_zone_name, null)
27+
ip_address_type = try(each.value.ip_address_type, var.defaults.ip_address_type, null)
2728
mutual_tls_authentication = try(each.value.mutual_tls_authentication, var.defaults.mutual_tls_authentication, {})
2829
name = try(each.value.name, var.defaults.name, "")
2930
protocol_type = try(each.value.protocol_type, var.defaults.protocol_type, "HTTP")

wrappers/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.37"
7+
version = ">= 5.96"
88
}
99
}
1010
}

0 commit comments

Comments
 (0)