August 2019
Beginner
608 pages
16h 7m
English
In this file, we define the security groups that are in use for this VPC. A security group consists of ingress (incoming) and eggress (outgoing) traffic definitions:
resource "aws_security_group" "SG-frontendservers"{ name = "SG-frontendservers" vpc_id = "${aws_vpc.gitlabha.id}" description = "Security group for frontendservers" ingress { from_port = 22 to_port = 22 protocol = "TCP" security_groups = ["${aws_security_group.SG-bastionhosts.id}"] description = "Allow incoming SSH traffic from bastion hosts"}
The first two attributes define the name for the group, as well as the ID of the VPC to which this group belongs:
name = "SG-frontendservers" vpc_id = "${aws_vpc.gitlabha.id}" description = "Security group for frontendservers" ...Read now
Unlock full access