here is the code:
esource “aws_instance” “PublicEC2” {
ami = “mi-0e9089763828757e1”
instance_type = “t2.micro”
vpc_security_group_ids = “{aws_security_group.allow_ssh.id}"
subnet_id = "{aws_subnet.lme_public-1a.id}”
key_name = “mykeyname”
tags = {
Name = "PublicEC2"
}
depends_on = [aws_vpc.lme_vpc, aws_subnet.lme_public-1a, aws_security_group.allow_ssh]
}
it is throwing the following error:
Error: Incorrect attribute value type
on ec2.tf line 5, in resource “aws_instance” “PublicEC2”:
5: vpc_security_group_ids = “${aws_security_group.allow_ssh.id}”
Inappropriate value for attribute “vpc_security_group_ids”: set of string
required.