# security group resource "aws_security_group" "elb_sg" { name = "elb_sg" description = "SG for ALB TLS" vpc_id = module.vpc.vpc_id ingress { description = "TLS from VPC" from_port = 443 to_port = 443 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } ingress { description = "HTTP from VPC" from_port = 80 to_port = 80 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } ingress { description = "HTTP from VPC" from_port = 8080 to_port = 8080 protocol = "tcp" cidr_blocks = ["0.0.0.0/0"] } egress { from_port = 0 to_port = 0 protocol = "-1" cidr_blocks = ["0.0.0.0/0"] ipv6_cidr_blocks = ["::/0"] } } # bucket policy resource "aws_s3_bucket_policy" "allow_access_from_elb_access_logs" { bucket = aws_s3_bucket.log-bucket.id policy = <