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

Commit

Permalink
Add optional ipv6 support for the single-port-sg module as well
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike McGirr committed Mar 21, 2020
1 parent 083e5d4 commit e5113f0
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions modules/single-port-sg/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ variable "cidr_blocks" {
type = list(string)
}

variable "ipv6_cidr_blocks" {
description = "List of IPv6 CIDR block ranges that the SG allows ingress from"
type = list(string)
default = []
}

variable "description" {
description = "Use this string to add a description for the SG rule"
type = string
Expand Down Expand Up @@ -53,6 +59,7 @@ resource "aws_security_group_rule" "tcp_ingress" {
to_port = var.port
protocol = "tcp"
cidr_blocks = var.cidr_blocks
ipv6_cidr_blocks = var.ipv6_cidr_blocks
security_group_id = var.security_group_id
}

Expand All @@ -65,5 +72,6 @@ resource "aws_security_group_rule" "udp_ingress" {
to_port = var.port
protocol = "udp"
cidr_blocks = var.cidr_blocks
ipv6_cidr_blocks = var.ipv6_cidr_blocks
security_group_id = var.security_group_id
}

0 comments on commit e5113f0

Please sign in to comment.