Skip to content
This repository was archived by the owner on Jul 11, 2023. It is now read-only.

Commit e5113f0

Browse files
author
Mike McGirr
committed
Add optional ipv6 support for the single-port-sg module as well
1 parent 083e5d4 commit e5113f0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/single-port-sg/main.tf

+8
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ variable "cidr_blocks" {
1717
type = list(string)
1818
}
1919

20+
variable "ipv6_cidr_blocks" {
21+
description = "List of IPv6 CIDR block ranges that the SG allows ingress from"
22+
type = list(string)
23+
default = []
24+
}
25+
2026
variable "description" {
2127
description = "Use this string to add a description for the SG rule"
2228
type = string
@@ -53,6 +59,7 @@ resource "aws_security_group_rule" "tcp_ingress" {
5359
to_port = var.port
5460
protocol = "tcp"
5561
cidr_blocks = var.cidr_blocks
62+
ipv6_cidr_blocks = var.ipv6_cidr_blocks
5663
security_group_id = var.security_group_id
5764
}
5865

@@ -65,5 +72,6 @@ resource "aws_security_group_rule" "udp_ingress" {
6572
to_port = var.port
6673
protocol = "udp"
6774
cidr_blocks = var.cidr_blocks
75+
ipv6_cidr_blocks = var.ipv6_cidr_blocks
6876
security_group_id = var.security_group_id
6977
}

0 commit comments

Comments
 (0)