Wednesday, December 6, 2023
HomeSoftware EngineeringCreate an AWS Safety Group in Terraform

Create an AWS Safety Group in Terraform


Under is an easy Terraform script block to create a Safety Group in AWS.

useful resource "aws_security_group" "Pattern-App-Safety-Group" {
  identify          = "sampleappsg-123"
  description   = "Inbound and outbound visitors for sampleapp service"
  vpc_id        = aws_vpc.id

  ingress {
    from_port = 0
    protocol  = "-1"
    to_port   = 0
    cidr_blocks = ["10.0.0.0/8"]
    ipv6_cidr_blocks = ["::/8"]
  }
  egress {
    from_port = 0
    protocol  = "-1"
    to_port   = 0
    cidr_blocks = ["10.0.0.0/8"]
    ipv6_cidr_blocks = ["::/8"]
  }

  tags {
    Title = "Pattern App Safety Group"
  }
}

You’ll be able to learn up extra about all of the doable arguments within the AWS Safety Group Terraform Reference.

RELATED ARTICLES

LEAVE A REPLY

Please enter your comment!
Please enter your name here

Most Popular

Recent Comments