Hi Experts,
I am new to terrform. I am unable to find how can I attach security group when creating EC2 instance with aws_instance. Adding my code below, please suggest.
resource “aws_instance” “example” {
ami = “ami-07cc15c3ba6f8e287”
instance_type = “t2.micro”
subnet_id = “subnet-0bexxxxxxxx” #Defining subnet ID as default VPC was deleted.
}