Error: no matching SecurityGroup found

code/data.tf line 23, in data “aws_security_group” “sg_linux”:
23: data “aws_security_group” “sg_linux” {

code/data.tf line 28, in data “aws_security_group” “sg_windows”:
28: data “aws_security_group” “sg_windows” {

data block:
data “aws_security_group” “sg_linux” {
name = “ec2-sg-linux”
vpc_id = var.vpc_id
}

data “aws_security_group” “sg_windows” {
name = “ec2-sg-windows”
vpc_id = var.vpc_id
}

I see security group with correct name and correct vpc id. still I see this issue while deploying.

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.