Cannot create network_insights_access_scope resource

Hi all.

I’m trying to create a awscc_ec2_network_insights_access_scope, but haven’t had any luck.

I’m doing the following:

resource "awscc_ec2_network_insights_access_scope" "InternetGateway" {

  match_paths = {
    source = {
      resource_statement = {
        resource_type = {
          resources = [
          "AWS::EC2::InternetGateway"
          ]
        }
      }
    },
    destination = {
      resource_statement = {
        resources = [
        "arn:aws:resource-groups:ap-southeast-2:66666666:group/prod-app"
        ]
      }
    }
  }
}

But I’m getting: Inappropriate value for attribute "match_paths": list of object required.

What am I missing? The documentation isn’t much clear.

The error says it wants a list of objects, but you’re passing just an object. Put some [ ] around it to make it a list.

1 Like