Amazon web services – Terraform – Addition of security group to aws_instance leads to replacement of the instance
I have a terraform file, which is responsible for creation of an ec2 instance as well as the security groups. resource "aws_instance" "ec2" { ami = "ami-06791f9213cbb608b" instance_type = "t2.micro" key_name = "terraform-key" depends_on = [aws_security_group.ssh_group] security_groups = [aws_security_group.ssh_group.name] }…