Hi,
I am learning Terraform following the project described in the book “Terraform up and running”.
I have managed to reproduce all the examples up to chapter 2 so far.
Now I would like to deploy a load balancer creating a security group inbound rule that gives access to custom IPs only, not all traffic.
So, if I define a security group resource in this way:
resource "aws_security_group" "instance" {
name = var.security_group_name
ingress {
from_port = var.server_port
to_port = var.server_port
protocol = "tcp"
cidr_blocks = [<custom ip address in place of "0.0.0.0/0">]
What else and how do I need to modify in the main.tf file?
Thanks!