Under is an easy Terraform script block to create a Safety Group in AWS.
useful resource "aws_security_group" "Pattern-App-Safety-Group" {
title = "sampleappsg-123"
description = "Inbound and outbound site 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 may learn up extra about all of the doable arguments within the AWS Safety Group Terraform Reference.