Week 3 Practice Lab1 Implementing Dataops with terraform EC2

Hello!
I have a problem with file ec2.tf
line 40: vpc_security_group_ids = [none.none.id]

Could I replace the [none.none.id ] with [none.none.vpc_id] ?

Thank you for your help.
Luis

Hello @lumillao
vpc_id for the aws_security_group is a user-defined attribute as you can see hereunder.
image
However, in line 49 of the ec2.tf file, we need the id form aws_security_group.bastion_host itself, which is a generated attribute. Therefore, you should keep the id part and just change the two none keywords in this part of the exercise.

Hello! @Amir_Zare

Thank you very much for your help.

Luis.