Skip to content

Commit

Permalink
feat: allow outbound IPV6 traffic on VPC functions hat are connected …
Browse files Browse the repository at this point in the history
…to dual-stack subnets

Signed-off-by: Sebastien RIBIERE <sebastien.ribiere.ext@jellysmack.com>
  • Loading branch information
sribiere-jellysmack committed Aug 8, 2024
1 parent f48be17 commit ab40f04
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 5 deletions.
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -254,9 +254,10 @@ module "lambda_function_in_vpc" {
source_path = "../fixtures/python-app1"
vpc_subnet_ids = module.vpc.intra_subnets
vpc_security_group_ids = [module.vpc.default_security_group_id]
attach_network_policy = true
vpc_subnet_ids = module.vpc.intra_subnets
vpc_security_group_ids = [module.vpc.default_security_group_id]
attach_network_policy = true
ipv6_allowed_for_dual_stack = true
}
module "vpc" {
Expand Down
5 changes: 3 additions & 2 deletions main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,9 @@ resource "aws_lambda_function" "this" {
dynamic "vpc_config" {
for_each = var.vpc_subnet_ids != null && var.vpc_security_group_ids != null ? [true] : []
content {
security_group_ids = var.vpc_security_group_ids
subnet_ids = var.vpc_subnet_ids
security_group_ids = var.vpc_security_group_ids
subnet_ids = var.vpc_subnet_ids
ipv6_allowed_for_dual_stack = var.ipv6_allowed_for_dual_stack
}
}

Expand Down
6 changes: 6 additions & 0 deletions variables.tf
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,12 @@ variable "vpc_security_group_ids" {
default = null
}

variable "ipv6_allowed_for_dual_stack" {
description = "Allows outbound IPv6 traffic on VPC functions that are connected to dual-stack subnets. Default is false."
type = bool
default = false
}

variable "tags" {
description = "A map of tags to assign to resources."
type = map(string)
Expand Down

0 comments on commit ab40f04

Please sign in to comment.