Hi there,
New user with terraform here!
Hoping to find some help here on a simple issue where i’m trying to assign multiple security groups to an EC2…
I’m using the below in my module, where i’m also creating the security group resources…
resource "aws_network_interface_sg_attachment" "sg_attachment" { security_group_id = [aws_security_group.accept_challenge_traffic_application_rules.id, aws_security_group.accept_challenge_traffic_management_rules.id] network_interface_id = aws_instance.WebHost-01.primary_network_interface_id }
however it’s failing as it doesn’t seem to like me giving a comma with multiple id’s…is there a different argument I should be using? I can’t find any simple examples of this.