I'm new to Terraform, when I run Terraform apply, I git this error:
Error: Error creating Security Group: InvalidGroup.Duplicate: The security group 'xxxxxxx' already exists for VPC 'vpc-xxxxxx'
status code: 400
The script for this part looks like this:
resource "aws_security_group" "xxxxx_security_group" {
name = "xxxxx-security-group-xxxx"
vpc_id = xxxxxxxxxxxxx
egress {
from_port = x
protocol = x
to_port = x
cidr_blocks = ["x.x.x.x/x"]
}
}
Can someone give me some hints? Spent like almost an hour now, still no clue....