Terraform - referencing existing security group Is there a way I can associate existing security group to RDS that is going to be created or the only way is to recreate the security group so it can be added to the state file?
You can retrieve security group from data source

variable "security_group_id" {}

data "aws_security_group" "selected" {
  id = "${var.security_group_id}"
}