mirror of
https://codeberg.org/scottslowe/learning-tools.git
synced 2026-03-11 09:04:37 +00:00
Fix errors
Fix errors related to the addition of security groups to allow etcd traffic Signed-off-by: Scott Lowe <scott.lowe@scottlowe.org>
This commit is contained in:
parent
ccd32c908a
commit
c97a117cba
1 changed files with 26 additions and 14 deletions
|
|
@ -11,31 +11,43 @@ module "etcd-vpc" {
|
|||
resource "aws_security_group" "etcd_sg" {
|
||||
name = "etcd_sg"
|
||||
description = "Allow traffic needed by etcd"
|
||||
vpc_id = "${module.etcd-vpc.id}"
|
||||
vpc_id = "${module.etcd-vpc.vpc_id}"
|
||||
}
|
||||
|
||||
resource "aws_security_group_rule" "etcd_sg_allow_sg" {
|
||||
resource "aws_security_group_rule" "etcd_sg_allow_sg_in" {
|
||||
security_group_id = "${aws_security_group.etcd_sg.id}"
|
||||
type = "ingress"
|
||||
from_port = 0
|
||||
to_port = 65535
|
||||
protocol = "tcp"
|
||||
to_port = 0
|
||||
protocol = "-1"
|
||||
source_security_group_id = "${aws_security_group.etcd_sg.id}"
|
||||
}
|
||||
|
||||
resource "aws_security_group_rule" "etcd_sg_allow_sg_out" {
|
||||
security_group_id = "${aws_security_group.etcd_sg.id}"
|
||||
type = "egress"
|
||||
from_port = 0
|
||||
to_port = 0
|
||||
protocol = "-1"
|
||||
source_security_group_id = "${aws_security_group.etcd_sg.id}"
|
||||
}
|
||||
|
||||
resource "aws_security_group_rule" "etcd_sg_allow_client" {
|
||||
type = "ingress"
|
||||
from_port = 2379
|
||||
to_port = 2379
|
||||
protocol = "tcp"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
security_group_id = "${aws_security_group.etcd_sg.id}"
|
||||
type = "ingress"
|
||||
from_port = 2379
|
||||
to_port = 2379
|
||||
protocol = "tcp"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
}
|
||||
|
||||
resource "aws_security_group_rule" "etcd_sg_allow_peer" {
|
||||
type = "ingress"
|
||||
from_port = 2380
|
||||
to_port = 2380
|
||||
protocol = "tcp"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
security_group_id = "${aws_security_group.etcd_sg.id}"
|
||||
type = "ingress"
|
||||
from_port = 2380
|
||||
to_port = 2380
|
||||
protocol = "tcp"
|
||||
cidr_blocks = ["0.0.0.0/0"]
|
||||
}
|
||||
|
||||
module "etcd" {
|
||||
|
|
|
|||
Loading…
Reference in a new issue